mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 13:40:15 +03:00
Place comment in the right place
This commit is contained in:
@@ -2239,14 +2239,14 @@ fn check_if_assigned_path_is_moved(
|
||||
// None case => assigning to `x` does not require `x` be initialized.
|
||||
for (place_base, elem) in place.iter_projections().rev() {
|
||||
match elem {
|
||||
ProjectionElem::Index(_/*operand*/) |
|
||||
ProjectionElem::OpaqueCast(_) |
|
||||
ProjectionElem::ConstantIndex { .. } |
|
||||
ProjectionElem::Index(_/*operand*/)
|
||||
| ProjectionElem::OpaqueCast(_)
|
||||
// assigning to P[i] requires P to be valid.
|
||||
ProjectionElem::Downcast(_/*adt_def*/, _/*variant_idx*/) =>
|
||||
// assigning to (P->variant) is okay if assigning to `P` is okay
|
||||
//
|
||||
// FIXME: is this true even if P is an adt with a dtor?
|
||||
| ProjectionElem::ConstantIndex { .. }
|
||||
// assigning to (P->variant) is okay if assigning to `P` is okay
|
||||
//
|
||||
// FIXME: is this true even if P is an adt with a dtor?
|
||||
| ProjectionElem::Downcast(_/*adt_def*/, _/*variant_idx*/) =>
|
||||
{}
|
||||
|
||||
ProjectionElem::UnwrapUnsafeBinder(_) => {
|
||||
|
||||
Reference in New Issue
Block a user