diff options
| author | bors <bors@rust-lang.org> | 2020-04-01 20:30:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-01 20:30:35 +0000 |
| commit | 76b11980ad416c3ad6143504c2277757ecacf9b5 (patch) | |
| tree | 09ff9388a0a0a757eed3e6f73b646ed784241816 /src/test/ui | |
| parent | 235938d1acdd93d6641a741c81f64e415b786751 (diff) | |
| parent | 7d4d450da96677cb6b8f90af13ada38c74f73632 (diff) | |
Auto merge of #70672 - Dylan-DPC:rollup-cco9bbd, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #70535 (Track the finalizing node in the specialization graph) - #70590 (Miri: make backtrace function names and spans match up) - #70616 (rustc_target::abi: rename FieldPlacement to FieldsShape.) - #70626 (cargotest: remove webrender) - #70649 (clean up E0468 explanation) - #70662 (compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`.) Failed merges: r? @ghost
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr | 3 | ||||
| -rw-r--r-- | src/test/ui/consts/miri_unleashed/abi-mismatch.stderr | 3 | ||||
| -rw-r--r-- | src/test/ui/consts/miri_unleashed/drop.stderr | 7 | ||||
| -rw-r--r-- | src/test/ui/consts/offset_from_ub.stderr | 15 | ||||
| -rw-r--r-- | src/test/ui/consts/uninhabited-const-issue-61744.stderr | 194 | ||||
| -rw-r--r-- | src/test/ui/specialization/issue-70442.rs | 23 |
6 files changed, 171 insertions, 74 deletions
diff --git a/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr b/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr index cede356a6b8..f1e91920f17 100644 --- a/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr +++ b/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr @@ -5,7 +5,8 @@ LL | unsafe { std::mem::transmute(()) } | ^^^^^^^^^^^^^^^^^^^^^^^ | | | transmuting to uninhabited type - | inside call to `foo` at $DIR/validate_uninhabited_zsts.rs:14:26 + | inside `foo` at $DIR/validate_uninhabited_zsts.rs:5:14 + | inside `FOO` at $DIR/validate_uninhabited_zsts.rs:14:26 ... LL | const FOO: [Empty; 3] = [foo(); 3]; | ----------------------------------- diff --git a/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr b/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr index c7e902132e9..8ed1431dd31 100644 --- a/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr +++ b/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr @@ -17,7 +17,8 @@ LL | my_fn(); | ^^^^^^^ | | | calling a function with ABI C using caller ABI Rust - | inside call to `call_rust_fn` at $DIR/abi-mismatch.rs:13:17 + | inside `call_rust_fn` at $DIR/abi-mismatch.rs:9:5 + | inside `VAL` at $DIR/abi-mismatch.rs:13:17 ... LL | const VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) }); | -------------------------------------------------------------------------------------- diff --git a/src/test/ui/consts/miri_unleashed/drop.stderr b/src/test/ui/consts/miri_unleashed/drop.stderr index 2439d527bd1..5d560fab835 100644 --- a/src/test/ui/consts/miri_unleashed/drop.stderr +++ b/src/test/ui/consts/miri_unleashed/drop.stderr @@ -12,12 +12,15 @@ LL | | // Code here does not matter - this is replaced by the LL | | // real drop glue by the compiler. LL | | drop_in_place(to_drop) LL | | } - | |_^ calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop` + | | ^ + | | | + | |_calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop` + | inside `std::intrinsics::drop_in_place::<std::vec::Vec<i32>> - shim(Some(std::vec::Vec<i32>))` at $SRC_DIR/libcore/ptr/mod.rs:LL:COL | ::: $DIR/drop.rs:23:1 | LL | }; - | - inside call to `std::intrinsics::drop_in_place::<std::vec::Vec<i32>> - shim(Some(std::vec::Vec<i32>))` at $DIR/drop.rs:23:1 + | - inside `TEST_BAD` at $DIR/drop.rs:23:1 error: aborting due to previous error diff --git a/src/test/ui/consts/offset_from_ub.stderr b/src/test/ui/consts/offset_from_ub.stderr index 21753074007..f1a183b229d 100644 --- a/src/test/ui/consts/offset_from_ub.stderr +++ b/src/test/ui/consts/offset_from_ub.stderr @@ -5,7 +5,8 @@ LL | intrinsics::ptr_offset_from(self, origin) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | ptr_offset_from cannot compute offset of pointers into different allocations. - | inside call to `std::ptr::const_ptr::<impl *const Struct>::offset_from` at $DIR/offset_from_ub.rs:22:27 + | inside `std::ptr::const_ptr::<impl *const Struct>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL + | inside `DIFFERENT_ALLOC` at $DIR/offset_from_ub.rs:22:27 | ::: $DIR/offset_from_ub.rs:16:1 | @@ -27,7 +28,8 @@ LL | intrinsics::ptr_offset_from(self, origin) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unable to turn bytes into a pointer - | inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:28:14 + | inside `std::ptr::const_ptr::<impl *const u8>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL + | inside `NOT_PTR` at $DIR/offset_from_ub.rs:28:14 | ::: $DIR/offset_from_ub.rs:26:1 | @@ -44,7 +46,8 @@ LL | intrinsics::ptr_offset_from(self, origin) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | exact_div: 1isize cannot be divided by 2isize without remainder - | inside call to `std::ptr::const_ptr::<impl *const u16>::offset_from` at $DIR/offset_from_ub.rs:36:14 + | inside `std::ptr::const_ptr::<impl *const u16>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL + | inside `NOT_MULTIPLE_OF_SIZE` at $DIR/offset_from_ub.rs:36:14 | ::: $DIR/offset_from_ub.rs:31:1 | @@ -64,7 +67,8 @@ LL | intrinsics::ptr_offset_from(self, origin) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | invalid use of NULL pointer - | inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:42:14 + | inside `std::ptr::const_ptr::<impl *const u8>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL + | inside `OFFSET_FROM_NULL` at $DIR/offset_from_ub.rs:42:14 | ::: $DIR/offset_from_ub.rs:39:1 | @@ -82,7 +86,8 @@ LL | intrinsics::ptr_offset_from(self, origin) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unable to turn bytes into a pointer - | inside call to `std::ptr::const_ptr::<impl *const u8>::offset_from` at $DIR/offset_from_ub.rs:49:14 + | inside `std::ptr::const_ptr::<impl *const u8>::offset_from` at $SRC_DIR/libcore/ptr/const_ptr.rs:LL:COL + | inside `DIFFERENT_INT` at $DIR/offset_from_ub.rs:49:14 | ::: $DIR/offset_from_ub.rs:45:1 | diff --git a/src/test/ui/consts/uninhabited-const-issue-61744.stderr b/src/test/ui/consts/uninhabited-const-issue-61744.stderr index 1f3e2cf5b2f..ca232380897 100644 --- a/src/test/ui/consts/uninhabited-const-issue-61744.stderr +++ b/src/test/ui/consts/uninhabited-const-issue-61744.stderr @@ -4,76 +4,140 @@ error[E0080]: evaluation of constant value failed LL | hint_unreachable() | ------------------ | | - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 - | inside call to `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5 + | inside `fake_type::<i32>` at $DIR/uninhabited-const-issue-61744.rs:4:5 ... LL | fake_type() | ^^^^^^^^^^^ | | | reached the configured maximum number of stack frames - | inside call to `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 + | inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5 error: any use of this value will cause an error --> $DIR/uninhabited-const-issue-61744.rs:12:36 diff --git a/src/test/ui/specialization/issue-70442.rs b/src/test/ui/specialization/issue-70442.rs new file mode 100644 index 00000000000..4371dd2e167 --- /dev/null +++ b/src/test/ui/specialization/issue-70442.rs @@ -0,0 +1,23 @@ +#![feature(specialization)] + +// check-pass + +trait Trait { + type Assoc; +} + +impl<T> Trait for T { + default type Assoc = bool; +} + +// This impl inherits the `Assoc` definition from above and "locks it in", or finalizes it, making +// child impls unable to further specialize it. However, since the specialization graph didn't +// correctly track this, we would refuse to project `Assoc` from this impl, even though that should +// happen for items that are final. +impl Trait for () {} + +fn foo<X: Trait<Assoc=bool>>() {} + +fn main() { + foo::<()>(); // `<() as Trait>::Assoc` is normalized to `bool` correctly +} |
