about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorCatherine <catherine.3.flores@gmail.com>2023-07-24 04:55:47 +0000
committerCatherine Flores <catherine.3.flores@gmail.com>2023-07-24 00:25:17 -0500
commit287db04636ffefa3fdaa39fe0fdcc3cf75b60444 (patch)
tree745b89b10863c02ffe96a33220b12aea6fcfcca2 /compiler/rustc_parse/src/errors.rs
parent8771282d4e7a5c4569e49d1f878fb3ba90a974d0 (diff)
downloadrust-287db04636ffefa3fdaa39fe0fdcc3cf75b60444.tar.gz
rust-287db04636ffefa3fdaa39fe0fdcc3cf75b60444.zip
Specify macro is invalid in certain contexts
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index 96e1c0e3c6d..7f209c63f42 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -1801,6 +1801,12 @@ pub struct UnknownPrefix<'a> {
 }
 
 #[derive(Subdiagnostic)]
+#[note(parse_macro_expands_to_adt_field)]
+pub struct MacroExpandsToAdtField<'a> {
+    pub adt_ty: &'a str,
+}
+
+#[derive(Subdiagnostic)]
 pub enum UnknownPrefixSugg {
     #[suggestion(
         parse_suggestion_br,