mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
document rustc_middle::mir::Field
This commit is contained in:
parent
0c3f0cddde
commit
56aba3c625
@ -1841,6 +1841,15 @@ static_assert_size!(PlaceElem<'_>, 24);
|
||||
pub type ProjectionKind = ProjectionElem<(), ()>;
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
/// A [newtype'd][wrapper] index type in the MIR [control-flow graph][CFG]
|
||||
///
|
||||
/// A field (e.g., `f` in `_1.f`) is one variant of [`ProjectionElem`]. Conceptually,
|
||||
/// rustc can identify that a field projection refers to two different regions of memory
|
||||
/// or the same one between the base and the projection element.
|
||||
/// Read more about projections in the [rustc-dev-guide][mir-datatypes]
|
||||
/// [wrapper]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html#newtype
|
||||
/// [CFG]: https://rustc-dev-guide.rust-lang.org/appendix/background.html#cfg
|
||||
/// [mir-datatypes]: https://rustc-dev-guide.rust-lang.org/mir/index.html#mir-data-types
|
||||
pub struct Field {
|
||||
derive [HashStable]
|
||||
DEBUG_FORMAT = "field[{}]"
|
||||
|
Loading…
Reference in New Issue
Block a user