rust/compiler/rustc_resolve
bors 55043f067d Auto merge of #130337 - BoxyUwU:anon_const_macro_call, r=camelid
Fix anon const def-creation when macros are involved take 2

Fixes #130321

There were two cases that #129137 did not handle correctly:

- Given a const argument `Foo<{ bar!() }>` in which `bar!()` expands to `N`, we would visit the anon const and then visit the `{ bar() }` expression instead of visiting the macro call. This meant that we would build a def for the anon const as `{ bar!() }` is not a trivial const argument as `bar!()` is not a path.
- Given a const argument `Foo<{ bar!() }>` is which `bar!()` expands to `{ qux!() }` in which `qux!()` expands to `N`, it should not be considered a trivial const argument as `{{ N }}` has two pairs of braces.  If we only looked at `qux`'s expansion it would *look* like a trivial const argument even though it is not. We have to track whether we have "unwrapped" a brace already when recursing into the expansions of `bar`/`qux`/any macro

r? `@camelid`
2024-09-22 00:31:03 +00:00
..
src Auto merge of #130337 - BoxyUwU:anon_const_macro_call, r=camelid 2024-09-22 00:31:03 +00:00
Cargo.toml rustdoc: update to pulldown-cmark 0.11 2024-06-30 18:33:48 -07:00
messages.ftl chore: Fix typos in 'compiler' (batch 2) 2024-09-02 07:50:22 +02:00