Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Specifically caused by rust-lang/rust#67786
  • Loading branch information
phansch committed Jan 4, 2020
1 parent fa9b85d commit c5178e8
Show file tree
Hide file tree
Showing 70 changed files with 83 additions and 79 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/approx_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use rustc::declare_lint_pass;
use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::symbol;
use std::f64::consts as f64;
use syntax::ast::{FloatTy, LitFloatType, LitKind};
use syntax::symbol;

declare_clippy_lint! {
/// **What it does:** Checks for floating point literals that approximate
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rustc::hir;
use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for plain integer arithmetic.
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use rustc::lint::{
use rustc::ty;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use semver::Version;
use syntax::ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
use syntax::source_map::Span;
use syntax::util::lev_distance::find_best_match_for_name;

declare_clippy_lint! {
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 @@ -7,8 +7,8 @@ use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for incompatible bit masks in comparisons.
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 @@ -9,8 +9,8 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for boolean expressions that can be written more
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/cargo_common_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use crate::utils::span_lint;
use rustc::declare_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::{ast::*, source_map::DUMMY_SP};
use rustc_span::source_map::DUMMY_SP;
use syntax::ast::*;

declare_clippy_lint! {
/// **What it does:** Checks to see if all common metadata is defined in
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/cognitive_complexity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use rustc::hir::*;
use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::BytePos;
use syntax::ast::Attribute;
use syntax::source_map::Span;

use crate::utils::{match_type, paths, snippet_opt, span_help_and_lint, LimitStack};

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/copies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::Ty;
use rustc_data_structures::fx::FxHashMap;
use rustc_session::declare_tool_lint;
use rustc_span::symbol::Symbol;
use std::collections::hash_map::Entry;
use std::hash::BuildHasherDefault;
use syntax::symbol::Symbol;

declare_clippy_lint! {
/// **What it does:** Checks for consecutive `if`s with the same condition.
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/dbg_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use rustc::declare_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast;
use syntax::source_map::Span;
use syntax::tokenstream::TokenStream;

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::{self, Ty};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for deriving `Hash` but implementing `PartialEq`
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_data_structures::fx::FxHashSet;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::{BytePos, MultiSpan, Span};
use rustc_span::Pos;
use std::ops::Range;
use syntax::ast::{AttrKind, Attribute};
use syntax::source_map::{BytePos, MultiSpan, Span};
use url::Url;

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/double_comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

use crate::utils::{snippet_with_applicability, span_lint_and_sugg, SpanlessEq};

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/duration_subsec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Spanned;
use rustc_span::source_map::Spanned;

use crate::consts::{constant, Constant};
use crate::utils::paths;
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 @@ -8,7 +8,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for uses of `contains_key` + `insert` on `HashMap`
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
Expand Up @@ -6,7 +6,7 @@ use rustc::hir::def::{DefKind, Res};
use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for `use Enum::*`.
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/enum_variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use crate::utils::{span_help_and_lint, span_lint};
use rustc::impl_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, Lint, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use syntax::ast::*;
use syntax::source_map::Span;
use syntax::symbol::Symbol;

declare_clippy_lint! {
/// **What it does:** Detects enumeration variants that are prefixed or suffixed
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/erasing_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use rustc::declare_lint_pass;
use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

use crate::consts::{constant_simple, Constant};
use crate::utils::span_lint;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use rustc::ty::layout::LayoutOf;
use rustc::ty::{self, Ty};
use rustc::util::nodemap::HirIdSet;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_typeck::expr_use_visitor::*;
use syntax::source_map::Span;

use crate::utils::span_lint;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for the use of `format!("string literal with no
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use rustc::ty::{self, Ty};
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_target::spec::abi::Abi;
use syntax::ast::Attribute;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for functions with too many parameters.
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/get_last_with_len.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use rustc::hir::{BinOpKind, Expr, ExprKind};
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Spanned;
use rustc_span::symbol::Symbol;
use syntax::ast::LitKind;
use syntax::source_map::Spanned;
use syntax::symbol::Symbol;

declare_clippy_lint! {
/// **What it does:** Checks for using `x.get(x.len() - 1)` instead of
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/identity_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

use crate::consts::{constant_simple, Constant};
use crate::utils::{clip, snippet, span_lint, unsext};
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/implicit_return.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc::{
};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for missing return statements at the end of a block.
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/len_zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use rustc::ty;
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::{Span, Spanned};
use syntax::ast::{LitKind, Name};
use syntax::source_map::{Span, Spanned};

declare_clippy_lint! {
/// **What it does:** Checks for getting the length of something via `.len()`
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use rustc::hir::*;
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use syntax::symbol::kw;
use rustc_span::source_map::Span;
use rustc_span::symbol::kw;

use crate::reexport::*;
use crate::utils::{last_path_segment, span_lint, trait_ref_of_method};
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ use crate::utils::{is_type_diagnostic_item, qpath_res, same_tys, sext, sugg};
use rustc::ty::{self, Ty};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::Applicability;
use rustc_span::source_map::Span;
use rustc_span::{BytePos, Symbol};
use rustc_typeck::expr_use_visitor::*;
use std::iter::{once, Iterator};
use std::mem;
use syntax::ast;
use syntax::source_map::Span;

use crate::utils::paths;
use crate::utils::{
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/main_recursion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use rustc::hir::{Crate, Expr, ExprKind, QPath};
use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::symbol::sym;
use syntax::ast::AttrKind;
use syntax::symbol::sym;

use crate::utils::{is_entrypoint_fn, snippet, span_help_and_lint};
use if_chain::if_chain;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/map_clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::Ident;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for usage of `iterator.map(|x| x.clone())` and suggests
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/map_unit_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::{self, Ty};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for usage of `option.map(f)` where f is a function
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintC
use rustc::ty::{self, Ty};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use std::cmp::Ordering;
use std::collections::Bound;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for matches with a single arm where an `if let`
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/mem_replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rustc::hir::{BorrowKind, Expr, ExprKind, Mutability, QPath};
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for `mem::replace()` on an `Option` with
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use rustc::lint::{in_external_macro, LateContext, LateLintPass, Lint, LintArray,
use rustc::ty::{self, Predicate, Ty};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::symbol::{sym, Symbol, SymbolStr};
use syntax::ast;
use syntax::source_map::Span;
use syntax::symbol::{sym, Symbol, SymbolStr};

use crate::utils::usage::mutated_variables;
use crate::utils::{
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/option_map_unwrap_or.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use rustc::hir::{self, *};
use rustc::lint::LateContext;
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::Applicability;
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use syntax::source_map::Span;

use super::OPTION_MAP_UNWRAP_OR;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::{ExpnKind, Span};
use syntax::ast::LitKind;
use syntax::source_map::{ExpnKind, Span};

use crate::consts::{constant, Constant};
use crate::utils::sugg::Sugg;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/misc_early.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use rustc::lint::{in_external_macro, EarlyContext, EarlyLintPass, LintArray, Lin
use rustc_data_structures::fx::FxHashMap;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::*;
use syntax::source_map::Span;
use syntax::visit::{walk_expr, FnKind, Visitor};

declare_clippy_lint! {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/missing_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc::ty;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::{self, MetaItem, MetaItemKind};
use syntax::attr;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Warns if there is missing doc for any documentable item
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/missing_inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use rustc::declare_lint_pass;
use rustc::hir;
use rustc::lint::{self, LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** it lints if an exported function, method, trait method with default impl,
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/multiple_crate_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use crate::utils::span_lint;
use rustc::declare_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::{ast::*, source_map::DUMMY_SP};
use rustc_span::source_map::DUMMY_SP;
use syntax::ast::*;

use itertools::Itertools;

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/mut_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rustc::hir;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::{Adt, Dynamic, Opaque, Param, RawPtr, Ref, Ty, TypeAndMut};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for sets/maps with mutable key types.
Expand Down
Loading

0 comments on commit c5178e8

Please sign in to comment.