Skip to content

Commit d96c4a9

Browse files
committed
Undo a few - now unnecessary - changes
1 parent 17db209 commit d96c4a9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/librustc_mir/hair/pattern/_match.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,8 +1752,7 @@ fn specialize<'p, 'a: 'p, 'tcx: 'a>(
17521752
// they should be pointing to memory is when they are subslices of nonzero
17531753
// slices
17541754
let (opt_ptr, n, ty) = match value.ty.builtin_deref(false).unwrap().ty.sty {
1755-
ty::TyKind::Array(t, n) =>
1756-
(value.to_ptr(), n.unwrap_usize(cx.tcx), t),
1755+
ty::TyKind::Array(t, n) => (value.to_ptr(), n.unwrap_usize(cx.tcx), t),
17571756
ty::TyKind::Slice(t) => {
17581757
match value.val {
17591758
ConstValue::ScalarPair(ptr, n) => (

src/librustc_mir/transform/qualify_consts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
712712
} else if let ty::Array(_, len) = ty.sty {
713713
// FIXME(eddyb) the `self.mode == Mode::Fn` condition
714714
// seems unnecessary, given that this is merely a ZST.
715-
let len = len.unwrap_usize(self.tcx);
716-
if len == 0 && self.mode == Mode::Fn {
715+
if len.unwrap_usize(self.tcx) == 0 && self.mode == Mode::Fn {
717716
forbidden_mut = false;
718717
}
719718
}

0 commit comments

Comments
 (0)