File tree 1 file changed +9
-0
lines changed
compiler/rustc_middle/src/mir
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1841,6 +1841,15 @@ static_assert_size!(PlaceElem<'_>, 24);
1841
1841
pub type ProjectionKind = ProjectionElem < ( ) , ( ) > ;
1842
1842
1843
1843
rustc_index:: newtype_index! {
1844
+ /// A [newtype'd][wrapper] index type in the MIR [control-flow graph][CFG]
1845
+ ///
1846
+ /// A field (e.g., `f` in `_1.f`) is one variant of [`ProjectionElem`]. Conceptually,
1847
+ /// rustc can identify that a field projection refers to either two different regions of memory
1848
+ /// or the same one between the base and the 'projection element'.
1849
+ /// Read more about projections in the [rustc-dev-guide][mir-datatypes]
1850
+ /// [wrapper]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html#newtype
1851
+ /// [CFG]: https://rustc-dev-guide.rust-lang.org/appendix/background.html#cfg
1852
+ /// [mir-datatypes]: https://rustc-dev-guide.rust-lang.org/mir/index.html#mir-data-types
1844
1853
pub struct Field {
1845
1854
derive [ HashStable ]
1846
1855
DEBUG_FORMAT = "field[{}]"
You can’t perform that action at this time.
0 commit comments