-
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
warn -> deny duplicate match bindings #59394
Conversation
@mark-i-m Crater had just 1 regression so I think moving this to a hard error directly is sensible. Indeed it would have been fine to jump to a hard error immediately based on that 1 single regression. |
@mark-i-m Thoughts on ^ ? |
Sorry, I’ve been a bit swamped lately. Personally, my preference is for us to just go through the normal process. I don’t think this change is very time-sensitive, the existing lint already gives a large portion of the benefit of this lint. Also, I still think we in general should move towards being more strict about breakage as Rust matures. IMHO, pushing this small change through really fast might set a bad precedent. That said, I dont have a very strong opinion. Making the change itself will be pretty easy, so i can do that later today if we decide what to do. |
We should distinguish between fixing bugs, soundness holes, and non-bugs. Since this is a bug-fix I think other considerations should apply (i.e. I don't even want to call this "breakage"). I also disagree with the general notion of being more strict with maturity. If anything, as time goes by and more code exists, we will need to become more loose to not drown in technical debt. We are already more strict than most language communities in my view (including C++, JS, ...), becoming even stricter is too much.
This is a precedent I would prefer to set. It is a good idea to base how we handle future-compat procedures based on real world crater data. I think it's also a good idea to speed up the handling of these lints as compared to the 1+ year it might take now. In my view, we should take tech debt seriously and get rid of it as soon as we can reasonably do so.
That said, I don't mind going for |
@Centril Thanks :) I think this gets into a larger discussion... which I can open an internals thread on if you want. I think it's an important and interesting discussion. While I do agree that this is a bug fix, the crater run shows that making this a hard error could cause existing code to stop compiling. I'm a bit torn, but still leaning towards going through the However, your point about tech debt is also good, so I have also prepared this branch to make the change to a hard error, so we can open a PR with it in a cycle or so... |
Not just now.. ;) Too many other things to attend to 😂.
(Right, my point was that we fixed the singular regression that was found, so presumably crater would show up 0 now)
Excellent! |
2c70c55
to
f059bc5
Compare
f059bc5
to
9f14e14
Compare
@Centril This should be ready. It is passing locally. |
Looks good. I think we can dispense with crater... r=me with green travis. |
@Centril Thanks :) Travis is green now. |
Do we want a crater run first? |
Nah; I'm happy with the first one... @bors r+ rollup |
📌 Commit 9f14e14 has been approved by |
…Centril warn -> deny duplicate match bindings This is the next step of rust-lang#57742 r? @Centril - [x] Decide whether to go to deny-by-default or hard error. - My preference is to make this deny-by-default, rather than going straight to a hard error. The CI should fail because I haven't updated the ui test yet. I'll update it when we decide which to do. - [x] Update [test](https://github.com/mark-i-m/rust/blob/c25d6b83441e0c060ee0273193ef27b29e1318cd/src/test/ui/macros/macro-multiple-matcher-bindings.rs) - [ ] ~Crater run~ see rust-lang#59394 (comment)
Rollup of 11 pull requests Successful merges: - #58019 (Combine all builtin late lints and make lint checking parallel) - #59358 (Use `track_errors` instead of hand rolling) - #59394 (warn -> deny duplicate match bindings) - #59401 (bootstrap: build crates under libtest with -Z emit-stack-sizes) - #59423 (Visit path in `walk_mac`) - #59468 (musl: build toolchain libs with -fPIC) - #59476 (Use `SmallVec` in `TokenStreamBuilder`.) - #59496 (Remove unnecessary with_globals calls) - #59498 (Use 'write_all' instead of 'write' in example code) - #59503 (Stablize {f32,f64}::copysign().) - #59511 (Fix missed fn rename in #59284) Failed merges: r? @ghost
Rollup of 11 pull requests Successful merges: - #58019 (Combine all builtin late lints and make lint checking parallel) - #59358 (Use `track_errors` instead of hand rolling) - #59394 (warn -> deny duplicate match bindings) - #59401 (bootstrap: build crates under libtest with -Z emit-stack-sizes) - #59423 (Visit path in `walk_mac`) - #59468 (musl: build toolchain libs with -fPIC) - #59476 (Use `SmallVec` in `TokenStreamBuilder`.) - #59496 (Remove unnecessary with_globals calls) - #59498 (Use 'write_all' instead of 'write' in example code) - #59503 (Stablize {f32,f64}::copysign().) - #59511 (Fix missed fn rename in #59284) Failed merges: r? @ghost
This is the next step of #57742
r? @Centril
Crater runsee warn -> deny duplicate match bindings #59394 (comment)