Skip to content

Commit

Permalink
Auto merge of rust-lang#5042 - JohnTitor:rustup-0112, r=phansch
Browse files Browse the repository at this point in the history
Rustup to rust-lang#68045

This is blocked because `rustc_lint::context` is not pub module and `CheckLintNameResult` is not marked as `pub use`.

changelog: none
  • Loading branch information
bors committed Jan 13, 2020
2 parents 2677a4e + ce1c6b2 commit 920cdb5
Show file tree
Hide file tree
Showing 167 changed files with 209 additions and 178 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/approx_const.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::utils::span_lint;
use rustc::lint::{LateContext, LateLintPass};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::symbol;
use std::f64::consts as f64;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/arithmetic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::consts::constant_simple;
use crate::utils::span_lint;
use rustc::lint::{LateContext, LateLintPass};
use rustc_hir as hir;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_tool_lint, impl_lint_pass};
use rustc_span::source_map::Span;

Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/as_conversions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use rustc::lint::{in_external_macro, EarlyContext, EarlyLintPass, LintContext};
use rustc::lint::in_external_macro;
use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::*;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/assertions_on_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use crate::consts::{constant, Constant};
use crate::utils::paths;
use crate::utils::{is_direct_expn_of, is_expn_of, match_function_call, snippet_opt, span_help_and_lint};
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::LitKind;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/assign_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use crate::utils::{
use crate::utils::{higher, sugg};
use if_chain::if_chain;
use rustc::hir::map::Map;
use rustc::lint::{LateContext, LateLintPass};
use rustc_errors::Applicability;
use rustc_hir as hir;
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/atomic_ordering.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::utils::{match_def_path, span_help_and_lint};
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc::ty;
use rustc_hir::def_id::DefId;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
5 changes: 2 additions & 3 deletions clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ use crate::utils::{
span_lint_and_then, without_block_comments,
};
use if_chain::if_chain;
use rustc::lint::{
in_external_macro, CheckLintNameResult, EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext,
};
use rustc::lint::in_external_macro;
use rustc::ty;
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{CheckLintNameResult, EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/bit_mask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use crate::consts::{constant, Constant};
use crate::utils::sugg::Sugg;
use crate::utils::{span_lint, span_lint_and_then};
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_tool_lint, impl_lint_pass};
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/blacklisted_name.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::span_lint;
use rustc::lint::{LateContext, LateLintPass};
use rustc_data_structures::fx::FxHashSet;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_tool_lint, impl_lint_pass};

declare_clippy_lint! {
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/block_in_if_condition.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use crate::utils::*;
use matches::matches;
use rustc::hir::map::Map;
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintContext};
use rustc::lint::in_external_macro;
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass, LintContext};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/booleans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ use crate::utils::{
};
use if_chain::if_chain;
use rustc::hir::map::Map;
use rustc::lint::{LateContext, LateLintPass};
use rustc_errors::Applicability;
use rustc_hir::intravisit;
use rustc_hir::intravisit::*;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/bytecount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use crate::utils::{
span_lint_and_sugg, walk_ptrs_ty,
};
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc::ty;
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::{Name, UintTy};

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/cargo_common_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::path::PathBuf;

use crate::utils::span_lint;
use rustc::lint::{EarlyContext, EarlyLintPass};
use rustc_lint::{EarlyContext, EarlyLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::DUMMY_SP;
use syntax::ast::*;
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/checked_conversions.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! lint on manually implemented checked conversions that could be transformed into `try_from`
use if_chain::if_chain;
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintContext};
use rustc::lint::in_external_macro;
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass, LintContext};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::LitKind;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/cognitive_complexity.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! calculate cognitive complexity and warn about overly complex functions
use rustc::hir::map::Map;
use rustc::lint::{LateContext, LateLintPass, LintContext};
use rustc_hir::intravisit::{walk_expr, FnKind, NestedVisitorMap, Visitor};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass, LintContext};
use rustc_session::{declare_tool_lint, impl_lint_pass};
use rustc_span::source_map::Span;
use rustc_span::BytePos;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/collapsible_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! This lint is **warn** by default
use if_chain::if_chain;
use rustc::lint::{EarlyContext, EarlyLintPass};
use rustc_lint::{EarlyContext, EarlyLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/comparison_chain.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::utils::{
get_trait_def_id, if_sequence, implements_trait, parent_node_is_if_expr, paths, span_help_and_lint, SpanlessEq,
};
use rustc::lint::{LateContext, LateLintPass};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

use crate::utils::{clip, higher, sext, unsext};
use if_chain::if_chain;
use rustc::lint::LateContext;
use rustc::ty::subst::{Subst, SubstsRef};
use rustc::ty::{self, Ty, TyCtxt};
use rustc::{bug, span_bug};
use rustc_data_structures::sync::Lrc;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::*;
use rustc_lint::LateContext;
use rustc_span::symbol::Symbol;
use std::cmp::Ordering::{self, Equal};
use std::cmp::PartialOrd;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/copies.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::utils::{get_parent_expr, higher, if_sequence, same_tys, snippet, span_lint_and_then, span_note_and_lint};
use crate::utils::{SpanlessEq, SpanlessHash};
use rustc::lint::{LateContext, LateLintPass};
use rustc::ty::Ty;
use rustc_data_structures::fx::FxHashMap;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::symbol::Symbol;
use std::collections::hash_map::Entry;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/copy_iterator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::utils::{is_copy, match_path, paths, span_note_and_lint};
use rustc::lint::{LateContext, LateLintPass};
use rustc_hir::{Item, ItemKind};
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/dbg_macro.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::utils::{snippet_opt, span_help_and_lint, span_lint_and_sugg};
use rustc::lint::{EarlyContext, EarlyLintPass};
use rustc_errors::Applicability;
use rustc_lint::{EarlyContext, EarlyLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Span;
use syntax::ast;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/default_trait_access.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc::ty;
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

use crate::utils::{any_parent_is_automatically_derived, match_def_path, paths, span_lint_and_sugg};
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/derive.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::utils::paths;
use crate::utils::{is_automatically_derived, is_copy, match_path, span_lint_and_then};
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc::ty::{self, Ty};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Span;

Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/doc.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use crate::utils::{match_type, paths, return_ty, span_lint};
use itertools::Itertools;
use rustc::lint::{in_external_macro, LateContext, LateLintPass};
use rustc::lint::in_external_macro;
use rustc_data_structures::fx::FxHashSet;
use rustc_hir as hir;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_tool_lint, impl_lint_pass};
use rustc_span::source_map::{BytePos, MultiSpan, Span};
use rustc_span::Pos;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/double_comparison.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Lint on unnecessary double comparisons. Some examples:
use rustc::lint::{LateContext, LateLintPass};
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Span;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/double_parens.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::utils::span_lint;
use rustc::lint::{EarlyContext, EarlyLintPass};
use rustc_lint::{EarlyContext, EarlyLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::*;

Expand Down
8 changes: 4 additions & 4 deletions clippy_lints/src/drop_bounds.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::{match_def_path, paths, span_lint};
use if_chain::if_chain;
use rustc::lint::LateLintPass;
use rustc_hir::*;
use rustc_lint::LateLintPass;
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down Expand Up @@ -38,12 +38,12 @@ const DROP_BOUNDS_SUMMARY: &str = "Bounds of the form `T: Drop` are useless. \
declare_lint_pass!(DropBounds => [DROP_BOUNDS]);

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DropBounds {
fn check_generic_param(&mut self, cx: &rustc::lint::LateContext<'a, 'tcx>, p: &'tcx GenericParam<'_>) {
fn check_generic_param(&mut self, cx: &rustc_lint::LateContext<'a, 'tcx>, p: &'tcx GenericParam<'_>) {
for bound in p.bounds.iter() {
lint_bound(cx, bound);
}
}
fn check_where_predicate(&mut self, cx: &rustc::lint::LateContext<'a, 'tcx>, p: &'tcx WherePredicate<'_>) {
fn check_where_predicate(&mut self, cx: &rustc_lint::LateContext<'a, 'tcx>, p: &'tcx WherePredicate<'_>) {
if let WherePredicate::BoundPredicate(WhereBoundPredicate { bounds, .. }) = p {
for bound in *bounds {
lint_bound(cx, bound);
Expand All @@ -52,7 +52,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DropBounds {
}
}

fn lint_bound<'a, 'tcx>(cx: &rustc::lint::LateContext<'a, 'tcx>, bound: &'tcx GenericBound<'_>) {
fn lint_bound<'a, 'tcx>(cx: &rustc_lint::LateContext<'a, 'tcx>, bound: &'tcx GenericBound<'_>) {
if_chain! {
if let GenericBound::Trait(t, _) = bound;
if let Some(def_id) = t.trait_ref.path.res.opt_def_id();
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/drop_forget_ref.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::utils::{is_copy, match_def_path, paths, qpath_res, span_note_and_lint};
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc::ty;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/duration_subsec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use if_chain::if_chain;
use rustc::lint::{LateContext, LateLintPass};
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Spanned;

Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/else_if_without_else.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Lint on if expressions with an else if, but without a final else branch.
use rustc::lint::{in_external_macro, EarlyContext, EarlyLintPass, LintContext};
use rustc::lint::in_external_macro;
use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::*;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/empty_enum.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! lint when there is an enum with no variants
use crate::utils::span_lint_and_then;
use rustc::lint::{LateContext, LateLintPass};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use crate::utils::{get_item_name, higher, match_type, paths, snippet, snippet_op
use crate::utils::{snippet_with_applicability, span_lint_and_then, walk_ptrs_ty};
use if_chain::if_chain;
use rustc::hir::map::Map;
use rustc::lint::{LateContext, LateLintPass};
use rustc_errors::Applicability;
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Span;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/enum_clike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
use crate::consts::{miri_to_const, Constant};
use crate::utils::span_lint;
use rustc::lint::{LateContext, LateLintPass};
use rustc::ty;
use rustc::ty::util::IntTypeExt;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use std::convert::TryFrom;
use syntax::ast::{IntTy, UintTy};
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/enum_glob_use.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! lint on `use`ing all variants of an enum
use crate::utils::span_lint;
use rustc::lint::{LateContext, LateLintPass};
use rustc_hir::def::{DefKind, Res};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Span;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/enum_variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::utils::{camel_case, is_present_in_source};
use crate::utils::{span_help_and_lint, span_lint};
use rustc::lint::{EarlyContext, EarlyLintPass, Lint};
use rustc_lint::{EarlyContext, EarlyLintPass, Lint};
use rustc_session::{declare_tool_lint, impl_lint_pass};
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/eq_op.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::{implements_trait, is_copy, multispan_sugg, snippet, span_lint, span_lint_and_then, SpanlessEq};
use rustc::lint::{LateContext, LateLintPass};
use rustc_errors::Applicability;
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
Expand Down
Loading

0 comments on commit 920cdb5

Please sign in to comment.