Skip to content

Commit 20c0f32

Browse files
committed
Use && instead of &
It does not seem valuable to always evaluate the right-hand side here.
1 parent b43c744 commit 20c0f32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/mem_categorization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
846846
// When the corresponding feature isn't toggled, only promote `[T; 0]`.
847847
let promotable = match expr_ty.sty {
848848
ty::TyArray(_, 0) => true,
849-
_ => promotable & self.tcx().sess.features.borrow().rvalue_static_promotion,
849+
_ => promotable && self.tcx().sess.features.borrow().rvalue_static_promotion,
850850
};
851851

852852
// Compute maximum lifetime of this rvalue. This is 'static if

0 commit comments

Comments
 (0)