mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Remove extern crate rustc_session
from rustc_lint
.
This commit is contained in:
parent
6ce258f657
commit
e6b3e20243
@ -6,6 +6,7 @@ use rustc_hir as hir;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::adjustment::{Adjust, Adjustment};
|
||||
use rustc_session::lint::FutureIncompatibilityReason;
|
||||
use rustc_session::{declare_lint, impl_lint_pass};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
|
@ -2,6 +2,7 @@ use crate::lints::AsyncFnInTraitDiag;
|
||||
use crate::LateContext;
|
||||
use crate::LateLintPass;
|
||||
use rustc_hir as hir;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_trait_selection::traits::error_reporting::suggestions::suggest_desugaring_async_fn_to_impl_future_in_trait;
|
||||
|
||||
declare_lint! {
|
||||
|
@ -59,6 +59,7 @@ use rustc_middle::ty::ToPredicate;
|
||||
use rustc_middle::ty::TypeVisitableExt;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, VariantDef};
|
||||
use rustc_session::lint::{BuiltinLintDiag, FutureIncompatibilityReason};
|
||||
use rustc_session::{declare_lint, declare_lint_pass, impl_lint_pass};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
|
@ -6,6 +6,7 @@ use crate::{
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::lint::FutureIncompatibilityReason;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::sym;
|
||||
use rustc_trait_selection::traits::supertraits;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
use rustc_hir::{Arm, Expr, ExprKind, Node};
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::sym;
|
||||
|
||||
use crate::{
|
||||
|
@ -5,6 +5,7 @@ use crate::{
|
||||
};
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty::{visit::TypeVisitableExt, Ty};
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::{symbol::sym, Span};
|
||||
|
||||
declare_lint! {
|
||||
|
@ -10,6 +10,7 @@ use hir::{Expr, Pat};
|
||||
use rustc_hir as hir;
|
||||
use rustc_infer::{infer::TyCtxtInferExt, traits::ObligationCause};
|
||||
use rustc_middle::ty::{self, List};
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::{sym, Span};
|
||||
use rustc_trait_selection::traits::ObligationCtxt;
|
||||
|
||||
|
@ -5,6 +5,7 @@ use rustc_hir::def::DefKind;
|
||||
use rustc_middle::query::Providers;
|
||||
use rustc_middle::ty::layout::LayoutError;
|
||||
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
|
||||
use rustc_session::declare_lint;
|
||||
use rustc_span::{sym, Span, Symbol};
|
||||
use rustc_target::abi::FIRST_VARIANT;
|
||||
|
||||
|
@ -7,6 +7,7 @@ use crate::{
|
||||
};
|
||||
use ast::util::unicode::{contains_text_flow_control_chars, TEXT_FLOW_CONTROL_CHARS};
|
||||
use rustc_ast as ast;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::{BytePos, Span, Symbol};
|
||||
|
||||
declare_lint! {
|
||||
|
@ -2,6 +2,7 @@ use std::str::Utf8Error;
|
||||
|
||||
use rustc_ast::LitKind;
|
||||
use rustc_hir::{Expr, ExprKind};
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::sym;
|
||||
|
||||
|
@ -5,6 +5,7 @@ use crate::{
|
||||
use rustc_errors::MultiSpan;
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::{sym, Symbol};
|
||||
|
||||
declare_lint! {
|
||||
|
@ -42,8 +42,6 @@
|
||||
#[macro_use]
|
||||
extern crate rustc_middle;
|
||||
#[macro_use]
|
||||
extern crate rustc_session;
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
mod array_into_iter;
|
||||
|
@ -6,6 +6,7 @@ use rustc_middle::{
|
||||
query::Key,
|
||||
ty::{self, Ty},
|
||||
};
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
|
||||
declare_lint! {
|
||||
/// The `map_unit_fn` lint checks for `Iterator::map` receive
|
||||
|
@ -4,6 +4,7 @@ use crate::LateLintPass;
|
||||
use crate::LintContext;
|
||||
use rustc_hir::{Expr, ExprKind};
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::{symbol::sym, Span};
|
||||
|
||||
declare_lint! {
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::{LateContext, LateLintPass, LintContext};
|
||||
|
||||
use rustc_hir as hir;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::sym;
|
||||
|
||||
declare_lint! {
|
||||
|
@ -6,6 +6,7 @@ use crate::{EarlyContext, EarlyLintPass, LintContext};
|
||||
use rustc_ast as ast;
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use unicode_security::general_security_profile::IdentifierType;
|
||||
|
||||
|
@ -8,6 +8,7 @@ use rustc_middle::lint::in_external_macro;
|
||||
use rustc_middle::ty;
|
||||
use rustc_parse_format::{ParseMode, Parser, Piece};
|
||||
use rustc_session::lint::FutureIncompatibilityReason;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::{hygiene, sym, symbol::kw, InnerSpan, Span, Symbol};
|
||||
use rustc_trait_selection::infer::InferCtxtExt;
|
||||
|
@ -5,6 +5,7 @@ use rustc_infer::infer::InferCtxt;
|
||||
use rustc_infer::traits::{Obligation, ObligationCause};
|
||||
use rustc_middle::ty::{self, Binder, Ty, TyCtxt, TypeFoldable, TypeFolder};
|
||||
use rustc_middle::ty::{EarlyBinder, TraitRef, TypeSuperFoldable};
|
||||
use rustc_session::{declare_lint, impl_lint_pass};
|
||||
use rustc_span::def_id::{DefId, LOCAL_CRATE};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::{sym, symbol::kw, ExpnKind, MacroKind};
|
||||
|
@ -11,6 +11,7 @@ use rustc_hir::intravisit::FnKind;
|
||||
use rustc_hir::{GenericParamKind, PatKind};
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::config::CrateType;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::symbol::{sym, Ident};
|
||||
use rustc_span::{BytePos, Span};
|
||||
|
@ -8,6 +8,7 @@ use rustc_hir::def::DefKind;
|
||||
use rustc_hir::{Expr, ExprKind};
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::adjustment::Adjust;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
declare_lint! {
|
||||
|
@ -4,6 +4,7 @@ use rustc_macros::{LintDiagnostic, Subdiagnostic};
|
||||
use rustc_middle::ty::{
|
||||
self, fold::BottomUpFolder, print::TraitPredPrintModifiersAndPath, Ty, TypeFoldable,
|
||||
};
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::{symbol::kw, Span};
|
||||
use rustc_trait_selection::traits;
|
||||
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
|
||||
|
@ -4,6 +4,7 @@ use rustc_hir as hir;
|
||||
use rustc_hir::def::Res;
|
||||
use rustc_hir::{GenericArg, PathSegment, QPath, TyKind};
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
declare_tool_lint! {
|
||||
|
@ -1,5 +1,6 @@
|
||||
use crate::{lints::RedundantSemicolonsDiag, EarlyContext, EarlyLintPass, LintContext};
|
||||
use rustc_ast::{Block, StmtKind};
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::Span;
|
||||
|
||||
declare_lint! {
|
||||
|
@ -2,6 +2,7 @@ use rustc_ast::Mutability;
|
||||
use rustc_hir::{Expr, ExprKind, UnOp};
|
||||
use rustc_middle::ty::layout::LayoutOf as _;
|
||||
use rustc_middle::ty::{self, layout::TyAndLayout};
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::sym;
|
||||
|
||||
use crate::{lints::InvalidReferenceCastingDiag, LateContext, LateLintPass, LintContext};
|
||||
|
@ -3,6 +3,7 @@ use crate::LateContext;
|
||||
use crate::LateLintPass;
|
||||
use crate::LintContext;
|
||||
use rustc_hir as hir;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
declare_lint! {
|
||||
|
@ -22,6 +22,7 @@ use rustc_middle::ty::GenericArgsRef;
|
||||
use rustc_middle::ty::{
|
||||
self, AdtKind, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitableExt,
|
||||
};
|
||||
use rustc_session::{declare_lint, declare_lint_pass, impl_lint_pass};
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::source_map;
|
||||
use rustc_span::symbol::sym;
|
||||
|
@ -2,6 +2,7 @@ use crate::lints::UnitBindingsDiag;
|
||||
use crate::{LateLintPass, LintContext};
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
|
||||
declare_lint! {
|
||||
/// The `unit_bindings` lint detects cases where bindings are useless because they have
|
||||
|
@ -16,6 +16,7 @@ use rustc_hir::def_id::DefId;
|
||||
use rustc_infer::traits::util::elaborate;
|
||||
use rustc_middle::ty::adjustment;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_session::{declare_lint, declare_lint_pass, impl_lint_pass};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::symbol::{kw, sym};
|
||||
use rustc_span::{BytePos, Span};
|
||||
|
Loading…
Reference in New Issue
Block a user