Lint now-unnecessary associated type bounds

This commit is contained in:
Oli Scherer 2023-06-05 17:08:27 +00:00
parent ca581f9161
commit a49b736568
6 changed files with 102 additions and 4 deletions

View file

@ -5,7 +5,7 @@ use rustc_errors::{
error_code, Applicability, DiagnosticBuilder, ErrorGuaranteed, Handler, IntoDiagnostic,
MultiSpan,
};
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
use rustc_middle::ty::{self, print::TraitRefPrintOnlyTraitPath, Ty};
use rustc_span::{symbol::Ident, Span, Symbol};
@ -900,3 +900,11 @@ pub(crate) enum LateBoundInApit {
param_span: Span,
},
}
#[derive(LintDiagnostic)]
#[diag(hir_analysis_unused_associated_type_bounds)]
#[note]
pub struct UnusedAssociatedTypeBounds {
#[suggestion(code = "")]
pub span: Span,
}