Use Span::mixed_site to avoid let unit value warnings - #2586
Conversation
|
Is this correct? Doesn't this change hygiene? |
bc23571 to
835bcca
Compare
It does indeed change hygiene AFAIUI, in that it becomes mixed hygienic. That is,
My understanding (might be wrong here) is that originally the proc_macro was unhygienic w.r.t. local variables (which might be why (If my understanding is correct, there probably is a couple more places that probably should be |
|
I've merged this. Let's see how it goes! |
Using
Span::mixed_sitechanges the syntax context of the generated responder outcome expr to identify as macro-expanded, helping theclippy::let_unit_valuelint and a potentialunit_bindingsrustc lint to avoid linting on generated code.Closes #2568.
Avoids a potential rustc
unit_bindingslint (if it is merged at rust-lang/rust#112380).