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

Check opaques for mismatch during writeback #111853

Merged
merged 1 commit into from
May 23, 2023

Conversation

compiler-errors
Copy link
Member

Revive #111705.

I realized that we don't need to put any substs in the writeback results since all of the hidden types have already been remapped. See the comment in compiler/rustc_middle/src/ty/typeck_results.rs, which should make that clear for other explorers of the codebase.

Additionally, we need to do some diagnostic stashing because the diagnostics we produce during HIR typeck is very poor and we should prefer the diagnostic that comes from MIR, if we have one.

r? @oli-obk

@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 May 22, 2023
fcx,
typeck_results: ty::TypeckResults::new(owner),
body,
rustc_dump_user_substs,
};

// HACK: We specifically don't want the (opaque) error from tainting our
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hack should be fixed by #111863 actually. I can remove it or fix it in that PR, whichever one lands first.

@oli-obk
Copy link
Contributor

oli-obk commented May 23, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 23, 2023

📌 Commit 0307db4 has been approved by oli-obk

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 May 23, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 23, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#111461 (Fix symbol conflict diagnostic mistakenly being shown instead of missing crate diagnostic)
 - rust-lang#111579 (Also assume wrap-around discriminants in `as` MIR building)
 - rust-lang#111704 (Remove return type sized check hack from hir typeck)
 - rust-lang#111853 (Check opaques for mismatch during writeback)
 - rust-lang#111854 (rustdoc: clean up `settings.css`)
 - rust-lang#111860 (Don't ICE if method receiver fails to unify with `arbitrary_self_types`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6583025 into rust-lang:master May 23, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 23, 2023
@compiler-errors compiler-errors deleted the opaque-check branch August 11, 2023 20:12
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.

4 participants