diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 7baafbd3cea7..ee0af65d76a4 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -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` -- 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 } } };