Point at return expression for RPIT-related error#97818
Point at return expression for RPIT-related error#97818bors merged 1 commit intorust-lang:masterfrom
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
r? rust-lang/diagnostics |
|
☔ The latest upstream changes (presumably #97980) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
We can certainly do this for now, but doesn't scale very well to longer inference chains or going through any kind of branching.
I would like to generally improve inference errors to know the start and end of the inference and improve diagnostics from that. So ideally we'd have a new TypeVariableOriginKind and use that information to improve the spans right when the inference variable gets inferred to a concrete type.
So... short term, your change is the best effect-for-effort change we can make, but it should probably have a fixme or issue so we have a canonical thing to point to and collect experiments and other information.
|
@rustbot author needs a rebase and a minor fixme fix |
57bcc89 to
52409c4
Compare
|
@bors r=oli-obk |
|
📌 Commit 52409c4 has been approved by |
… r=oli-obk Point at return expression for RPIT-related error Certainly this needs some diagnostic refining, but I wanted to show that it was possible first and foremost. Not sure if this is the right approach. Open to feedback. Fixes rust-lang#80583
Rollup of 10 pull requests Successful merges: - rust-lang#95446 (update CPU usage script) - rust-lang#96768 (Use futex based thread parker on Fuchsia.) - rust-lang#97454 (Add release notes for 1.62) - rust-lang#97516 (clarify how Rust atomics correspond to C++ atomics) - rust-lang#97818 (Point at return expression for RPIT-related error) - rust-lang#97895 (Simplify `likely!` and `unlikely!` macro) - rust-lang#98005 (Add some tests for impossible bounds) - rust-lang#98226 (Document unstable `--extern` options) - rust-lang#98356 (Add missing period) - rust-lang#98363 (remove use of &Alloc in btree tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Certainly this needs some diagnostic refining, but I wanted to show that it was possible first and foremost. Not sure if this is the right approach. Open to feedback.
Fixes #80583