I've found some regression in the
unused_parens lint in the current beta release. Now I'm looking for the right place to correctly report that. I've already opened a github issue, but it seems like it's treated merely as issue not regression from stable to beta (according to the labels). Anything else I can do to help getting this fixed?
I would rather not have to handle the fallout on diesel side if this reaches a stable release :wink:
I've flagged as a regression
we sometimes miss such bugs and don't tag them appropriately, if you notice feel free to raise it here (or in #t-compiler)
If someone has some pointer where to look here I can try to look into this.
(I should probably add that I've never done anything with the lint code in rustc :see_no_evil: )
I'd start by grepping:
rg -i unused_parens src/libr*
looks like the lint is implemented here: https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L332
Turns out this does not work. From looking around a bit further it seems like this condition needs to be changed to check also if we are not inside a macro. Unfortunately I'm missing the required knowledge how to do that. Does anyone have a pointer where to look for a method that could be useful here?
Things I've already tried out naively because I've saw the somewhere in that file:
I've opened #66983 to fix this, but I'm not sure how to handle the test failure there.