Update tests
This commit is contained in:
parent
573c1ffb78
commit
2ba3e66fa6
@ -415,7 +415,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
||||
args: I) -> CFGIndex {
|
||||
let func_or_rcvr_exit = self.expr(func_or_rcvr, pred);
|
||||
let ret = self.straightline(call_expr, func_or_rcvr_exit, args);
|
||||
let m = self.tcx.hir.get_module_parent(call_expr.id);
|
||||
let m = self.tcx.hir().get_module_parent(call_expr.id);
|
||||
if self.tcx.is_ty_uninhabited_from(m, self.tables.expr_ty(call_expr)) {
|
||||
self.add_unreachable_node()
|
||||
} else {
|
||||
|
@ -1197,7 +1197,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
||||
}
|
||||
|
||||
hir::ExprKind::Call(ref f, ref args) => {
|
||||
let m = self.ir.tcx.hir.get_module_parent(expr.id);
|
||||
let m = self.ir.tcx.hir().get_module_parent(expr.id);
|
||||
let succ = if self.ir.tcx.is_ty_uninhabited_from(m, self.tables.expr_ty(expr)) {
|
||||
self.s.exit_ln
|
||||
} else {
|
||||
@ -1208,7 +1208,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
||||
}
|
||||
|
||||
hir::ExprKind::MethodCall(.., ref args) => {
|
||||
let m = self.ir.tcx.hir.get_module_parent(expr.id);
|
||||
let m = self.ir.tcx.hir().get_module_parent(expr.id);
|
||||
let succ = if self.ir.tcx.is_ty_uninhabited_from(m, self.tables.expr_ty(expr)) {
|
||||
self.s.exit_ln
|
||||
} else {
|
||||
|
@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
|
||||
--> $DIR/validate_never_arrays.rs:3:1
|
||||
|
|
||||
LL | const FOO: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at .<deref>[0]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at .<deref>
|
||||
|
|
||||
= 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
|
||||
|
||||
|
@ -16,7 +16,7 @@ help: ensure that all possible cases are being handled, possibly by adding wildc
|
||||
LL | let _ = match x {}; //~ ERROR non-exhaustive
|
||||
| ^
|
||||
|
||||
error[E0004]: non-exhaustive patterns: type (Void,) is non-empty
|
||||
error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
|
||||
--> $DIR/uninhabited-matches-feature-gated.rs:23:19
|
||||
|
|
||||
LL | let _ = match x {}; //~ ERROR non-exhaustive
|
||||
@ -28,7 +28,7 @@ help: ensure that all possible cases are being handled, possibly by adding wildc
|
||||
LL | let _ = match x {}; //~ ERROR non-exhaustive
|
||||
| ^
|
||||
|
||||
error[E0004]: non-exhaustive patterns: type [Void; 1] is non-empty
|
||||
error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
|
||||
--> $DIR/uninhabited-matches-feature-gated.rs:26:19
|
||||
|
|
||||
LL | let _ = match x {}; //~ ERROR non-exhaustive
|
||||
|
Loading…
x
Reference in New Issue
Block a user