Replace #[lint/warning/error] with #[diag]
This commit is contained in:
parent
bd0d3f745d
commit
7f3a6fd7f6
16 changed files with 446 additions and 390 deletions
|
@ -3,7 +3,7 @@ use rustc_middle::ty::Ty;
|
|||
use rustc_span::Span;
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[error(borrowck::move_unsized, code = "E0161")]
|
||||
#[diag(borrowck::move_unsized, code = "E0161")]
|
||||
pub(crate) struct MoveUnsized<'tcx> {
|
||||
pub ty: Ty<'tcx>,
|
||||
#[primary_span]
|
||||
|
@ -12,7 +12,7 @@ pub(crate) struct MoveUnsized<'tcx> {
|
|||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[error(borrowck::higher_ranked_lifetime_error)]
|
||||
#[diag(borrowck::higher_ranked_lifetime_error)]
|
||||
pub(crate) struct HigherRankedLifetimeError {
|
||||
#[subdiagnostic]
|
||||
pub cause: Option<HigherRankedErrorCause>,
|
||||
|
@ -29,14 +29,14 @@ pub(crate) enum HigherRankedErrorCause {
|
|||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[error(borrowck::higher_ranked_subtype_error)]
|
||||
#[diag(borrowck::higher_ranked_subtype_error)]
|
||||
pub(crate) struct HigherRankedSubtypeError {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[error(borrowck::generic_does_not_live_long_enough)]
|
||||
#[diag(borrowck::generic_does_not_live_long_enough)]
|
||||
pub(crate) struct GenericDoesNotLiveLongEnough {
|
||||
pub kind: String,
|
||||
#[primary_span]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue