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:
@@ -18,7 +18,7 @@ use rustc_middle::ty::Ty;
|
||||
pub struct AbstractOperand;
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
|
||||
pub struct AbstractType;
|
||||
pub type AbstractElem = ProjectionElem<AbstractOperand, AbstractType>;
|
||||
pub type AbstractElem = ProjectionElem<AbstractOperand, AbstractType, AbstractType>;
|
||||
|
||||
pub trait Lift {
|
||||
type Abstract;
|
||||
|
||||
@@ -777,10 +777,10 @@ pub enum TrackElem {
|
||||
Field(Field),
|
||||
}
|
||||
|
||||
impl<V, T> TryFrom<ProjectionElem<V, T>> for TrackElem {
|
||||
impl<V, T1, T2> TryFrom<ProjectionElem<V, T1, T2>> for TrackElem {
|
||||
type Error = ();
|
||||
|
||||
fn try_from(value: ProjectionElem<V, T>) -> Result<Self, Self::Error> {
|
||||
fn try_from(value: ProjectionElem<V, T1, T2>) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
ProjectionElem::Field(field, _) => Ok(TrackElem::Field(field)),
|
||||
_ => Err(()),
|
||||
|
||||
Reference in New Issue
Block a user