Skip to content

Commit 9d4a7f9

Browse files
committed
Remove duplicated span from const eval frame list
When the primary span for a const error is the same as the first frame in the const error report, skip it. ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ explicit panic | 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) ``` instead of ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ explicit panic | 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!() | ^^^^^^^^ 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 encountered --> $DIR/issue-88434-removal-index-should-be-less.rs:3:23 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^^ ```
1 parent d6c5efd commit 9d4a7f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+7
-193
lines changed

compiler/rustc_const_eval/src/const_eval/error.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ where
147147
}
148148
// Report remaining errors.
149149
_ => {
150-
let (our_span, frames) = get_span_and_frames();
150+
let (our_span, mut frames) = get_span_and_frames();
151151
let span = span.substitute_dummy(our_span);
152+
if Some(span) == frames.get(0).map(|frame| frame.span) {
153+
frames.remove(0);
154+
}
152155
let err = mk(span, frames);
153156
let mut err = tcx.dcx().create_err(err);
154157
// We allow invalid programs in infallible promoteds since invalid layouts can occur

tests/ui/borrowck/issue-81899.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | panic!()
55
| ^^^^^^^^ explicit panic
66
|
7-
note: inside `f::<{closure@$DIR/issue-81899.rs:4:31: 4:34}>`
8-
--> $DIR/issue-81899.rs:11:5
9-
|
10-
LL | panic!()
11-
| ^^^^^^^^
127
note: inside `_CONST`
138
--> $DIR/issue-81899.rs:4:24
149
|

tests/ui/borrowck/issue-88434-minimal-example.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | panic!()
55
| ^^^^^^^^ explicit panic
66
|
7-
note: inside `f::<{closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28}>`
8-
--> $DIR/issue-88434-minimal-example.rs:10:5
9-
|
10-
LL | panic!()
11-
| ^^^^^^^^
127
note: inside `_CONST`
138
--> $DIR/issue-88434-minimal-example.rs:3:22
149
|

tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | panic!()
55
| ^^^^^^^^ explicit panic
66
|
7-
note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>`
8-
--> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
9-
|
10-
LL | panic!()
11-
| ^^^^^^^^
127
note: inside `_CONST`
138
--> $DIR/issue-88434-removal-index-should-be-less.rs:3:24
149
|

tests/ui/coherence/const-errs-dont-conflict-103369.stderr

-10
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | panic!("Some error occurred");
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some error occurred
66
|
7-
note: inside `my_fn`
8-
--> $DIR/const-errs-dont-conflict-103369.rs:10:5
9-
|
10-
LL | panic!("Some error occurred");
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
note: inside `<() as ConstGenericTrait<{my_fn(1)}>>::{constant#0}`
138
--> $DIR/const-errs-dont-conflict-103369.rs:5:25
149
|
@@ -22,11 +17,6 @@ error[E0080]: evaluation of constant value failed
2217
LL | panic!("Some error occurred");
2318
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some error occurred
2419
|
25-
note: inside `my_fn`
26-
--> $DIR/const-errs-dont-conflict-103369.rs:10:5
27-
|
28-
LL | panic!("Some error occurred");
29-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3020
note: inside `<() as ConstGenericTrait<{my_fn(2)}>>::{constant#0}`
3121
--> $DIR/const-errs-dont-conflict-103369.rs:7:25
3222
|

tests/ui/const-generics/issues/issue-100313.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | *(B as *const bool as *mut bool) = false;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to ALLOC0 which is read-only
66
|
7-
note: inside `T::<&true>::set_false`
8-
--> $DIR/issue-100313.rs:9:13
9-
|
10-
LL | *(B as *const bool as *mut bool) = false;
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
note: inside `_`
138
--> $DIR/issue-100313.rs:17:5
149
|

tests/ui/const-ptr/forbidden_slices.stderr

-10
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ error[E0080]: could not evaluate static initializer
104104
|
105105
= note: assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize
106106
|
107-
note: inside `std::ptr::const_ptr::<impl *const ()>::sub_ptr`
108-
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
109107
note: inside `from_ptr_range::<'_, ()>`
110108
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
111109
note: inside `R1`
@@ -120,8 +118,6 @@ error[E0080]: could not evaluate static initializer
120118
|
121119
= note: out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC10 which is only 4 bytes from the end of the allocation
122120
|
123-
note: inside `std::ptr::const_ptr::<impl *const u32>::add`
124-
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
125121
note: inside `R2`
126122
--> $DIR/forbidden_slices.rs:53:25
127123
|
@@ -179,8 +175,6 @@ error[E0080]: could not evaluate static initializer
179175
|
180176
= note: out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC11+0x1 which is only 7 bytes from the end of the allocation
181177
|
182-
note: inside `std::ptr::const_ptr::<impl *const u64>::add`
183-
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
184178
note: inside `R8`
185179
--> $DIR/forbidden_slices.rs:77:25
186180
|
@@ -192,8 +186,6 @@ error[E0080]: could not evaluate static initializer
192186
|
193187
= note: `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
194188
|
195-
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
196-
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
197189
note: inside `from_ptr_range::<'_, u32>`
198190
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
199191
note: inside `R9`
@@ -207,8 +199,6 @@ error[E0080]: could not evaluate static initializer
207199
|
208200
= note: `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
209201
|
210-
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
211-
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
212202
note: inside `from_ptr_range::<'_, u32>`
213203
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
214204
note: inside `R10`

tests/ui/const-ptr/out_of_bounds_read.stderr

-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: evaluation of constant value failed
33
|
44
= note: memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
55
|
6-
note: inside `std::ptr::read::<u32>`
7-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
86
note: inside `_READ`
97
--> $DIR/out_of_bounds_read.rs:10:33
108
|
@@ -16,8 +14,6 @@ error[E0080]: evaluation of constant value failed
1614
|
1715
= note: memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
1816
|
19-
note: inside `std::ptr::read::<u32>`
20-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
2117
note: inside `std::ptr::const_ptr::<impl *const u32>::read`
2218
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
2319
note: inside `_CONST_READ`
@@ -31,8 +27,6 @@ error[E0080]: evaluation of constant value failed
3127
|
3228
= note: memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
3329
|
34-
note: inside `std::ptr::read::<u32>`
35-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
3630
note: inside `std::ptr::mut_ptr::<impl *mut u32>::read`
3731
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
3832
note: inside `_MUT_READ`

tests/ui/consts/const-eval/const_fn_ptr_fail2.stderr

-10
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | x(y)
55
| ^^^^ calling non-const function `double`
66
|
7-
note: inside `bar`
8-
--> $DIR/const_fn_ptr_fail2.rs:9:5
9-
|
10-
LL | x(y)
11-
| ^^^^
127
note: inside `Y`
138
--> $DIR/const_fn_ptr_fail2.rs:14:18
149
|
@@ -21,11 +16,6 @@ error[E0080]: evaluation of constant value failed
2116
LL | x(y)
2217
| ^^^^ calling non-const function `double`
2318
|
24-
note: inside `bar`
25-
--> $DIR/const_fn_ptr_fail2.rs:9:5
26-
|
27-
LL | x(y)
28-
| ^^^^
2919
note: inside `Z`
3020
--> $DIR/const_fn_ptr_fail2.rs:15:18
3121
|

tests/ui/consts/const-eval/const_panic_track_caller.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const fn c() -> u32 {
1515
b()
1616
//~^ ERROR evaluation of constant value failed
1717
//~| NOTE hey
18-
//~| NOTE inside
1918
}
2019

2120
const X: u32 = c();

tests/ui/consts/const-eval/const_panic_track_caller.stderr

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ error[E0080]: evaluation of constant value failed
44
LL | b()
55
| ^^^ hey
66
|
7-
note: inside `c`
8-
--> $DIR/const_panic_track_caller.rs:15:5
9-
|
10-
LL | b()
11-
| ^^^
127
note: inside `X`
13-
--> $DIR/const_panic_track_caller.rs:21:16
8+
--> $DIR/const_panic_track_caller.rs:20:16
149
|
1510
LL | const X: u32 = c();
1611
| ^^^

tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | let _ = intrinsics::const_allocate(4, 3) as *mut i32;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid align passed to `const_allocate`: 3 is not a power of 2
66
|
7-
note: inside `foo`
8-
--> $DIR/alloc_intrinsic_errors.rs:8:17
9-
|
10-
LL | let _ = intrinsics::const_allocate(4, 3) as *mut i32;
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
note: inside `FOO`
138
--> $DIR/alloc_intrinsic_errors.rs:5:18
149
|

tests/ui/consts/const-eval/parse_ints.stderr

-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: evaluation of constant value failed
33
|
44
= note: from_ascii_radix: radix must lie in the range `[2, 36]`
55
|
6-
note: inside `core::num::<impl u64>::from_ascii_radix`
7-
--> $SRC_DIR/core/src/num/mod.rs:LL:COL
86
note: inside `core::num::<impl u64>::from_str_radix`
97
--> $SRC_DIR/core/src/num/mod.rs:LL:COL
108
note: inside `_TOO_LOW`
@@ -19,8 +17,6 @@ error[E0080]: evaluation of constant value failed
1917
|
2018
= note: from_ascii_radix: radix must lie in the range `[2, 36]`
2119
|
22-
note: inside `core::num::<impl u64>::from_ascii_radix`
23-
--> $SRC_DIR/core/src/num/mod.rs:LL:COL
2420
note: inside `core::num::<impl u64>::from_str_radix`
2521
--> $SRC_DIR/core/src/num/mod.rs:LL:COL
2622
note: inside `_TOO_HIGH`

tests/ui/consts/const-eval/raw-pointer-ub.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ error[E0080]: evaluation of constant value failed
1515
|
1616
= note: accessing memory with alignment 1, but alignment 4 is required
1717
|
18-
note: inside `copy_nonoverlapping::<u32>`
19-
--> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
2018
note: inside `std::ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
2119
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
2220
note: inside `MISALIGNED_COPY`

tests/ui/consts/const-eval/transmute-size-mismatch.stderr

-10
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | RET = CastTransmute(x);
55
| ^^^^^^^^^^^^^^^^^^^^^^ transmuting from 4-byte type to 2-byte type: `i32` -> `u16`
66
|
7-
note: inside `mir_transmute::<i32, u16>`
8-
--> $DIR/transmute-size-mismatch.rs:12:13
9-
|
10-
LL | RET = CastTransmute(x);
11-
| ^^^^^^^^^^^^^^^^^^^^^^
127
note: inside `FROM_BIGGER`
138
--> $DIR/transmute-size-mismatch.rs:20:35
149
|
@@ -21,11 +16,6 @@ error[E0080]: evaluation of constant value failed
2116
LL | RET = CastTransmute(x);
2217
| ^^^^^^^^^^^^^^^^^^^^^^ transmuting from 2-byte type to 4-byte type: `i16` -> `u32`
2318
|
24-
note: inside `mir_transmute::<i16, u32>`
25-
--> $DIR/transmute-size-mismatch.rs:12:13
26-
|
27-
LL | RET = CastTransmute(x);
28-
| ^^^^^^^^^^^^^^^^^^^^^^
2919
note: inside `FROM_SMALLER`
3020
--> $DIR/transmute-size-mismatch.rs:22:36
3121
|

tests/ui/consts/const-eval/ub-enum.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ error[E0080]: evaluation of constant value failed
121121
|
122122
= note: read discriminant of an uninhabited enum variant
123123
|
124-
note: inside `discriminant::<Never>`
125-
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
126124
note: inside `TEST_ICE_89765`
127125
--> $DIR/ub-enum.rs:103:14
128126
|

tests/ui/consts/const-eval/ub-invalid-values.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | let _val = *ptr as u32;
55
| ^^^^^^^^^^^ interpreting an invalid 8-bit value as a bool: 0x03
66
|
7-
note: inside `bool_cast`
8-
--> $DIR/ub-invalid-values.rs:2:16
9-
|
10-
LL | let _val = *ptr as u32;
11-
| ^^^^^^^^^^^
127
note: inside `_`
138
--> $DIR/ub-invalid-values.rs:8:5
149
|

tests/ui/consts/const-eval/ub-ref-ptr.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ error[E0080]: evaluation of constant value failed
153153
|
154154
= note: accessing memory based on pointer with alignment 1, but alignment 4 is required
155155
|
156-
note: inside `std::ptr::read::<u32>`
157-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
158156
note: inside `std::ptr::const_ptr::<impl *const u32>::read`
159157
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
160158
note: inside `UNALIGNED_READ`

tests/ui/consts/const-eval/unwind-abort.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | panic!()
55
| ^^^^^^^^ explicit panic
66
|
7-
note: inside `foo`
8-
--> $DIR/unwind-abort.rs:2:5
9-
|
10-
LL | panic!()
11-
| ^^^^^^^^
127
note: inside `_`
138
--> $DIR/unwind-abort.rs:5:15
149
|

tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ error[E0080]: evaluation of constant value failed
44
LL | unsafe { std::mem::transmute(()) }
55
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!`
66
|
7-
note: inside `foo`
8-
--> $DIR/validate_uninhabited_zsts.rs:2:14
9-
|
10-
LL | unsafe { std::mem::transmute(()) }
11-
| ^^^^^^^^^^^^^^^^^^^^^^^
127
note: inside `FOO`
138
--> $DIR/validate_uninhabited_zsts.rs:16:33
149
|

tests/ui/consts/const-ptr-is-null.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: evaluation of constant value failed
33
|
44
= note: null-ness of this pointer cannot be determined in const context
55
|
6-
note: inside `std::ptr::const_ptr::<impl *const T>::is_null::compiletime`
7-
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
86
note: inside `std::ptr::const_ptr::<impl *const i32>::is_null`
97
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
108
note: inside `MAYBE_NULL`

tests/ui/consts/const_unsafe_unreachable_ub.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: evaluation of constant value failed
33
|
44
= note: entering unreachable code
55
|
6-
note: inside `unreachable_unchecked`
7-
--> $SRC_DIR/core/src/hint.rs:LL:COL
86
note: inside `foo`
97
--> $DIR/const_unsafe_unreachable_ub.rs:6:18
108
|

tests/ui/consts/issue-miri-1910.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: evaluation of constant value failed
33
|
44
= note: unable to turn pointer into integer
55
|
6-
note: inside `std::ptr::read::<u8>`
7-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
86
note: inside `std::ptr::const_ptr::<impl *const u8>::read`
97
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
108
note: inside `C`

tests/ui/consts/miri_unleashed/abi-mismatch.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const fn call_rust_fn(my_fn: extern "Rust" fn()) {
77
my_fn();
88
//~^ ERROR could not evaluate static initializer
99
//~| NOTE calling a function with calling convention C using calling convention Rust
10-
//~| NOTE inside `call_rust_fn`
1110
}
1211

1312
static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });

tests/ui/consts/miri_unleashed/abi-mismatch.stderr

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ error[E0080]: could not evaluate static initializer
44
LL | my_fn();
55
| ^^^^^^^ calling a function with calling convention C using calling convention Rust
66
|
7-
note: inside `call_rust_fn`
8-
--> $DIR/abi-mismatch.rs:7:5
9-
|
10-
LL | my_fn();
11-
| ^^^^^^^
127
note: inside `VAL`
13-
--> $DIR/abi-mismatch.rs:13:18
8+
--> $DIR/abi-mismatch.rs:12:18
149
|
1510
LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
1611
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/consts/miri_unleashed/assoc_const.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: evaluation of `<String as Bar<Vec<u32>, String>>::F` failed
33
|
44
= note: calling non-const function `<Vec<u32> as Drop>::drop`
55
|
6-
note: inside `std::ptr::drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))`
7-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
86
note: inside `std::ptr::drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))`
97
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
108
note: inside `<String as Bar<Vec<u32>, String>>::F`

tests/ui/consts/miri_unleashed/drop.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: could not evaluate static initializer
33
|
44
= note: calling non-const function `<Vec<i32> as Drop>::drop`
55
|
6-
note: inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
7-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
86
note: inside `TEST_BAD`
97
--> $DIR/drop.rs:17:1
108
|

tests/ui/consts/missing_span_in_backtrace.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: evaluation of constant value failed
33
|
44
= note: unable to copy parts of a pointer from memory at ALLOC0
55
|
6-
note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>`
7-
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
86
note: inside `std::ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
97
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
108
note: inside `swap_nonoverlapping::compiletime::<MaybeUninit<u8>>`

0 commit comments

Comments
 (0)