Skip to content

Commit 7cad54a

Browse files
RalfJungoli-obk
andauthored
more clear code
Co-authored-by: Oli Scherer <[email protected]>
1 parent a97ab84 commit 7cad54a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_const_eval/src/interpret/validity.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,10 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
454454
// here since we cannot know if there really is an `UnsafeCell` inside
455455
// `Option<UnsafeCell>` -- so we check that in the recursive descent behind this
456456
// reference.
457-
if size == Size::ZERO || tam.mutbl == Mutability::Not {
457+
if size == Size::ZERO {
458458
Mutability::Not
459459
} else {
460-
Mutability::Mut
460+
tam.mutbl
461461
}
462462
}
463463
};

0 commit comments

Comments
 (0)