-
-
Save spastorino/f5b88513e866cf7e0acf23cef8e507c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs | |
index 8424c096e88..ba11c43f06a 100644 | |
--- a/src/librustc/mir/mod.rs | |
+++ b/src/librustc/mir/mod.rs | |
@@ -1900,11 +1900,11 @@ impl<'tcx> Debug for Statement<'tcx> { | |
/// A path to a value; something that can be evaluated without | |
/// changing or disturbing program state. | |
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable, HashStable)] | |
-pub enum Place<'tcx> { | |
- Base(PlaceBase<'tcx>), | |
+pub struct Place<'tcx> { | |
+ base: PlaceBase<'tcx>, | |
/// projection out of a place (access a field, deref a pointer, etc) | |
- Projection(Box<PlaceProjection<'tcx>>), | |
+ projection: Option<Box<PlaceProjection<'tcx>>>, | |
} | |
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable, HashStable)] | |
@@ -1940,8 +1940,8 @@ impl_stable_hash_for!(struct Static<'tcx> { | |
/// `PlaceProjection` etc below. | |
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, | |
Hash, RustcEncodable, RustcDecodable, HashStable)] | |
pub struct Projection<B, V, T> { | |
- pub base: B, | |
+ pub next: Option<B>, | |
pub elem: ProjectionElem<V, T>, | |
} | |
@@ -1988,7 +1988,7 @@ pub enum ProjectionElem<V, T> { | |
/// Alias for projections as they appear in places, where the base is a place | |
/// and the index is a local. | |
-pub type PlaceProjection<'tcx> = Projection<Place<'tcx>, Local, Ty<'tcx>>; | |
+pub type PlaceProjection<'tcx> = Projection<PlaceBase<'tcx>, Local, Ty<'tcx>>; | |
/// Alias for projections as they appear in places, where the base is a place | |
/// and the index is a local. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment