summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_expand/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_expand/src/errors.rs')
-rw-r--r--compiler/rustc_expand/src/errors.rs43
1 files changed, 36 insertions, 7 deletions
diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs
index afe5169d3..e5102a952 100644
--- a/compiler/rustc_expand/src/errors.rs
+++ b/compiler/rustc_expand/src/errors.rs
@@ -65,7 +65,7 @@ pub(crate) struct MacroConstStability {
#[primary_span]
#[label]
pub span: Span,
- #[label(label2)]
+ #[label(expand_label2)]
pub head_span: Span,
}
@@ -75,7 +75,7 @@ pub(crate) struct MacroBodyStability {
#[primary_span]
#[label]
pub span: Span,
- #[label(label2)]
+ #[label(expand_label2)]
pub head_span: Span,
}
@@ -188,7 +188,7 @@ pub(crate) struct FeatureRemoved<'a> {
}
#[derive(Subdiagnostic)]
-#[note(reason)]
+#[note(expand_reason)]
pub(crate) struct FeatureRemovedReason<'a> {
pub reason: &'a str,
}
@@ -223,12 +223,12 @@ pub(crate) struct MalformedFeatureAttribute {
#[derive(Subdiagnostic)]
pub(crate) enum MalformedFeatureAttributeHelp {
- #[label(expected)]
+ #[label(expand_expected)]
Label {
#[primary_span]
span: Span,
},
- #[suggestion(expected, code = "{suggestion}", applicability = "maybe-incorrect")]
+ #[suggestion(expand_expected, code = "{suggestion}", applicability = "maybe-incorrect")]
Suggestion {
#[primary_span]
span: Span,
@@ -306,7 +306,7 @@ pub(crate) struct IncompleteParse<'a> {
pub kind_name: &'a str,
#[suggestion(
- suggestion_add_semi,
+ expand_suggestion_add_semi,
style = "verbose",
code = ";",
applicability = "maybe-incorrect"
@@ -340,7 +340,7 @@ pub(crate) struct ModuleInBlock {
}
#[derive(Subdiagnostic)]
-#[note(note)]
+#[note(expand_note)]
pub(crate) struct ModuleInBlockName {
#[primary_span]
pub span: Span,
@@ -368,3 +368,32 @@ pub(crate) struct ModuleMultipleCandidates {
pub default_path: String,
pub secondary_path: String,
}
+
+#[derive(Diagnostic)]
+#[diag(expand_trace_macro)]
+pub struct TraceMacro {
+ #[primary_span]
+ pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(expand_proc_macro_panicked)]
+pub(crate) struct ProcMacroPanicked {
+ #[primary_span]
+ pub span: Span,
+ #[subdiagnostic]
+ pub message: Option<ProcMacroPanickedHelp>,
+}
+
+#[derive(Subdiagnostic)]
+#[help(expand_help)]
+pub(crate) struct ProcMacroPanickedHelp {
+ pub message: String,
+}
+
+#[derive(Diagnostic)]
+#[diag(expand_proc_macro_derive_tokens)]
+pub struct ProcMacroDeriveTokens {
+ #[primary_span]
+ pub span: Span,
+}