aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_plugins
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_plugins')
-rw-r--r--components/script_plugins/lib.rs9
-rw-r--r--components/script_plugins/trace_in_no_trace.rs4
-rw-r--r--components/script_plugins/unrooted_must_root.rs10
3 files changed, 9 insertions, 14 deletions
diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs
index 30fa2dd67b9..4d475637ee8 100644
--- a/components/script_plugins/lib.rs
+++ b/components/script_plugins/lib.rs
@@ -28,16 +28,13 @@ use rustc_ast::Mutability;
use rustc_driver::plugin::Registry;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
-use rustc_hir::PrimTy;
-use rustc_hir::{ImplItemRef, ItemKind, Node, OwnerId, TraitItemRef};
+use rustc_hir::{ImplItemRef, ItemKind, Node, OwnerId, PrimTy, TraitItemRef};
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use rustc_infer::infer::TyCtxtInferExt;
use rustc_lint::LateContext;
-use rustc_middle::ty::TyCtxt;
-use rustc_middle::ty::{self, GenericArg, ParamEnv, Ty, TypeVisitable};
+use rustc_middle::ty::{self, GenericArg, ParamEnv, Ty, TyCtxt, TypeVisitable};
use rustc_span::source_map::{ExpnKind, MacroKind, Span};
-use rustc_span::symbol::Ident;
-use rustc_span::symbol::Symbol;
+use rustc_span::symbol::{Ident, Symbol};
use rustc_span::DUMMY_SP;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_type_ir::{FloatTy, IntTy, UintTy};
diff --git a/components/script_plugins/trace_in_no_trace.rs b/components/script_plugins/trace_in_no_trace.rs
index fa5b9ef0444..50349cfcfbd 100644
--- a/components/script_plugins/trace_in_no_trace.rs
+++ b/components/script_plugins/trace_in_no_trace.rs
@@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-use crate::{get_trait_def_id, implements_trait, symbols};
-
use rustc_ast::ast::{AttrKind, Attribute};
use rustc_ast::token::TokenKind;
use rustc_ast::tokenstream::TokenTree;
@@ -16,6 +14,8 @@ use rustc_middle::ty;
use rustc_session::declare_lint;
use rustc_span::symbol::Symbol;
+use crate::{get_trait_def_id, implements_trait, symbols};
+
declare_lint!(
TRACE_IN_NO_TRACE,
Deny,
diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs
index 4e7b57c26a1..90728d64cfa 100644
--- a/components/script_plugins/unrooted_must_root.rs
+++ b/components/script_plugins/unrooted_must_root.rs
@@ -2,19 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-use crate::{in_derive_expn, match_def_path, symbols};
-
use rustc_ast::ast::{AttrKind, Attribute};
use rustc_driver::plugin::Registry;
-use rustc_hir::intravisit as visit;
-use rustc_hir::{self as hir, ExprKind};
+use rustc_hir::{self as hir, intravisit as visit, ExprKind};
use rustc_lint::{LateContext, LateLintPass, LintContext, LintPass};
use rustc_middle::ty;
use rustc_session::declare_lint;
use rustc_span::def_id::LocalDefId;
use rustc_span::source_map;
-use rustc_span::symbol::sym;
-use rustc_span::symbol::Symbol;
+use rustc_span::symbol::{sym, Symbol};
+
+use crate::{in_derive_expn, match_def_path, symbols};
declare_lint!(
UNROOTED_MUST_ROOT,