Use `&&` instead of `&`
It does not seem valuable to always evaluate the right-hand side here.
This commit is contained in:
parent
b43c744318
commit
20c0f323fc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue