Skip to content

Commit 98edaea

Browse files
committed
Fix style in comments
1 parent 07a706e commit 98edaea

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/librustc_mir/borrow_check/nll/type_check/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -488,16 +488,16 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
488488
substs: tcx.mk_substs_trait(place_ty.ty, &[]),
489489
};
490490

491-
// In order to have a Copy operand, the type T of the
492-
// value must be Copy. Note that we prove that T: Copy,
491+
// To have a `Copy` operand, the type `T` of the
492+
// value must be `Copy`. Note that we prove that `T: Copy`,
493493
// rather than using the `is_copy_modulo_regions`
494494
// test. This is important because
495495
// `is_copy_modulo_regions` ignores the resulting region
496496
// obligations and assumes they pass. This can result in
497-
// bounds from Copy impls being unsoundly ignored (e.g.,
498-
// #29149). Note that we decide to use Copy before knowing
497+
// bounds from `Copy` impls being unsoundly ignored (e.g.,
498+
// #29149). Note that we decide to use `Copy` before knowing
499499
// whether the bounds fully apply: in effect, the rule is
500-
// that if a value of some type could implement Copy, then
500+
// that if a value of some type could implement `Copy`, then
501501
// it must.
502502
self.cx.prove_trait_ref(
503503
trait_ref,

src/librustc_mir/borrow_check/prefixes.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -118,28 +118,28 @@ impl<'cx, 'tcx> Iterator for Prefixes<'cx, 'tcx> {
118118

119119
match self.kind {
120120
PrefixSet::Shallow => {
121-
// shallow prefixes are found by stripping away
121+
// Shallow prefixes are found by stripping away
122122
// fields, but stop at *any* dereference.
123123
// So we can just stop the traversal now.
124124
self.next = None;
125125
return Some(cursor);
126126
}
127127
PrefixSet::All => {
128-
// all prefixes: just blindly enqueue the base
129-
// of the projection
128+
// All prefixes: just blindly enqueue the base
129+
// of the projection.
130130
self.next = Some(PlaceRef {
131131
base: cursor.base,
132132
projection: proj_base,
133133
});
134134
return Some(cursor);
135135
}
136136
PrefixSet::Supporting => {
137-
// fall through!
137+
// Fall through!
138138
}
139139
}
140140

141141
assert_eq!(self.kind, PrefixSet::Supporting);
142-
// supporting prefixes: strip away fields and
142+
// Supporting prefixes: strip away fields and
143143
// derefs, except we stop at the deref of a shared
144144
// reference.
145145

0 commit comments

Comments
 (0)