Rollup merge of #113999 - Centri3:macro-arm-expand, r=wesleywiser
Specify macro is invalid in certain contexts Adds a note when a macro is used where it really shouldn't be. Closes #113766
This commit is contained in:
commit
1f076fe1d8
9 changed files with 246 additions and 24 deletions
|
@ -1815,6 +1815,12 @@ pub struct UnknownPrefix<'a> {
|
|||
pub sugg: Option<UnknownPrefixSugg>,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[note(parse_macro_expands_to_adt_field)]
|
||||
pub struct MacroExpandsToAdtField<'a> {
|
||||
pub adt_ty: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
pub enum UnknownPrefixSugg {
|
||||
#[suggestion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue