]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/error.rs
impl SessionDiagnostic for LayoutError and Spanned<T>
[rust.git] / compiler / rustc_middle / src / error.rs
index 18b31a75bcc0da0d1f80566e23607e6564d59a49..a4ceb494569b1415ea73100fc8b71003dfe58498 100644 (file)
@@ -1,9 +1,9 @@
-use rustc_macros::SessionDiagnostic;
+use rustc_macros::Diagnostic;
 use rustc_span::Span;
 
 use crate::ty::Ty;
 
-#[derive(SessionDiagnostic)]
+#[derive(Diagnostic)]
 #[diag(middle::drop_check_overflow, code = "E0320")]
 #[note]
 pub struct DropCheckOverflow<'tcx> {
@@ -13,7 +13,7 @@ pub struct DropCheckOverflow<'tcx> {
     pub overflow_ty: Ty<'tcx>,
 }
 
-#[derive(SessionDiagnostic)]
+#[derive(Diagnostic)]
 #[diag(middle::opaque_hidden_type_mismatch)]
 pub struct OpaqueHiddenTypeMismatch<'tcx> {
     pub self_ty: Ty<'tcx>,
@@ -25,7 +25,7 @@ pub struct OpaqueHiddenTypeMismatch<'tcx> {
     pub sub: TypeMismatchReason,
 }
 
-#[derive(SessionSubdiagnostic)]
+#[derive(Subdiagnostic)]
 pub enum TypeMismatchReason {
     #[label(middle::conflict_types)]
     ConflictType {
@@ -39,7 +39,7 @@ pub enum TypeMismatchReason {
     },
 }
 
-#[derive(SessionDiagnostic)]
+#[derive(Diagnostic)]
 #[diag(middle::limit_invalid)]
 pub struct LimitInvalid<'a> {
     #[primary_span]