Skip to content

Commit 2ba3e66

Browse files
committed
Update tests
1 parent 573c1ff commit 2ba3e66

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/librustc/cfg/construct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
415415
args: I) -> CFGIndex {
416416
let func_or_rcvr_exit = self.expr(func_or_rcvr, pred);
417417
let ret = self.straightline(call_expr, func_or_rcvr_exit, args);
418-
let m = self.tcx.hir.get_module_parent(call_expr.id);
418+
let m = self.tcx.hir().get_module_parent(call_expr.id);
419419
if self.tcx.is_ty_uninhabited_from(m, self.tables.expr_ty(call_expr)) {
420420
self.add_unreachable_node()
421421
} else {

src/librustc/middle/liveness.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
11971197
}
11981198

11991199
hir::ExprKind::Call(ref f, ref args) => {
1200-
let m = self.ir.tcx.hir.get_module_parent(expr.id);
1200+
let m = self.ir.tcx.hir().get_module_parent(expr.id);
12011201
let succ = if self.ir.tcx.is_ty_uninhabited_from(m, self.tables.expr_ty(expr)) {
12021202
self.s.exit_ln
12031203
} else {
@@ -1208,7 +1208,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
12081208
}
12091209

12101210
hir::ExprKind::MethodCall(.., ref args) => {
1211-
let m = self.ir.tcx.hir.get_module_parent(expr.id);
1211+
let m = self.ir.tcx.hir().get_module_parent(expr.id);
12121212
let succ = if self.ir.tcx.is_ty_uninhabited_from(m, self.tables.expr_ty(expr)) {
12131213
self.s.exit_ln
12141214
} else {

src/test/ui/consts/validate_never_arrays.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
22
--> $DIR/validate_never_arrays.rs:3:1
33
|
44
LL | const FOO: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at .<deref>[0]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at .<deref>
66
|
77
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
88

src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ help: ensure that all possible cases are being handled, possibly by adding wildc
1616
LL | let _ = match x {}; //~ ERROR non-exhaustive
1717
| ^
1818

19-
error[E0004]: non-exhaustive patterns: type (Void,) is non-empty
19+
error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
2020
--> $DIR/uninhabited-matches-feature-gated.rs:23:19
2121
|
2222
LL | let _ = match x {}; //~ ERROR non-exhaustive
@@ -28,7 +28,7 @@ help: ensure that all possible cases are being handled, possibly by adding wildc
2828
LL | let _ = match x {}; //~ ERROR non-exhaustive
2929
| ^
3030

31-
error[E0004]: non-exhaustive patterns: type [Void; 1] is non-empty
31+
error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
3232
--> $DIR/uninhabited-matches-feature-gated.rs:26:19
3333
|
3434
LL | let _ = match x {}; //~ ERROR non-exhaustive

0 commit comments

Comments
 (0)