File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
compiler/rustc_middle/src/mir Expand file tree Collapse file tree 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);
18411841pub type ProjectionKind = ProjectionElem < ( ) , ( ) > ;
18421842
18431843rustc_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
18441853 pub struct Field {
18451854 derive [ HashStable ]
18461855 DEBUG_FORMAT = "field[{}]"
You can’t perform that action at this time.
0 commit comments