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,
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,
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.