about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-07-16 10:08:08 +0200
committerGitHub <noreply@github.com>2021-07-16 10:08:08 +0200
commit41433795e75fa96e4ad880802879da7892d12fad (patch)
treed31facc98fa12aef40e6121e63978329a0a2f38b /compiler/rustc_query_impl/src
parentc1b9bbf1e78b932b857849330241f742e01238de (diff)
parent9fe470b620430775d084130ccd9333c15deb54d0 (diff)
downloadrust-41433795e75fa96e4ad880802879da7892d12fad.tar.gz
rust-41433795e75fa96e4ad880802879da7892d12fad.zip
Rollup merge of #87161 - sexxi-goose:fix-issue-87097, r=nikomatsakis
RFC2229: Use the correct place type

Closes https://github.com/rust-lang/rust/issues/87097

The ICE occurred because instead of looking at the type of the place after all the projections are applied, we instead looked at the `base_ty` of the Place to decide whether a discriminant should be read of not. This lead to two issues:

1. the kind of the type is not necessarily `Adt` since we only look at the `base_ty`, it could be instead `Ref` for example
2. if the kind of the type is `Adt` you could still be looking at the wrong variant to make a decision on whether the discriminant should be read or not

r? `@nikomatsakis`
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions