Stream: t-compiler/help

Topic: unused_braces false positives


Bastian Kauschke (Apr 20 2020 at 19:57, on Zulip):

https://github.com/rust-lang/rust/issues/70814 seems to affect a decent amount of crates and should be fixed before
beta IMO, which is on the 23 April.

I could try and fix this by not emitting these errors if the span is DUMMY_SPAN, which should fix the rustdoc issue, but we still have the problem when using quote in this case.

My initial theory was that checking if the surrounding block originates from a macro should fix this, as quote!(#block_expr) seems to use the actual source block, which means that checking if the inner block is from a macro expansion doesn't work (https://github.com/rust-lang/rust/blob/8ce3f840ae9b735a66531996c32330f24b877cb0/src/librustc_lint/unused.rs#L808)
This did not prevent the warnings though, so I don't know how to proceed here.

Jonas Schievink (Apr 20 2020 at 20:00, on Zulip):

We usually backport regression fixes to beta (provided the fix is small enough), so it's not terribly urgent

Bastian Kauschke (Apr 20 2020 at 20:30, on Zulip):

Good to know :thumbs_up: still want to fix this and don't know how though :laughing:

Last update: Sep 28 2020 at 16:30UTC