]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #105455 - lcnr:correct-reveal-in-validate, r=jackh726
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 9 Dec 2022 06:25:47 +0000 (07:25 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Dec 2022 06:25:47 +0000 (07:25 +0100)
use the correct `Reveal` during validation

supersedes #105454. Deals with https://github.com/rust-lang/rust/issues/105009#issuecomment-1342395333, not closing #105009 as the ICE may leak into beta

The issue was the following:
- we optimize the mir, using `Reveal::All`
- some optimization relies on the hidden type of an opaque type
- we then validate using `Reveal::UserFacing` again which is not able to observe the hidden type

r? `@jackh726`

1  2 
compiler/rustc_middle/src/mir/syntax.rs