Make diagnostics clearer for ? operators#86382
Conversation
estebank
left a comment
There was a problem hiding this comment.
r+ on all the changes but the one to the suggestion.
There was a problem hiding this comment.
For some reason this suggestion is fine in stable and nightly, but it isn't here.
There was a problem hiding this comment.
Ah! I see. That trim_end_matches is incorrect. The case I mentioned is supposed to suggest x?.try_into().unwrap(), but this "blind" removal of the trailing ? is getting rid of it. Do we have a test where the removal of the ? is correct?
There was a problem hiding this comment.
Oh, somehow I misunderstood your previous review comment (#75029 (comment)), fixed.
|
☔ The latest upstream changes (presumably #80357) made this pull request unmergeable. Please resolve the merge conflicts. |
f510517 to
378300a
Compare
|
@bors r=estebank |
|
📌 Commit 378300a has been approved by |
Rollup of 10 pull requests Successful merges: - rust-lang#86382 (Make diagnostics clearer for `?` operators) - rust-lang#87529 (Fix ICE in `improper_ctypes_definitions` lint with all-ZST transparent types) - rust-lang#88339 (Add TcpListener::into_incoming and IntoIncoming) - rust-lang#88735 (Don't lint about missing code examples in derived traits) - rust-lang#88751 (Couple of changes to FileSearch and SearchPath) - rust-lang#88883 (Move some tests to more reasonable directories - 7) - rust-lang#88887 (Const Deref) - rust-lang#88911 (Improve error message for type mismatch in generator arguments) - rust-lang#89014 (PassWrapper: handle separate Module*SanitizerPass) - rust-lang#89033 (Set the library path in sysroot-crates-are-unstable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Re-submission of #75029, fixes #71309
This also revives the
contentmethods removed by #83185.r? @estebank