]> git.lizzy.rs Git - rust.git/commit
Try normalizing types without RevealAll in ParamEnv in mir validation
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>
Wed, 3 Aug 2022 20:24:47 +0000 (22:24 +0200)
committernils <48135649+Nilstrieb@users.noreply.github.com>
Mon, 29 Aug 2022 14:27:52 +0000 (16:27 +0200)
commit81a583c21e74d600ef8c4b45a3d5088382300e17
tree9b6b9133952a871a87f220b34cf2201740c2d6e2
parentb96fa1a25ced4cfa72923e6d45f47f36c2c00ce0
Try normalizing types without RevealAll in ParamEnv in mir validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.
compiler/rustc_const_eval/src/transform/validate.rs
src/test/ui/mir/issue-99866.rs [new file with mode: 0644]