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

require Reveal::All in normalize_erasing_regions #77752

Closed
wants to merge 1 commit into from

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Oct 9, 2020

would have caught a bug in mir inlining, see #77568 (comment)

@rust-highfive
Copy link
Collaborator

r? @oli-obk

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Oct 9, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 9, 2020

📌 Commit 19e7095 has been approved by oli-obk

@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 Oct 9, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 10, 2020
require `Reveal::All` in `normalize_erasing_regions`

would have caught a bug in mir inlining, see rust-lang#77568 (comment)
@JohnTitor
Copy link
Member

Seems failed in #77797 (comment):

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `UserFacing`,
 right: `All`', /checkout/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:30:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.49.0-nightly (db0665ce8 2020-10-10) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C embed-bitcode=yes --crate-type lib

note: some of the compiler flags provided by cargo are hidden

[RUSTC-TIMING] core test:false 6.187
error: could not compile `core`

https://github.com/rust-lang-ci/rust/runs/1235982427

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 10, 2020
@matthewjasper
Copy link
Contributor

There are a few places that should (sometimes) be given user facing param envs:

let field_ty = self.cx.tcx.normalize_erasing_regions(self.cx.param_env, field_ty);

let ty = self.tcx().normalize_erasing_regions(ty::ParamEnv::empty(), field_ty);

let subst_ty = tcx.normalize_erasing_regions(
self.param_env,
required_ty.subst(tcx, substs),
);

@lcnr
Copy link
Contributor Author

lcnr commented Oct 11, 2020

doesn't normalize_erasing_regions ICE if it fails to normalize?

Will have to look into this a bit more deeply then

@matthewjasper
Copy link
Contributor

It ICEs if an associated type projection isn't well-formed (i.e. the self type doesn't implement the trait that's expected), but doesn't if it does but can't be normalized.

@lcnr lcnr closed this Oct 28, 2020
@lcnr lcnr deleted the normalize-assert branch May 25, 2022 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants