Skip to content

Commit

Permalink
more clear code
Browse files Browse the repository at this point in the history
Co-authored-by: Oli Scherer <[email protected]>
  • Loading branch information
RalfJung and oli-obk authored Jan 3, 2024
1 parent a97ab84 commit 7cad54a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_const_eval/src/interpret/validity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
// here since we cannot know if there really is an `UnsafeCell` inside
// `Option<UnsafeCell>` -- so we check that in the recursive descent behind this
// reference.
if size == Size::ZERO || tam.mutbl == Mutability::Not {
if size == Size::ZERO {
Mutability::Not
} else {
Mutability::Mut
tam.mutbl
}
}
};
Expand Down

0 comments on commit 7cad54a

Please sign in to comment.