about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-12-21 02:47:37 +0100
committerGitHub <noreply@github.com>2020-12-21 02:47:37 +0100
commit251d435e2bc003a5042b943f9518e02204b8f66c (patch)
tree8b9b9dc53182ac5fcd5235fd776d2053baac5144 /compiler
parent635ea920f159e02d69033bf87b25a82f67d4c124 (diff)
parentf318f0211238abc4053fb6ce5ebfd0e229d3bf27 (diff)
downloadrust-251d435e2bc003a5042b943f9518e02204b8f66c.tar.gz
rust-251d435e2bc003a5042b943f9518e02204b8f66c.zip
Rollup merge of #80166 - pierwill:pierwill-rustcmiddle-place, r=petrochenkov
Edit rustc_middle docs

Re-word doc comment for rustc_middle::hir::place::Projection.

Also adds:

- Missing end stop punctuation, and
- Documentation links to `rustc_middle::mir::Place`.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_middle/src/hir/place.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_middle/src/hir/place.rs b/compiler/rustc_middle/src/hir/place.rs
index 143b3867d9f..1e2e9df88c5 100644
--- a/compiler/rustc_middle/src/hir/place.rs
+++ b/compiler/rustc_middle/src/hir/place.rs
@@ -17,13 +17,13 @@ use rustc_target::abi::VariantIdx;
     HashStable
 )]
 pub enum PlaceBase {
-    /// A temporary variable
+    /// A temporary variable.
     Rvalue,
-    /// A named `static` item
+    /// A named `static` item.
     StaticItem,
-    /// A named local variable
+    /// A named local variable.
     Local(HirId),
-    /// An upvar referenced by closure env
+    /// An upvar referenced by closure env.
     Upvar(ty::UpvarId),
 }
 
@@ -40,7 +40,7 @@ pub enum PlaceBase {
     HashStable
 )]
 pub enum ProjectionKind {
-    /// A dereference of a pointer, reference or `Box<T>` of the given type
+    /// A dereference of a pointer, reference or `Box<T>` of the given type.
     Deref,
 
     /// `B.F` where `B` is the base expression and `F` is
@@ -71,16 +71,16 @@ pub enum ProjectionKind {
     HashStable
 )]
 pub struct Projection<'tcx> {
-    /// Type after the projection is being applied.
+    /// Type after the projection is applied.
     pub ty: Ty<'tcx>,
 
-    /// Defines the type of access
+    /// Defines the kind of access made by the projection.
     pub kind: ProjectionKind,
 }
 
 /// A `Place` represents how a value is located in memory.
 ///
-/// This is an HIR version of `mir::Place`
+/// This is an HIR version of [`rustc_middle::mir::Place`].
 #[derive(Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, TypeFoldable, HashStable)]
 pub struct Place<'tcx> {
     /// The type of the `PlaceBase`
@@ -93,13 +93,13 @@ pub struct Place<'tcx> {
 
 /// A `PlaceWithHirId` represents how a value is located in memory.
 ///
-/// This is an HIR version of `mir::Place`
+/// This is an HIR version of [`rustc_middle::mir::Place`].
 #[derive(Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, TypeFoldable, HashStable)]
 pub struct PlaceWithHirId<'tcx> {
     /// `HirId` of the expression or pattern producing this value.
     pub hir_id: HirId,
 
-    /// Information about the `Place`
+    /// Information about the `Place`.
     pub place: Place<'tcx>,
 }