From 98edaead8249b936a29c53bffb095737643982dc Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 12 Sep 2019 16:20:20 -0300 Subject: [PATCH] Fix style in comments --- src/librustc_mir/borrow_check/nll/type_check/mod.rs | 10 +++++----- src/librustc_mir/borrow_check/prefixes.rs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs index 10c038bc333..1d17bae559c 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs @@ -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, diff --git a/src/librustc_mir/borrow_check/prefixes.rs b/src/librustc_mir/borrow_check/prefixes.rs index 819678dfaf2..0a268ec1340 100644 --- a/src/librustc_mir/borrow_check/prefixes.rs +++ b/src/librustc_mir/borrow_check/prefixes.rs @@ -118,15 +118,15 @@ fn next(&mut self) -> Option { 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 { 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. -- 2.44.0