From c5178e82b4ed8fd9210e382dcd2735d438957434 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Sat, 4 Jan 2020 11:00:00 +0100 Subject: [PATCH] Rustup to https://github.com/rust-lang/rust/pull/67853 Specifically caused by https://github.com/rust-lang/rust/pull/67786 --- clippy_lints/src/approx_const.rs | 2 +- clippy_lints/src/arithmetic.rs | 2 +- clippy_lints/src/attrs.rs | 2 +- clippy_lints/src/bit_mask.rs | 2 +- clippy_lints/src/booleans.rs | 2 +- clippy_lints/src/cargo_common_metadata.rs | 3 ++- clippy_lints/src/cognitive_complexity.rs | 2 +- clippy_lints/src/copies.rs | 2 +- clippy_lints/src/dbg_macro.rs | 2 +- clippy_lints/src/derive.rs | 2 +- clippy_lints/src/doc.rs | 2 +- clippy_lints/src/double_comparison.rs | 2 +- clippy_lints/src/duration_subsec.rs | 2 +- clippy_lints/src/entry.rs | 2 +- clippy_lints/src/enum_glob_use.rs | 2 +- clippy_lints/src/enum_variants.rs | 4 ++-- clippy_lints/src/erasing_op.rs | 2 +- clippy_lints/src/escape.rs | 2 +- clippy_lints/src/format.rs | 2 +- clippy_lints/src/functions.rs | 2 +- clippy_lints/src/get_last_with_len.rs | 4 ++-- clippy_lints/src/identity_op.rs | 2 +- clippy_lints/src/implicit_return.rs | 2 +- clippy_lints/src/len_zero.rs | 2 +- clippy_lints/src/lifetimes.rs | 4 ++-- clippy_lints/src/loops.rs | 2 +- clippy_lints/src/main_recursion.rs | 2 +- clippy_lints/src/map_clone.rs | 2 +- clippy_lints/src/map_unit_fn.rs | 2 +- clippy_lints/src/matches.rs | 2 +- clippy_lints/src/mem_replace.rs | 2 +- clippy_lints/src/methods/mod.rs | 4 ++-- clippy_lints/src/methods/option_map_unwrap_or.rs | 2 +- clippy_lints/src/misc.rs | 2 +- clippy_lints/src/misc_early.rs | 2 +- clippy_lints/src/missing_doc.rs | 2 +- clippy_lints/src/missing_inline.rs | 2 +- clippy_lints/src/multiple_crate_versions.rs | 3 ++- clippy_lints/src/mut_key.rs | 2 +- clippy_lints/src/needless_bool.rs | 2 +- clippy_lints/src/needless_continue.rs | 2 +- clippy_lints/src/neg_multiply.rs | 2 +- clippy_lints/src/new_without_default.rs | 2 +- clippy_lints/src/non_expressive_names.rs | 4 ++-- clippy_lints/src/open_options.rs | 2 +- clippy_lints/src/precedence.rs | 2 +- clippy_lints/src/ptr.rs | 2 +- clippy_lints/src/ranges.rs | 2 +- clippy_lints/src/redundant_clone.rs | 2 +- clippy_lints/src/redundant_static_lifetimes.rs | 2 +- clippy_lints/src/regex.rs | 2 +- clippy_lints/src/returns.rs | 2 +- clippy_lints/src/shadow.rs | 2 +- clippy_lints/src/strings.rs | 2 +- clippy_lints/src/tabs_in_doc_comments.rs | 2 +- clippy_lints/src/types.rs | 4 ++-- clippy_lints/src/unicode.rs | 2 +- clippy_lints/src/unsafe_removed_from_name.rs | 4 ++-- clippy_lints/src/unwrap.rs | 2 +- clippy_lints/src/utils/conf.rs | 3 ++- clippy_lints/src/utils/diagnostics.rs | 2 +- clippy_lints/src/utils/internal_lints.rs | 2 +- clippy_lints/src/utils/mod.rs | 4 ++-- clippy_lints/src/utils/ptr.rs | 2 +- clippy_lints/src/utils/sugg.rs | 2 +- clippy_lints/src/utils/sym.rs | 2 +- clippy_lints/src/vec.rs | 2 +- clippy_lints/src/wildcard_dependencies.rs | 3 ++- clippy_lints/src/write.rs | 2 +- tests/matches.rs | 4 ++-- 70 files changed, 83 insertions(+), 79 deletions(-) diff --git a/clippy_lints/src/approx_const.rs b/clippy_lints/src/approx_const.rs index 68582ecddf75..b73a40d3badb 100644 --- a/clippy_lints/src/approx_const.rs +++ b/clippy_lints/src/approx_const.rs @@ -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 diff --git a/clippy_lints/src/arithmetic.rs b/clippy_lints/src/arithmetic.rs index cff9a590e121..dc7a0c63307d 100644 --- a/clippy_lints/src/arithmetic.rs +++ b/clippy_lints/src/arithmetic.rs @@ -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. diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index 2336e1022d64..b1a364b44270 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -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! { diff --git a/clippy_lints/src/bit_mask.rs b/clippy_lints/src/bit_mask.rs index 0d8329c65918..ea7f1054fa17 100644 --- a/clippy_lints/src/bit_mask.rs +++ b/clippy_lints/src/bit_mask.rs @@ -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. diff --git a/clippy_lints/src/booleans.rs b/clippy_lints/src/booleans.rs index 802ed6ec8e4b..4029d5cabfe6 100644 --- a/clippy_lints/src/booleans.rs +++ b/clippy_lints/src/booleans.rs @@ -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 diff --git a/clippy_lints/src/cargo_common_metadata.rs b/clippy_lints/src/cargo_common_metadata.rs index 15457e578608..aa068d834b16 100644 --- a/clippy_lints/src/cargo_common_metadata.rs +++ b/clippy_lints/src/cargo_common_metadata.rs @@ -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 diff --git a/clippy_lints/src/cognitive_complexity.rs b/clippy_lints/src/cognitive_complexity.rs index 6eb643c392d7..d766d26dfd95 100644 --- a/clippy_lints/src/cognitive_complexity.rs +++ b/clippy_lints/src/cognitive_complexity.rs @@ -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}; diff --git a/clippy_lints/src/copies.rs b/clippy_lints/src/copies.rs index e5f770539c33..eab7ffca9db4 100644 --- a/clippy_lints/src/copies.rs +++ b/clippy_lints/src/copies.rs @@ -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. diff --git a/clippy_lints/src/dbg_macro.rs b/clippy_lints/src/dbg_macro.rs index 48fc601e726c..fa19e55af3ab 100644 --- a/clippy_lints/src/dbg_macro.rs +++ b/clippy_lints/src/dbg_macro.rs @@ -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! { diff --git a/clippy_lints/src/derive.rs b/clippy_lints/src/derive.rs index dd6e826a3a25..a1a8208241c8 100644 --- a/clippy_lints/src/derive.rs +++ b/clippy_lints/src/derive.rs @@ -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` diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 6b07ee32c52c..cc662806e85f 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -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! { diff --git a/clippy_lints/src/double_comparison.rs b/clippy_lints/src/double_comparison.rs index 5cadf41fd1b9..d9035421383e 100644 --- a/clippy_lints/src/double_comparison.rs +++ b/clippy_lints/src/double_comparison.rs @@ -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}; diff --git a/clippy_lints/src/duration_subsec.rs b/clippy_lints/src/duration_subsec.rs index cf8d0f542ad0..6025ce0b2c8c 100644 --- a/clippy_lints/src/duration_subsec.rs +++ b/clippy_lints/src/duration_subsec.rs @@ -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; diff --git a/clippy_lints/src/entry.rs b/clippy_lints/src/entry.rs index 1d935d2a448e..ebd95e5d5b00 100644 --- a/clippy_lints/src/entry.rs +++ b/clippy_lints/src/entry.rs @@ -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` diff --git a/clippy_lints/src/enum_glob_use.rs b/clippy_lints/src/enum_glob_use.rs index 7f4f1d85941d..22e19f5cf9ab 100644 --- a/clippy_lints/src/enum_glob_use.rs +++ b/clippy_lints/src/enum_glob_use.rs @@ -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::*`. diff --git a/clippy_lints/src/enum_variants.rs b/clippy_lints/src/enum_variants.rs index 46c8bbd953cd..9db9385d004d 100644 --- a/clippy_lints/src/enum_variants.rs +++ b/clippy_lints/src/enum_variants.rs @@ -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 diff --git a/clippy_lints/src/erasing_op.rs b/clippy_lints/src/erasing_op.rs index 6e10e0c1aa91..5819620d45ae 100644 --- a/clippy_lints/src/erasing_op.rs +++ b/clippy_lints/src/erasing_op.rs @@ -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; diff --git a/clippy_lints/src/escape.rs b/clippy_lints/src/escape.rs index 4f0fde8fbe98..0788b4c90210 100644 --- a/clippy_lints/src/escape.rs +++ b/clippy_lints/src/escape.rs @@ -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; diff --git a/clippy_lints/src/format.rs b/clippy_lints/src/format.rs index 9f7a11332c36..043aedd0efaa 100644 --- a/clippy_lints/src/format.rs +++ b/clippy_lints/src/format.rs @@ -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 diff --git a/clippy_lints/src/functions.rs b/clippy_lints/src/functions.rs index 81f199de5f92..3afc631571da 100644 --- a/clippy_lints/src/functions.rs +++ b/clippy_lints/src/functions.rs @@ -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. diff --git a/clippy_lints/src/get_last_with_len.rs b/clippy_lints/src/get_last_with_len.rs index 8ee3b75c9593..c56fde869227 100644 --- a/clippy_lints/src/get_last_with_len.rs +++ b/clippy_lints/src/get_last_with_len.rs @@ -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 diff --git a/clippy_lints/src/identity_op.rs b/clippy_lints/src/identity_op.rs index 5f9e0aecb19e..6fe33d352a49 100644 --- a/clippy_lints/src/identity_op.rs +++ b/clippy_lints/src/identity_op.rs @@ -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}; diff --git a/clippy_lints/src/implicit_return.rs b/clippy_lints/src/implicit_return.rs index b326fe24d553..be1c80a5ac18 100644 --- a/clippy_lints/src/implicit_return.rs +++ b/clippy_lints/src/implicit_return.rs @@ -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. diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs index 6508e7ec4f6c..9463c14379f6 100644 --- a/clippy_lints/src/len_zero.rs +++ b/clippy_lints/src/len_zero.rs @@ -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()` diff --git a/clippy_lints/src/lifetimes.rs b/clippy_lints/src/lifetimes.rs index 89bbd766c381..93325ff2d037 100644 --- a/clippy_lints/src/lifetimes.rs +++ b/clippy_lints/src/lifetimes.rs @@ -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}; diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index 5ce35fe89e77..764dbdef4dce 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -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::{ diff --git a/clippy_lints/src/main_recursion.rs b/clippy_lints/src/main_recursion.rs index affa20c885f5..324bdcd3e242 100644 --- a/clippy_lints/src/main_recursion.rs +++ b/clippy_lints/src/main_recursion.rs @@ -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; diff --git a/clippy_lints/src/map_clone.rs b/clippy_lints/src/map_clone.rs index 755794a5f112..d705a69743b4 100644 --- a/clippy_lints/src/map_clone.rs +++ b/clippy_lints/src/map_clone.rs @@ -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 diff --git a/clippy_lints/src/map_unit_fn.rs b/clippy_lints/src/map_unit_fn.rs index bedce8d9c893..156de9bc748a 100644 --- a/clippy_lints/src/map_unit_fn.rs +++ b/clippy_lints/src/map_unit_fn.rs @@ -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 diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index b0d38d179b5c..68571115ee2c 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -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` diff --git a/clippy_lints/src/mem_replace.rs b/clippy_lints/src/mem_replace.rs index 5a1e3b73ded7..d00ee4940d7e 100644 --- a/clippy_lints/src/mem_replace.rs +++ b/clippy_lints/src/mem_replace.rs @@ -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 diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 71eb2e250c74..d0021d129675 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -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::{ diff --git a/clippy_lints/src/methods/option_map_unwrap_or.rs b/clippy_lints/src/methods/option_map_unwrap_or.rs index 5a47f7d24619..696f74d36dba 100644 --- a/clippy_lints/src/methods/option_map_unwrap_or.rs +++ b/clippy_lints/src/methods/option_map_unwrap_or.rs @@ -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; diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs index 289295c43a12..2dbf88c76bf4 100644 --- a/clippy_lints/src/misc.rs +++ b/clippy_lints/src/misc.rs @@ -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; diff --git a/clippy_lints/src/misc_early.rs b/clippy_lints/src/misc_early.rs index f78e35948626..376d0593faef 100644 --- a/clippy_lints/src/misc_early.rs +++ b/clippy_lints/src/misc_early.rs @@ -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! { diff --git a/clippy_lints/src/missing_doc.rs b/clippy_lints/src/missing_doc.rs index b9825ebe4f7c..9972c922d516 100644 --- a/clippy_lints/src/missing_doc.rs +++ b/clippy_lints/src/missing_doc.rs @@ -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 diff --git a/clippy_lints/src/missing_inline.rs b/clippy_lints/src/missing_inline.rs index 790f070e4940..dab5bee3ffe7 100644 --- a/clippy_lints/src/missing_inline.rs +++ b/clippy_lints/src/missing_inline.rs @@ -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, diff --git a/clippy_lints/src/multiple_crate_versions.rs b/clippy_lints/src/multiple_crate_versions.rs index 79caf4f5552b..4965352e49ee 100644 --- a/clippy_lints/src/multiple_crate_versions.rs +++ b/clippy_lints/src/multiple_crate_versions.rs @@ -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; diff --git a/clippy_lints/src/mut_key.rs b/clippy_lints/src/mut_key.rs index 62aa79bb95a4..92e2f353962f 100644 --- a/clippy_lints/src/mut_key.rs +++ b/clippy_lints/src/mut_key.rs @@ -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. diff --git a/clippy_lints/src/needless_bool.rs b/clippy_lints/src/needless_bool.rs index a9fc033f7245..0fe3301ae283 100644 --- a/clippy_lints/src/needless_bool.rs +++ b/clippy_lints/src/needless_bool.rs @@ -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::Spanned; use syntax::ast::LitKind; -use syntax::source_map::Spanned; declare_clippy_lint! { /// **What it does:** Checks for expressions of the form `if c { true } else { diff --git a/clippy_lints/src/needless_continue.rs b/clippy_lints/src/needless_continue.rs index 537c2d65934c..e5ba77d21f69 100644 --- a/clippy_lints/src/needless_continue.rs +++ b/clippy_lints/src/needless_continue.rs @@ -36,9 +36,9 @@ use rustc::declare_lint_pass; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; use rustc_session::declare_tool_lint; +use rustc_span::source_map::{original_sp, DUMMY_SP}; use std::borrow::Cow; use syntax::ast; -use syntax::source_map::{original_sp, DUMMY_SP}; use crate::utils::{snippet, snippet_block, span_help_and_lint, trim_multiline}; diff --git a/clippy_lints/src/neg_multiply.rs b/clippy_lints/src/neg_multiply.rs index fbdf5d8c132b..1be437805e34 100644 --- a/clippy_lints/src/neg_multiply.rs +++ b/clippy_lints/src/neg_multiply.rs @@ -3,7 +3,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::{self, Constant}; use crate::utils::span_lint; diff --git a/clippy_lints/src/new_without_default.rs b/clippy_lints/src/new_without_default.rs index fea21ab1c46b..d594e85a84a9 100644 --- a/clippy_lints/src/new_without_default.rs +++ b/clippy_lints/src/new_without_default.rs @@ -10,7 +10,7 @@ use rustc::ty::{self, Ty}; use rustc::util::nodemap::HirIdSet; 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 types with a `fn new() -> Self` method and no diff --git a/clippy_lints/src/non_expressive_names.rs b/clippy_lints/src/non_expressive_names.rs index 6ff43d5322df..03d0a9a6a563 100644 --- a/clippy_lints/src/non_expressive_names.rs +++ b/clippy_lints/src/non_expressive_names.rs @@ -2,11 +2,11 @@ use crate::utils::{span_lint, span_lint_and_then}; use rustc::impl_lint_pass; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; use rustc_session::declare_tool_lint; +use rustc_span::source_map::Span; +use rustc_span::symbol::SymbolStr; use std::cmp::Ordering; use syntax::ast::*; use syntax::attr; -use syntax::source_map::Span; -use syntax::symbol::SymbolStr; use syntax::visit::{walk_block, walk_expr, walk_pat, Visitor}; declare_clippy_lint! { diff --git a/clippy_lints/src/open_options.rs b/clippy_lints/src/open_options.rs index 545def3567e0..eeefa2ffcf59 100644 --- a/clippy_lints/src/open_options.rs +++ b/clippy_lints/src/open_options.rs @@ -3,8 +3,8 @@ use rustc::declare_lint_pass; use rustc::hir::{Expr, ExprKind}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; use rustc_session::declare_tool_lint; +use rustc_span::source_map::{Span, Spanned}; use syntax::ast::LitKind; -use syntax::source_map::{Span, Spanned}; declare_clippy_lint! { /// **What it does:** Checks for duplicate open options as well as combinations diff --git a/clippy_lints/src/precedence.rs b/clippy_lints/src/precedence.rs index f259f9fb071e..37901a0b1b46 100644 --- a/clippy_lints/src/precedence.rs +++ b/clippy_lints/src/precedence.rs @@ -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::Spanned; use syntax::ast::*; -use syntax::source_map::Spanned; declare_clippy_lint! { /// **What it does:** Checks for operations where precedence may be unclear diff --git a/clippy_lints/src/ptr.rs b/clippy_lints/src/ptr.rs index db7fbf7083dd..e1c54f6ed377 100644 --- a/clippy_lints/src/ptr.rs +++ b/clippy_lints/src/ptr.rs @@ -13,9 +13,9 @@ 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 rustc_span::{MultiSpan, Symbol}; use std::borrow::Cow; -use syntax::source_map::Span; declare_clippy_lint! { /// **What it does:** This lint checks for function arguments of type `&String` diff --git a/clippy_lints/src/ranges.rs b/clippy_lints/src/ranges.rs index 11cb1d398503..5954ceab7219 100644 --- a/clippy_lints/src/ranges.rs +++ b/clippy_lints/src/ranges.rs @@ -4,8 +4,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::Spanned; use syntax::ast::RangeLimits; -use syntax::source_map::Spanned; use crate::utils::sugg::Sugg; use crate::utils::{higher, SpanlessEq}; diff --git a/clippy_lints/src/redundant_clone.rs b/clippy_lints/src/redundant_clone.rs index 043c344ed5ff..27f44024cd4b 100644 --- a/clippy_lints/src/redundant_clone.rs +++ b/clippy_lints/src/redundant_clone.rs @@ -20,8 +20,8 @@ use rustc_mir::dataflow::{ do_dataflow, BitDenotation, BottomValue, DataflowResults, DataflowResultsCursor, DebugFormatted, GenKillSet, }; use rustc_session::declare_tool_lint; +use rustc_span::source_map::{BytePos, Span}; use std::convert::TryFrom; -use syntax::source_map::{BytePos, Span}; macro_rules! unwrap_or_continue { ($x:expr) => { diff --git a/clippy_lints/src/redundant_static_lifetimes.rs b/clippy_lints/src/redundant_static_lifetimes.rs index 18bf3ed216a8..12c530cf221f 100644 --- a/clippy_lints/src/redundant_static_lifetimes.rs +++ b/clippy_lints/src/redundant_static_lifetimes.rs @@ -51,7 +51,7 @@ impl RedundantStaticLifetimes { if let Some(lifetime) = *optional_lifetime { match borrow_type.ty.kind { TyKind::Path(..) | TyKind::Slice(..) | TyKind::Array(..) | TyKind::Tup(..) => { - if lifetime.ident.name == syntax::symbol::kw::StaticLifetime { + if lifetime.ident.name == rustc_span::symbol::kw::StaticLifetime { let snip = snippet(cx, borrow_type.ty.span, ""); let sugg = format!("&{}", snip); span_lint_and_then(cx, REDUNDANT_STATIC_LIFETIMES, lifetime.ident.span, reason, |db| { diff --git a/clippy_lints/src/regex.rs b/clippy_lints/src/regex.rs index 76a317d7505a..caca4f910e57 100644 --- a/clippy_lints/src/regex.rs +++ b/clippy_lints/src/regex.rs @@ -6,9 +6,9 @@ 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, Span}; use std::convert::TryFrom; use syntax::ast::{LitKind, StrStyle}; -use syntax::source_map::{BytePos, Span}; declare_clippy_lint! { /// **What it does:** Checks [regex](https://crates.io/crates/regex) creation diff --git a/clippy_lints/src/returns.rs b/clippy_lints/src/returns.rs index 9fb2caaefbdf..96e9fb2c409b 100644 --- a/clippy_lints/src/returns.rs +++ b/clippy_lints/src/returns.rs @@ -3,9 +3,9 @@ use rustc::declare_lint_pass; use rustc::lint::{in_external_macro, EarlyContext, EarlyLintPass, LintArray, LintContext, LintPass}; use rustc_errors::Applicability; use rustc_session::declare_tool_lint; +use rustc_span::source_map::Span; use rustc_span::BytePos; use syntax::ast; -use syntax::source_map::Span; use syntax::visit::FnKind; use crate::utils::{match_path_ast, snippet_opt, span_lint_and_then}; diff --git a/clippy_lints/src/shadow.rs b/clippy_lints/src/shadow.rs index fc59ec3a3fe1..a6673772bc45 100644 --- a/clippy_lints/src/shadow.rs +++ b/clippy_lints/src/shadow.rs @@ -6,7 +6,7 @@ use rustc::hir::*; use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass}; use rustc::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 bindings that shadow other bindings already in diff --git a/clippy_lints/src/strings.rs b/clippy_lints/src/strings.rs index 46c3e50140f0..d09d7279c745 100644 --- a/clippy_lints/src/strings.rs +++ b/clippy_lints/src/strings.rs @@ -3,7 +3,7 @@ use rustc::hir::*; use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass}; use rustc_errors::Applicability; use rustc_session::declare_tool_lint; -use syntax::source_map::Spanned; +use rustc_span::source_map::Spanned; use if_chain::if_chain; diff --git a/clippy_lints/src/tabs_in_doc_comments.rs b/clippy_lints/src/tabs_in_doc_comments.rs index 8a46bcc5825f..d6e0ab183c33 100644 --- a/clippy_lints/src/tabs_in_doc_comments.rs +++ b/clippy_lints/src/tabs_in_doc_comments.rs @@ -3,9 +3,9 @@ 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::{BytePos, Span}; use std::convert::TryFrom; use syntax::ast; -use syntax::source_map::{BytePos, Span}; declare_clippy_lint! { /// **What it does:** Checks doc comments for usage of tab characters. diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 3f865ff49713..1a14d81299cf 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -15,12 +15,12 @@ use rustc::{declare_lint_pass, impl_lint_pass}; use rustc_errors::Applicability; use rustc_session::declare_tool_lint; use rustc_span::hygiene::{ExpnKind, MacroKind}; +use rustc_span::source_map::Span; +use rustc_span::symbol::{sym, Symbol}; use rustc_target::spec::abi::Abi; use rustc_typeck::hir_ty_to_ty; use syntax::ast::{FloatTy, IntTy, LitFloatType, LitIntType, LitKind, UintTy}; use syntax::errors::DiagnosticBuilder; -use syntax::source_map::Span; -use syntax::symbol::{sym, Symbol}; use crate::consts::{constant, Constant}; use crate::utils::paths; diff --git a/clippy_lints/src/unicode.rs b/clippy_lints/src/unicode.rs index 992b8d80c20d..8b4d282130c8 100644 --- a/clippy_lints/src/unicode.rs +++ b/clippy_lints/src/unicode.rs @@ -4,8 +4,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; use unicode_normalization::UnicodeNormalization; declare_clippy_lint! { diff --git a/clippy_lints/src/unsafe_removed_from_name.rs b/clippy_lints/src/unsafe_removed_from_name.rs index 58af6e9d2814..e4b0a3773969 100644 --- a/clippy_lints/src/unsafe_removed_from_name.rs +++ b/clippy_lints/src/unsafe_removed_from_name.rs @@ -2,9 +2,9 @@ use crate::utils::span_lint; use rustc::declare_lint_pass; use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; use rustc_session::declare_tool_lint; +use rustc_span::source_map::Span; +use rustc_span::symbol::SymbolStr; use syntax::ast::*; -use syntax::source_map::Span; -use syntax::symbol::SymbolStr; declare_clippy_lint! { /// **What it does:** Checks for imports that remove "unsafe" from an item's diff --git a/clippy_lints/src/unwrap.rs b/clippy_lints/src/unwrap.rs index a5634cc6073b..1a0ac91e17f9 100644 --- a/clippy_lints/src/unwrap.rs +++ b/clippy_lints/src/unwrap.rs @@ -6,7 +6,7 @@ use rustc_session::declare_tool_lint; use crate::utils::{higher::if_block, match_type, paths, span_lint_and_then, usage::is_potentially_mutated}; use rustc::hir::intravisit::*; use rustc::hir::*; -use syntax::source_map::Span; +use rustc_span::source_map::Span; declare_clippy_lint! { /// **What it does:** Checks for calls of `unwrap[_err]()` that cannot fail. diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs index 52223aa7a4bc..33435e6b253a 100644 --- a/clippy_lints/src/utils/conf.rs +++ b/clippy_lints/src/utils/conf.rs @@ -3,11 +3,12 @@ #![deny(clippy::missing_docs_in_private_items)] use lazy_static::lazy_static; +use rustc_span::source_map; use std::default::Default; use std::io::Read; use std::sync::Mutex; use std::{env, fmt, fs, io, path}; -use syntax::{ast, source_map}; +use syntax::ast; /// Gets the configuration file from arguments. pub fn file_from_args(args: &[ast::NestedMetaItem]) -> Result, (&'static str, source_map::Span)> { diff --git a/clippy_lints/src/utils/diagnostics.rs b/clippy_lints/src/utils/diagnostics.rs index 6210cebfe9a0..19992114ff7c 100644 --- a/clippy_lints/src/utils/diagnostics.rs +++ b/clippy_lints/src/utils/diagnostics.rs @@ -3,9 +3,9 @@ use rustc::hir::HirId; use rustc::lint::{LateContext, Lint, LintContext}; use rustc_errors::{Applicability, CodeSuggestion, Substitution, SubstitutionPart, SuggestionStyle}; +use rustc_span::source_map::{MultiSpan, Span}; use std::env; use syntax::errors::DiagnosticBuilder; -use syntax::source_map::{MultiSpan, Span}; /// Wrapper around `DiagnosticBuilder` that adds a link to Clippy documentation for the emitted lint struct DiagnosticWrapper<'a>(DiagnosticBuilder<'a>); diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs index c61b6faa9325..b7eb1ae7c9d7 100644 --- a/clippy_lints/src/utils/internal_lints.rs +++ b/clippy_lints/src/utils/internal_lints.rs @@ -12,10 +12,10 @@ use rustc::{declare_lint_pass, impl_lint_pass}; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_errors::Applicability; use rustc_session::declare_tool_lint; +use rustc_span::source_map::Span; use rustc_span::symbol::SymbolStr; use syntax::ast; use syntax::ast::{Crate as AstCrate, ItemKind, Name}; -use syntax::source_map::Span; use syntax::visit::FnKind; declare_clippy_lint! { diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 98ab844aeee6..e83dc249d268 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -41,11 +41,11 @@ use rustc::ty::{ }; use rustc_errors::Applicability; use rustc_span::hygiene::ExpnKind; +use rustc_span::source_map::{Span, DUMMY_SP}; +use rustc_span::symbol::{kw, Symbol}; use smallvec::SmallVec; use syntax::ast::{self, Attribute, LitKind}; use syntax::attr; -use syntax::source_map::{Span, DUMMY_SP}; -use syntax::symbol::{kw, Symbol}; use crate::consts::{constant, Constant}; use crate::reexport::*; diff --git a/clippy_lints/src/utils/ptr.rs b/clippy_lints/src/utils/ptr.rs index 206ce7b4521f..de6a3227a77d 100644 --- a/clippy_lints/src/utils/ptr.rs +++ b/clippy_lints/src/utils/ptr.rs @@ -2,9 +2,9 @@ use crate::utils::{get_pat_name, match_var, snippet}; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use rustc::hir::*; use rustc::lint::LateContext; +use rustc_span::source_map::Span; use std::borrow::Cow; use syntax::ast::Name; -use syntax::source_map::Span; pub fn get_spans( cx: &LateContext<'_, '_>, diff --git a/clippy_lints/src/utils/sugg.rs b/clippy_lints/src/utils/sugg.rs index a817d2a9e860..0106217186be 100644 --- a/clippy_lints/src/utils/sugg.rs +++ b/clippy_lints/src/utils/sugg.rs @@ -6,13 +6,13 @@ use matches::matches; use rustc::hir; use rustc::lint::{EarlyContext, LateContext, LintContext}; use rustc_errors::Applicability; +use rustc_span::source_map::{CharPos, Span}; use rustc_span::{BytePos, Pos}; use std::borrow::Cow; use std::convert::TryInto; use std::fmt::Display; use syntax::ast; use syntax::print::pprust::token_kind_to_string; -use syntax::source_map::{CharPos, Span}; use syntax::token; use syntax::util::parser::AssocOp; diff --git a/clippy_lints/src/utils/sym.rs b/clippy_lints/src/utils/sym.rs index acd0763dbdc3..273288c3d52c 100644 --- a/clippy_lints/src/utils/sym.rs +++ b/clippy_lints/src/utils/sym.rs @@ -1,6 +1,6 @@ #[macro_export] macro_rules! sym { ($tt:tt) => { - syntax::symbol::Symbol::intern(stringify!($tt)) + rustc_span::symbol::Symbol::intern(stringify!($tt)) }; } diff --git a/clippy_lints/src/vec.rs b/clippy_lints/src/vec.rs index 091be3bc2936..ebde35bb0571 100644 --- a/clippy_lints/src/vec.rs +++ b/clippy_lints/src/vec.rs @@ -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 `&vec![..]` when using `&[..]` would diff --git a/clippy_lints/src/wildcard_dependencies.rs b/clippy_lints/src/wildcard_dependencies.rs index 0a302ce04ca8..30bd5195024b 100644 --- a/clippy_lints/src/wildcard_dependencies.rs +++ b/clippy_lints/src/wildcard_dependencies.rs @@ -2,7 +2,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 if_chain::if_chain; diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs index 7d492783bda9..f459040905f8 100644 --- a/clippy_lints/src/write.rs +++ b/clippy_lints/src/write.rs @@ -8,9 +8,9 @@ use rustc_errors::Applicability; use rustc_lexer::unescape::{self, EscapeError}; use rustc_parse::parser; use rustc_session::declare_tool_lint; +use rustc_span::symbol::Symbol; use rustc_span::{BytePos, Span}; use syntax::ast::*; -use syntax::symbol::Symbol; use syntax::token; use syntax::tokenstream::TokenStream; diff --git a/tests/matches.rs b/tests/matches.rs index 15a0ea503bf3..6691c074caf9 100644 --- a/tests/matches.rs +++ b/tests/matches.rs @@ -1,12 +1,12 @@ #![feature(rustc_private)] -extern crate syntax; +extern crate rustc_span; use std::collections::Bound; #[test] fn test_overlapping() { use clippy_lints::matches::overlapping; - use syntax::source_map::DUMMY_SP; + use rustc_span::source_map::DUMMY_SP; let sp = |s, e| clippy_lints::matches::SpannedRange { span: DUMMY_SP,