1
Fork 0

UPDATE - rename DiagnosticHandler macro to Diagnostic

This commit is contained in:
Jhonny Bill Mena 2022-09-18 11:46:56 -04:00
parent 191fac6826
commit a3396b2070
34 changed files with 484 additions and 484 deletions

View file

@ -1,11 +1,11 @@
use rustc_errors::{IntoDiagnosticArg, MultiSpan};
use rustc_macros::{DiagnosticHandler, LintDiagnostic, SessionSubdiagnostic};
use rustc_macros::{Diagnostic, LintDiagnostic, SessionSubdiagnostic};
use rustc_middle::ty::Ty;
use rustc_span::Span;
use crate::diagnostics::RegionName;
#[derive(DiagnosticHandler)]
#[derive(Diagnostic)]
#[diag(borrowck::move_unsized, code = "E0161")]
pub(crate) struct MoveUnsized<'tcx> {
pub ty: Ty<'tcx>,
@ -14,7 +14,7 @@ pub(crate) struct MoveUnsized<'tcx> {
pub span: Span,
}
#[derive(DiagnosticHandler)]
#[derive(Diagnostic)]
#[diag(borrowck::higher_ranked_lifetime_error)]
pub(crate) struct HigherRankedLifetimeError {
#[subdiagnostic]
@ -31,14 +31,14 @@ pub(crate) enum HigherRankedErrorCause {
CouldNotNormalize { value: String },
}
#[derive(DiagnosticHandler)]
#[derive(Diagnostic)]
#[diag(borrowck::higher_ranked_subtype_error)]
pub(crate) struct HigherRankedSubtypeError {
#[primary_span]
pub span: Span,
}
#[derive(DiagnosticHandler)]
#[derive(Diagnostic)]
#[diag(borrowck::generic_does_not_live_long_enough)]
pub(crate) struct GenericDoesNotLiveLongEnough {
pub kind: String,
@ -53,7 +53,7 @@ pub(crate) struct VarNeedNotMut {
pub span: Span,
}
#[derive(DiagnosticHandler)]
#[derive(Diagnostic)]
#[diag(borrowck::const_not_used_in_type_alias)]
pub(crate) struct ConstNotUsedTraitAlias {
pub ct: String,
@ -61,7 +61,7 @@ pub(crate) struct ConstNotUsedTraitAlias {
pub span: Span,
}
#[derive(DiagnosticHandler)]
#[derive(Diagnostic)]
#[diag(borrowck::var_cannot_escape_closure)]
#[note]
#[note(borrowck::cannot_escape)]
@ -110,7 +110,7 @@ pub(crate) enum FnMutReturnTypeErr {
},
}
#[derive(DiagnosticHandler)]
#[derive(Diagnostic)]
#[diag(borrowck::lifetime_constraints_error)]
pub(crate) struct LifetimeOutliveErr {
#[primary_span]