-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021 #83213
Conversation
Some changes occurred in diagnostic error codes |
The lint reporting is leaky (#65371) and it's not trivial to catch all the relevant cases. If it's an error, then it would just be a regular "expected a type, found a trait" or "cannot find associated item It should be ok to land this as is though and land a proper implementation later. |
This comment has been minimized.
This comment has been minimized.
Lets update #65371 after landing this with a comment to make the lint not trigger at all in 2021 and make resolve handle it (only in 2021). It'll complicate the codebase, sadly. I am slightly concerned though if the lint isn't triggering in all cases today, then 2021 will start denying currently working code. Ideally the lint and errors would remain fully accurate. @petrochenkov do you think we could move the lint to live in resolve and be triggered there instead, to make it more accurate? |
r=me after fixing failures |
Just a note of concern, I believe this will break any project that Can there be a more gentle way to make this transition? Maybe some way that is rustfix-able? (Like maybe making it part of the compatibility lint group.) |
@ehuss The point of moving this to an error is force users to make the transition. That being said, we definitely need to be able to transition using One thing we might want to consider is to transition this lint to deny-by-default. This won't necessarily encourage those projects that |
This comment has been minimized.
This comment has been minimized.
I'm ok with that approach, although it makes me sad to do that. |
fb6e9a2
to
139a776
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the cleanup! Just a few other little things to update and it should be good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
⌛ Testing commit 4193b0b with merge 4b9c3fbfa512b53dde55e3176a50e55ef480fcf0... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Looks like clippy tests failed. |
@bors r=nikomatsakis |
📌 Commit 7a50392 has been approved by |
☀️ Test successful - checks-actions |
…atsakis Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021 This addresses rust-lang#81244 by updating two lints to errors in the Rust 2021 edition. r? `@estebank`
This addresses #81244 by updating two lints to errors in the Rust 2021 edition.
r? @estebank