From 3f6dc9a8abe9ffd804fed2ddaabb1c67de4c8fbd Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Sun, 27 Jun 2021 12:41:50 +0000 Subject: Add #[track_caller] for some function in core::mem. These functions can panic for some types. This makes the panic point to the code that calls e.g. mem::uninitialized(), instead of inside the definition of mem::uninitialized. --- src/test/ui/consts/assume-type-intrinsics.stderr | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/test/ui/consts/assume-type-intrinsics.stderr b/src/test/ui/consts/assume-type-intrinsics.stderr index d46ce44b7ba..e660730396f 100644 --- a/src/test/ui/consts/assume-type-intrinsics.stderr +++ b/src/test/ui/consts/assume-type-intrinsics.stderr @@ -1,17 +1,9 @@ error: any use of this value will cause an error - --> $SRC_DIR/core/src/mem/maybe_uninit.rs:LL:COL - | -LL | intrinsics::assert_inhabited::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | aborted execution: attempted to instantiate uninhabited type `!` - | inside `MaybeUninit::::assume_init` at $SRC_DIR/core/src/mem/maybe_uninit.rs:LL:COL - | inside `_BAD` at $DIR/assume-type-intrinsics.rs:11:9 - | - ::: $DIR/assume-type-intrinsics.rs:10:5 + --> $DIR/assume-type-intrinsics.rs:11:9 | LL | / const _BAD: () = unsafe { LL | | MaybeUninit::::uninit().assume_init(); + | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!` LL | | }; | |______- | -- cgit 1.4.1-3-g733a5