]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/error_reporting.rs
Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik
[rust.git] / src / librustc_mir / borrow_check / error_reporting.rs
index 5a8d7545e6826ca687ff06673218ea7b1beb67a3..2da8eb8ec05443cba783b510b436e245d64292dc 100644 (file)
@@ -33,7 +33,7 @@ struct MoveSite {
     /// then tell us where the move occurred.
     moi: MoveOutIndex,
 
-    /// True if we traversed a back edge while walking from the point
+    /// `true` if we traversed a back edge while walking from the point
     /// of error to the move site.
     traversed_back_edge: bool
 }
@@ -1793,7 +1793,7 @@ fn describe_field_from_ty(&self, ty: &ty::Ty<'_>, field: Field) -> String {
         }
     }
 
-    /// Check if a place is a thread-local static.
+    /// Checks if a place is a thread-local static.
     pub fn is_place_thread_local(&self, place: &Place<'tcx>) -> bool {
         if let Place::Static(statik) = place {
             let attrs = self.infcx.tcx.get_attrs(statik.def_id);
@@ -2314,7 +2314,7 @@ fn get_name_for_ty(&self, ty: ty::Ty<'tcx>, counter: usize) -> String {
         }
     }
 
-    /// Return the name of the provided `Ty` (that must be a reference)'s region with a
+    /// Returns the name of the provided `Ty` (that must be a reference)'s region with a
     /// synthesized lifetime name where required.
     fn get_region_name_for_ty(&self, ty: ty::Ty<'tcx>, counter: usize) -> String {
         match ty.sty {
@@ -2389,7 +2389,7 @@ pub(super) fn var_span_label(
         }
     }
 
-    /// Return `false` if this place is not used in a closure.
+    /// Returns `false` if this place is not used in a closure.
     fn for_closure(&self) -> bool {
         match *self {
             UseSpans::ClosureUse { is_generator, .. } => !is_generator,
@@ -2397,7 +2397,7 @@ fn for_closure(&self) -> bool {
         }
     }
 
-    /// Return `false` if this place is not used in a generator.
+    /// Returns `false` if this place is not used in a generator.
     fn for_generator(&self) -> bool {
         match *self {
             UseSpans::ClosureUse { is_generator, .. } => is_generator,