-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Don't ice on bad transmute in typeck in new solver #134744
Conversation
@@ -46,7 +46,17 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | |||
let span = tcx.hir().span(hir_id); | |||
let normalize = |ty| { | |||
let ty = self.resolve_vars_if_possible(ty); | |||
self.tcx.normalize_erasing_regions(self.typing_env(self.param_env), ty) | |||
if let Ok(ty) = | |||
self.tcx.try_normalize_erasing_regions(self.typing_env(self.param_env), ty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, we should prolly just move this out of HIR typeck into a separate query and then check whether the typeck results are tainted instead, especially as computing the layout uses reveal all anyways, so we get query cycles when revealing opaques.
can you add that as a fixme? after that r=me
1677200
to
96285bd
Compare
@bors r=lcnr rollup |
…r=lcnr Don't ice on bad transmute in typeck in new solver Old trait solver ends up getting its infcx tainted because we try to normalize the type, but the new trait solver doesn't. This means we try to compute the stalled transmute obligations, which tries to normalize a type an ICEs. Let's make this a delayed bug. r? lcnr
Rollup of 9 pull requests Successful merges: - rust-lang#131830 (Add support for wasm exception handling to Emscripten target) - rust-lang#132345 (Improve diagnostics for `HostEffectPredicate` in the new solver) - rust-lang#134568 (Release notes for 1.84.0) - rust-lang#134744 (Don't ice on bad transmute in typeck in new solver) - rust-lang#135090 (Suggest to replace tuple constructor through projection) - rust-lang#135116 (rustdoc: Fix mismatched capitalization in sidebar) - rust-lang#135126 (mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor) - rust-lang#135139 ([generic_assert] Constify methods used by the formatting system) - rust-lang#135170 (Update triagebot.toml: celinval vacation is over) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134744 - compiler-errors:transmute-non-wf, r=lcnr Don't ice on bad transmute in typeck in new solver Old trait solver ends up getting its infcx tainted because we try to normalize the type, but the new trait solver doesn't. This means we try to compute the stalled transmute obligations, which tries to normalize a type an ICEs. Let's make this a delayed bug. r? lcnr
Old trait solver ends up getting its infcx tainted because we try to normalize the type, but the new trait solver doesn't. This means we try to compute the stalled transmute obligations, which tries to normalize a type an ICEs. Let's make this a delayed bug.
r? lcnr