Files
rust/compiler/rustc_trait_selection
Stuart Cook 100c013d89 Rollup merge of #161587 - lsunsi:issue129756, r=ShoyuVanilla
Avoid invalid suggestion in case of macro expansion without inferrable generic type

Closes rust-lang/rust#129756 .

The main challenge for me in this PR was figuring out how to pass down the information of the code being generated from expansion. I went for the simplest approach I could think of, but I questioned myself if the boolean should be placed inside the Visitor. I don't have enough information to figure this out, if it's badly placed I'd be happy to fix and learn!

About the test, I split the two commits because we can see the issue being reproduced in the first commit but being fixed on the second. I also added a non-expansion example of the same code to show it won't get altered.

Oh, also I didn't know the best place to place the test. I went for the place with same kind of errors, but I guess `proc-macros` could also be a place.
2026-09-09 16:25:17 +10:00
..