1
Fork 0

Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr

Use non-ascribed type as field's type in mir

Fixes https://github.com/rust-lang/rust/issues/96514

r? `@lcnr`
This commit is contained in:
bors 2022-12-16 12:47:49 +00:00
commit 03770f0e2b
14 changed files with 434 additions and 100 deletions

View file

@ -1488,7 +1488,7 @@ impl<'tcx> StatementKind<'tcx> {
///////////////////////////////////////////////////////////////////////////
// Places
impl<V, T> ProjectionElem<V, T> {
impl<V, T, U> ProjectionElem<V, T, U> {
/// Returns `true` if the target of this projection may refer to a different region of memory
/// than the base.
fn is_indirect(&self) -> bool {
@ -1517,7 +1517,7 @@ impl<V, T> ProjectionElem<V, T> {
/// Alias for projections as they appear in `UserTypeProjection`, where we
/// need neither the `V` parameter for `Index` nor the `T` for `Field`.
pub type ProjectionKind = ProjectionElem<(), ()>;
pub type ProjectionKind = ProjectionElem<(), (), ()>;
rustc_index::newtype_index! {
/// A [newtype'd][wrapper] index type in the MIR [control-flow graph][CFG]