Skip to content
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

Do not use ImplDerivedObligationCause for inherent impl method error reporting #110133

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Apr 10, 2023

We were constructing a TraitRef out of impl substs, for an inherent impl that has no corresponding trait. Instead of doing that, let's construct a meaningful obligation cause code, and instead adjust the error reporting machinery to handle that correctly.

Fixes #110131
cc #106702, which introduced this regression

@rustbot
Copy link
Collaborator

rustbot commented Apr 10, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 10, 2023
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 10, 2023

📌 Commit b369c8e has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 10, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Apr 11, 2023
…trochenkov

Do not use ImplDerivedObligationCause for inherent impl method error reporting

We were constructing a `TraitRef` out of impl substs, for an *inherent* impl that has no corresponding trait. Instead of doing that, let's construct a meaningful obligation cause code, and instead adjust the error reporting machinery to handle that correctly.

Fixes rust-lang#110131
cc rust-lang#106702, which introduced this regression
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 12, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#109810 (Replace rustdoc-ui/{c,z}-help tests with a stable run-make test )
 - rust-lang#110035 (fix: ensure bad `#[test]` invocs retain correct AST)
 - rust-lang#110089 (sync::mpsc: synchronize receiver disconnect with initialization)
 - rust-lang#110103 (Report overflows gracefully with new solver)
 - rust-lang#110122 (Fix x check --stage 1 when download-ci-llvm=false)
 - rust-lang#110133 (Do not use ImplDerivedObligationCause for inherent impl method error reporting)
 - rust-lang#110135 (Revert "Don't recover lifetimes/labels containing emojis as character literals")
 - rust-lang#110235 (Fix `--extend-css` option)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5d6aeb9 into rust-lang:master Apr 13, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 13, 2023
@compiler-errors compiler-errors deleted the issue-110131 branch August 11, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: internal compiler error: compiler/rustc_middle/src/ty/sty.rs:847:21: expected type for param #0
4 participants