-
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
back out bogus Ok
-wrapping suggestion on ?
arm type mismatch
#55423
back out bogus Ok
-wrapping suggestion on ?
arm type mismatch
#55423
Conversation
This suggestion was introduced in rust-lang#51938 / 6cc78bf (while introducing different language for type errors coming from `?` rather than a `match`), but it has a lot of false-positives (as repeatedly reported in Issues rust-lang#52537, rust-lang#52598, rust-lang#54578, rust-lang#55336), and incorrect suggestions carry more badness than marginal good suggestions do goodness. Just get rid of it (unless and until someone figures out how to do it correctly). Resolves rust-lang#52537, resolves rust-lang#54578.
I could see a case for beta-backporting if we think that 1.31 will get a lot of new users coming to check out the edition, and we don't want to make a bad impression with a bad suggestion, but maybe backports should only be for higher-priority edition-critical things? On the other hand, this is a very low-risk patch (straightforwardly removes an |
I'm a bit sad about seeing the suggestion going away entirely. Did you find it impossible to restrict the suggestion any further instead of removing it? |
Not impossible, just not a prioritized use of my time right now. (Whereas getting rid of the false positive is a priority, because it's been independently reported four times.) I've now filed a separate issue so that the opportunity isn't forgotten: #55429 |
@bors r+ |
📌 Commit b754615 has been approved by |
Accepting for beta promotion. I agree that a faulty diagnostic isn't good to ship, and the edition only reinforces that. Code changes are minimal enough that I feel comfortable with a backport. |
…ng_suggestion, r=estebank back out bogus `Ok`-wrapping suggestion on `?` arm type mismatch This suggestion was introduced in rust-lang#51938 / 6cc78bf (while introducing different language for type errors coming from `?` rather than a `match`), but it has a lot of false-positives, and incorrect suggestions carry more badness than marginal good suggestions do goodness. I regret not doing this earlier. 😞 Resolves rust-lang#52537, resolves rust-lang#54578. r? @estebank
Rollup of 9 pull requests Successful merges: - #54965 (update tcp stream documentation) - #55269 (fix typos in various places) - #55384 (Avoid unnecessary allocations in `float_lit` and `integer_lit`.) - #55423 (back out bogus `Ok`-wrapping suggestion on `?` arm type mismatch) - #55426 (Make a bunch of trivial methods of NonNull be `#[inline]`) - #55438 (Avoid directly catching BaseException in bootstrap configure script) - #55439 (Remove unused sys import from generate-deriving-span-tests) - #55440 (Remove unreachable code in hasClass function in Rustdoc) - #55447 (Fix invalid path in generate-deriving-span-tests.py.) Failed merges: r? @ghost
[beta]: Prepare the 1.31.0 beta release * Update to Cargo's branched 1.31.0 branch * Update the channel to `beta` Rolled up beta-accepted PRs: * #55362: Remove `cargo new --edition` from release notes. * #55325: Fix link to macros chapter * #55358: Remove redundant clone (2) * #55346: Shrink `Statement`. * #55274: Handle bindings in substructure of patterns with type ascriptions * #55297: Partial implementation of uniform paths 2.0 to land before beta * #55192: Fix ordering of nested modules in non-mod.rs mods * #55185: path suggestions in Rust 2018 should point out the change in semantics * #55423: back out bogus `Ok`-wrapping suggestion on `?` arm type mismatch Note that **this does not update the bootstrap compiler** due to #55404
This suggestion was introduced in #51938 / 6cc78bf (while introducing different language for type errors coming from
?
rather than amatch
), but it has a lot of false-positives, and incorrect suggestions carry more badness than marginal good suggestions do goodness. I regret not doing this earlier. 😞Resolves #52537, resolves #54578.
r? @estebank