Uh oh!
There was an error while loading. Please reload this page.
Implement VEC_NEW internal lint - #62678
Conversation
Seriously? EDIT: I'm just always using |
rust-highfive
commented
Jul 14, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
flip1995
commented
Jul 14, 2019
I guess for consistency? But as stated above: This was easy to implement and not really much work to fix the fallout. We can throw this on the pile of internal lints, that didn't make it, no harm done. :) |
Mark-Simulacrum
commented
Jul 14, 2019
I'd be interested in knowing whether this has an impact on compilation times, as it leads to macro expansion occurring -- which internally will still call Maybe it makes sense to do the opposite or nothing here? |
flip1995
commented
Jul 14, 2019
The macro expands to Lines 145 to 152 in 85a360e
But if this is the case, wouldn't it make sense to add a special case for |
Mark-Simulacrum
commented
Jul 14, 2019
Note, I don't mean the runtime cost -- I expect that to be equivalent -- I mean purely the macro parsing/expansion overheads. I don't think these are significant; but, well, if we're going to ban |
flip1995
commented
Jul 14, 2019
Oh yeah of course. It's late here Is there some way I can benchmark the compile times? |
Xanewok
commented
Jul 14, 2019
I actually looked for a similar lint in the Clippy and couldn't find it (to prefer |
bors
commented
Jul 15, 2019
☔ The latest upstream changes (presumably #62670) made this pull request unmergeable. Please resolve the merge conflicts. |
oli-obk
commented
Jul 16, 2019
cc @eddyb |
eddyb
commented
Jul 16, 2019
I prefer this but we should have some discussion and find some consensus. @petrochenkov I would also prefer to avoid macros if we had a way to make As it stands, |
petrochenkov
commented
Jul 16, 2019
@eddyb |
scottmcm
commented
Jul 20, 2019
Why does the compiler want it this way? There's no justification in #49509 (comment) |
joelpalmer
commented
Jul 29, 2019
Ping from Triage. Is any more review forthcoming or should this be back in the author's hands? @flip1995@oli-obk@Mark-Simulacrum@eddyb |
flip1995
commented
Jul 29, 2019
I don't think we find a consensus here. I think this should be discussed in #49509 first and then picked up again. |
And another one. That was an easy one to implement, but the fallout was pretty big. Thanks to regex (
s/([\(\s])Vec::new()/\1vec![]/g) this was quite pleasant to fix :)cc #49509 (comment)
r? @oli-obk