diff options
| author | bors <bors@rust-lang.org> | 2020-07-31 18:14:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-07-31 18:14:59 +0000 |
| commit | 6e87bacd37539b7e7cd75152dffd225047fa983a (patch) | |
| tree | 71d61b8eeeab18886ae7008bcc2a4099fe6a886f /src/rustllvm/CoverageMappingWrapper.cpp | |
| parent | 62f9aa94c0d0312544589bed78679d85646d4e62 (diff) | |
| parent | 5e2e927e0107916b825b164c82be44877ac6ab54 (diff) | |
| download | rust-6e87bacd37539b7e7cd75152dffd225047fa983a.tar.gz rust-6e87bacd37539b7e7cd75152dffd225047fa983a.zip | |
Auto merge of #65989 - Aaron1011:fix/normalize-param-env, r=nikomatsakis
Normalize all opaque types when converting ParamEnv to Reveal::All When we normalize a type using a ParamEnv with a reveal mode of RevealMode::All, we will normalize opaque types to their underlying types (e.g. `type MyOpaque = impl Foo` -> `StructThatImplsFoo`). However, the ParamEnv may still have predicates referring to the un-normalized opaque type (e.g. `<T as MyTrait<MyOpaque>>`). This can cause trait projection to fail, since a type containing normalized opaque types will not match up with the un-normalized type in the `ParamEnv`. To fix this, we now explicitly normalize all opaque types in caller_bounds of a `ParamEnv` when changing its mode to `RevealMode::All`. This ensures that all predicatse will refer to the underlying types of any opaque types involved, allowing them to be matched up properly during projection. To reflect the fact that normalization is occuring, `ParamEnv::with_reveal_all` is renamed to `ParamEnv::with_reveal_all_normalized` Fixes #65918
Diffstat (limited to 'src/rustllvm/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
