Use `&&` instead of `&`

It does not seem valuable to always evaluate the right-hand side here.
This commit is contained in:
Tobias Schottdorf 2017-03-12 00:24:11 -05:00
parent b43c744318
commit 20c0f323fc
1 changed files with 1 additions and 1 deletions

View File

@ -846,7 +846,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
// When the corresponding feature isn't toggled, only promote `[T; 0]`.
let promotable = match expr_ty.sty {
ty::TyArray(_, 0) => true,
_ => promotable & self.tcx().sess.features.borrow().rvalue_static_promotion,
_ => promotable && self.tcx().sess.features.borrow().rvalue_static_promotion,
};
// Compute maximum lifetime of this rvalue. This is 'static if