about summary refs log tree commit diff
path: root/src/test/ui/borrowck
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-29 13:10:42 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-12-06 18:59:46 +0000
commit99348a5330cb4d6e3bb2e28badebd76561b8996f (patch)
tree4f203b0595506539c7247a0836e41db91221bb23 /src/test/ui/borrowck
parentfa99459b4286a2fb45dd1f224a9fc5788da84cfb (diff)
downloadrust-99348a5330cb4d6e3bb2e28badebd76561b8996f.tar.gz
rust-99348a5330cb4d6e3bb2e28badebd76561b8996f.zip
Change CTFE backtraces to use `note` instead of `label` to preserve their order
labels are reordered within the file in which they are reported, which can mess up the stack trace
Diffstat (limited to 'src/test/ui/borrowck')
-rw-r--r--src/test/ui/borrowck/issue-81899.stderr16
-rw-r--r--src/test/ui/borrowck/issue-88434-minimal-example.stderr16
-rw-r--r--src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr16
3 files changed, 30 insertions, 18 deletions
diff --git a/src/test/ui/borrowck/issue-81899.stderr b/src/test/ui/borrowck/issue-81899.stderr
index ce9ffbea9cd..1b03bc3af9c 100644
--- a/src/test/ui/borrowck/issue-81899.stderr
+++ b/src/test/ui/borrowck/issue-81899.stderr
@@ -1,15 +1,19 @@
 error[E0080]: evaluation of constant value failed
   --> $DIR/issue-81899.rs:11:5
    |
-LL | const _CONST: &[u8] = &f(&[], |_| {});
-   |                        -------------- inside `_CONST`
-...
+LL |     panic!()
+   |     ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-81899.rs:11:5
+   |
+note: inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34]>`
+  --> $DIR/issue-81899.rs:11:5
+   |
 LL |     panic!()
    |     ^^^^^^^^
-   |     |
-   |     the evaluated program panicked at 'explicit panic', $DIR/issue-81899.rs:11:5
-   |     inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34]>`
+note: inside `_CONST`
+  --> $DIR/issue-81899.rs:4:24
    |
+LL | const _CONST: &[u8] = &f(&[], |_| {});
+   |                        ^^^^^^^^^^^^^^
    = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 note: erroneous constant used
diff --git a/src/test/ui/borrowck/issue-88434-minimal-example.stderr b/src/test/ui/borrowck/issue-88434-minimal-example.stderr
index 3e0f6df07ed..a5a571c6d4d 100644
--- a/src/test/ui/borrowck/issue-88434-minimal-example.stderr
+++ b/src/test/ui/borrowck/issue-88434-minimal-example.stderr
@@ -1,15 +1,19 @@
 error[E0080]: evaluation of constant value failed
   --> $DIR/issue-88434-minimal-example.rs:10:5
    |
-LL | const _CONST: &() = &f(&|_| {});
-   |                      ---------- inside `_CONST`
-...
+LL |     panic!()
+   |     ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:10:5
+   |
+note: inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28]>`
+  --> $DIR/issue-88434-minimal-example.rs:10:5
+   |
 LL |     panic!()
    |     ^^^^^^^^
-   |     |
-   |     the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:10:5
-   |     inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28]>`
+note: inside `_CONST`
+  --> $DIR/issue-88434-minimal-example.rs:3:22
    |
+LL | const _CONST: &() = &f(&|_| {});
+   |                      ^^^^^^^^^^
    = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 note: erroneous constant used
diff --git a/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr b/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
index b971daf7c86..00023c459a8 100644
--- a/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
+++ b/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
@@ -1,15 +1,19 @@
 error[E0080]: evaluation of constant value failed
   --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
    |
-LL | const _CONST: &[u8] = &f(&[], |_| {});
-   |                        -------------- inside `_CONST`
-...
+LL |     panic!()
+   |     ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:10:5
+   |
+note: inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34]>`
+  --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
+   |
 LL |     panic!()
    |     ^^^^^^^^
-   |     |
-   |     the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:10:5
-   |     inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34]>`
+note: inside `_CONST`
+  --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24
    |
+LL | const _CONST: &[u8] = &f(&[], |_| {});
+   |                        ^^^^^^^^^^^^^^
    = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 note: erroneous constant used