diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index e8962c6e207..0aeadd1f1da 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -37,6 +37,8 @@ #[allow(unused_extern_crates)] extern crate syntax; #[allow(unused_extern_crates)] +extern crate syntax_expand; +#[allow(unused_extern_crates)] extern crate syntax_pos; use toml; diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs index 54962833b58..84afda30768 100644 --- a/clippy_lints/src/misc.rs +++ b/clippy_lints/src/misc.rs @@ -596,7 +596,7 @@ fn is_used(cx: &LateContext<'_, '_>, expr: &Expr) -> bool { /// Tests whether an expression is in a macro expansion (e.g., something /// generated by `#[derive(...)]` or the like). fn in_attributes_expansion(expr: &Expr) -> bool { - use syntax::ext::hygiene::MacroKind; + use syntax_expand::hygiene::MacroKind; if expr.span.from_expansion() { let data = expr.span.ctxt().outer_expn_data(); diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index be8165d51f5..ab29060cc36 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -17,10 +17,10 @@ use rustc_typeck::hir_ty_to_ty; use syntax::ast::{FloatTy, IntTy, LitIntType, LitKind, UintTy}; use syntax::errors::DiagnosticBuilder; -use syntax::ext::base::MacroKind; -use syntax::ext::hygiene::ExpnKind; use syntax::source_map::Span; use syntax::symbol::{sym, Symbol}; +use syntax_expand::base::MacroKind; +use syntax_expand::hygiene::ExpnKind; use crate::consts::{constant, Constant}; use crate::utils::paths; diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index a5e2f3dc4b4..417f7677bbd 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -43,9 +43,9 @@ use smallvec::SmallVec; use syntax::ast::{self, LitKind}; use syntax::attr; -use syntax::ext::hygiene::ExpnKind; use syntax::source_map::{Span, DUMMY_SP}; use syntax::symbol::{kw, Symbol}; +use syntax_expand::hygiene::ExpnKind; use crate::consts::{constant, Constant}; use crate::reexport::*;