Stream: general

Topic: Lint regression on rust-beta

weiznich (Nov 19 2019 at 17:10, on Zulip):

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:

simulacrum (Nov 19 2019 at 17:31, on Zulip):

I've flagged as a regression

simulacrum (Nov 19 2019 at 17:32, on Zulip):

we sometimes miss such bugs and don't tag them appropriately, if you notice feel free to raise it here (or in #t-compiler)

weiznich (Nov 19 2019 at 18:07, on Zulip):


weiznich (Nov 25 2019 at 11:24, on Zulip):

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: )

RalfJ (Nov 25 2019 at 13:08, on Zulip):

I'd start by grepping: rg -i unused_parens src/libr*

RalfJ (Nov 25 2019 at 13:08, on Zulip):

looks like the lint is implemented here:

weiznich (Nov 25 2019 at 23:11, on Zulip):

I assume I can fix that case by adding something like this here?

weiznich (Nov 27 2019 at 20:49, on Zulip):

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:

weiznich (Dec 04 2019 at 15:23, on Zulip):

I've opened #66983 to fix this, but I'm not sure how to handle the test failure there.

Last update: May 27 2020 at 22:05UTC