From 287db04636ffefa3fdaa39fe0fdcc3cf75b60444 Mon Sep 17 00:00:00 2001 From: Catherine Date: Mon, 24 Jul 2023 04:55:47 +0000 Subject: Specify macro is invalid in certain contexts --- compiler/rustc_parse/src/errors.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_parse/src/errors.rs') 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 @@ -1800,6 +1800,12 @@ pub struct UnknownPrefix<'a> { pub sugg: Option, } +#[derive(Subdiagnostic)] +#[note(parse_macro_expands_to_adt_field)] +pub struct MacroExpandsToAdtField<'a> { + pub adt_ty: &'a str, +} + #[derive(Subdiagnostic)] pub enum UnknownPrefixSugg { #[suggestion( -- cgit 1.4.1-3-g733a5