Skip to content

Commit

Permalink
Use && instead of &
Browse files Browse the repository at this point in the history
It does not seem valuable to always evaluate the right-hand side here.
  • Loading branch information
tbg committed Mar 14, 2017
1 parent b43c744 commit 20c0f32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/middle/mem_categorization.rs
Expand Up @@ -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
Expand Down

0 comments on commit 20c0f32

Please sign in to comment.