Skip to content

Commit c4d0bb3

Browse files
committed
Fix tidy error
1 parent 768cbbc commit c4d0bb3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustc/ty/inhabitedness/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
263263
},
264264
TyArray(ty, len) => {
265265
match len.val.to_const_int().and_then(|i| i.to_u64()) {
266-
Some(n) if n != 0 => ty.uninhabited_from(visited, tcx),
267266
// If the array is definitely non-empty, it's uninhabited if
268267
// the type of its elements is uninhabited.
268+
Some(n) if n != 0 => ty.uninhabited_from(visited, tcx),
269269
_ => DefIdForest::empty()
270270
}
271271
}

src/test/compile-fail/empty-never-array.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ enum Helper<T, U> {
1717
}
1818

1919
fn transmute<T, U>(t: T) -> U {
20-
let Helper::U(u) = Helper::T(t, []); //~ ERROR refutable pattern in local binding: `T(_, _)` not covered
20+
let Helper::U(u) = Helper::T(t, []);
21+
//~^ ERROR refutable pattern in local binding: `T(_, _)` not covered
2122
u
2223
}
2324

0 commit comments

Comments
 (0)