1
Fork 0

Handle macro calls in anon const def creation take 2

This commit is contained in:
Boxy 2024-09-15 21:21:31 +01:00
parent 1d68e6dd1d
commit 781ec111b7
15 changed files with 210 additions and 28 deletions

View file

@ -190,6 +190,11 @@ impl InvocationParent {
#[derive(Copy, Debug, Clone)]
struct PendingAnonConstInfo {
// A const arg is only a "trivial" const arg if it has at *most* one set of braces
// around the argument. We track whether we have stripped an outter brace so that
// if a macro expands to a braced expression *and* the macro was itself inside of
// some braces then we can consider it to be a non-trivial const argument.
block_was_stripped: bool,
id: NodeId,
span: Span,
}