Rollup merge of #108363 - cjgillot:unused-crate, r=WaffleLapkin
Move the unused extern crate check back to the resolver. It doesn't have anything to do in `rustc_hir_typeck`.
This commit is contained in:
commit
660f184966
13 changed files with 186 additions and 196 deletions
|
@ -5,7 +5,7 @@ use rustc_errors::{
|
|||
error_code, Applicability, DiagnosticBuilder, ErrorGuaranteed, Handler, IntoDiagnostic,
|
||||
MultiSpan,
|
||||
};
|
||||
use rustc_macros::{Diagnostic, LintDiagnostic};
|
||||
use rustc_macros::Diagnostic;
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_span::{symbol::Ident, Span, Symbol};
|
||||
|
||||
|
@ -247,26 +247,6 @@ pub struct SubstsOnOverriddenImpl {
|
|||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(hir_analysis_unused_extern_crate)]
|
||||
pub struct UnusedExternCrate {
|
||||
#[suggestion(applicability = "machine-applicable", code = "")]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(hir_analysis_extern_crate_not_idiomatic)]
|
||||
pub struct ExternCrateNotIdiomatic {
|
||||
#[suggestion(
|
||||
style = "short",
|
||||
applicability = "machine-applicable",
|
||||
code = "{suggestion_code}"
|
||||
)]
|
||||
pub span: Span,
|
||||
pub msg_code: String,
|
||||
pub suggestion_code: String,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_const_impl_for_non_const_trait)]
|
||||
pub struct ConstImplForNonConstTrait {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue