]> git.lizzy.rs Git - rust.git/commitdiff
Fix style in comments
authorSantiago Pastorino <spastorino@gmail.com>
Thu, 12 Sep 2019 19:20:20 +0000 (16:20 -0300)
committerSantiago Pastorino <spastorino@gmail.com>
Fri, 13 Sep 2019 12:30:00 +0000 (09:30 -0300)
src/librustc_mir/borrow_check/nll/type_check/mod.rs
src/librustc_mir/borrow_check/prefixes.rs

index 10c038bc3336fc51a2e809ed566545a24b02ceb5..1d17bae559c59773d2e4976beec7c63a04a02609 100644 (file)
@@ -488,16 +488,16 @@ fn sanitize_place(
                         substs: tcx.mk_substs_trait(place_ty.ty, &[]),
                     };
 
-                    // In order to have a Copy operand, the type T of the
-                    // value must be Copy. Note that we prove that T: Copy,
+                    // To have a `Copy` operand, the type `T` of the
+                    // value must be `Copy`. Note that we prove that `T: Copy`,
                     // rather than using the `is_copy_modulo_regions`
                     // test. This is important because
                     // `is_copy_modulo_regions` ignores the resulting region
                     // obligations and assumes they pass. This can result in
-                    // bounds from Copy impls being unsoundly ignored (e.g.,
-                    // #29149). Note that we decide to use Copy before knowing
+                    // bounds from `Copy` impls being unsoundly ignored (e.g.,
+                    // #29149). Note that we decide to use `Copy` before knowing
                     // whether the bounds fully apply: in effect, the rule is
-                    // that if a value of some type could implement Copy, then
+                    // that if a value of some type could implement `Copy`, then
                     // it must.
                     self.cx.prove_trait_ref(
                         trait_ref,
index 819678dfaf2551441836b44a0a1402d9c69cd93d..0a268ec1340233ed425159ec283ffab59a9e955c 100644 (file)
@@ -118,15 +118,15 @@ fn next(&mut self) -> Option<Self::Item> {
 
                     match self.kind {
                         PrefixSet::Shallow => {
-                            // shallow prefixes are found by stripping away
+                            // Shallow prefixes are found by stripping away
                             // fields, but stop at *any* dereference.
                             // So we can just stop the traversal now.
                             self.next = None;
                             return Some(cursor);
                         }
                         PrefixSet::All => {
-                            // all prefixes: just blindly enqueue the base
-                            // of the projection
+                            // All prefixes: just blindly enqueue the base
+                            // of the projection.
                             self.next = Some(PlaceRef {
                                 base: cursor.base,
                                 projection: proj_base,
@@ -134,12 +134,12 @@ fn next(&mut self) -> Option<Self::Item> {
                             return Some(cursor);
                         }
                         PrefixSet::Supporting => {
-                            // fall through!
+                            // Fall through!
                         }
                     }
 
                     assert_eq!(self.kind, PrefixSet::Supporting);
-                    // supporting prefixes: strip away fields and
+                    // Supporting prefixes: strip away fields and
                     // derefs, except we stop at the deref of a shared
                     // reference.