mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-04 09:44:40 +00:00
doc(hir::Place): clarify that places aren't always place expressions
This commit is contained in:
@@ -53,7 +53,10 @@ pub struct Projection<'tcx> {
|
||||
pub kind: ProjectionKind,
|
||||
}
|
||||
|
||||
/// A `Place` represents how a value is located in memory.
|
||||
/// A `Place` represents how a value is located in memory. This does not
|
||||
/// always correspond to a syntactic place expression. For example, when
|
||||
/// processing a pattern, a `Place` can be used to refer to the sub-value
|
||||
/// currently being inspected.
|
||||
///
|
||||
/// This is an HIR version of [`rustc_middle::mir::Place`].
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, HashStable)]
|
||||
@@ -67,7 +70,10 @@ pub struct Place<'tcx> {
|
||||
pub projections: Vec<Projection<'tcx>>,
|
||||
}
|
||||
|
||||
/// A `PlaceWithHirId` represents how a value is located in memory.
|
||||
/// A `PlaceWithHirId` represents how a value is located in memory. This does not
|
||||
/// always correspond to a syntactic place expression. For example, when
|
||||
/// processing a pattern, a `Place` can be used to refer to the sub-value
|
||||
/// currently being inspected.
|
||||
///
|
||||
/// This is an HIR version of [`rustc_middle::mir::Place`].
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, HashStable)]
|
||||
|
||||
Reference in New Issue
Block a user