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
This commit is contained in:
Oli Scherer 2022-11-29 13:10:42 +00:00
parent fa99459b42
commit 99348a5330
29 changed files with 1868 additions and 652 deletions

View file

@ -123,14 +123,14 @@ impl<'tcx> ConstEvalErr<'tcx> {
// Helper closure to print duplicated lines.
let mut flush_last_line = |last_frame, times| {
if let Some((line, span)) = last_frame {
err.span_label(span, &line);
err.span_note(span, &line);
// Don't print [... additional calls ...] if the number of lines is small
if times < 3 {
for _ in 0..times {
err.span_label(span, &line);
err.span_note(span, &line);
}
} else {
err.span_label(
err.span_note(
span,
format!("[... {} additional calls {} ...]", times, &line),
);

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -2,15 +2,18 @@ error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` failed
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| size_of called on unsized type `dyn Debug`
| inside `std::mem::size_of::<dyn Debug>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ size_of called on unsized type `dyn Debug`
|
::: $DIR/issue-80742.rs:22:10
note: inside `std::mem::size_of::<dyn Debug>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `Inline::<dyn Debug>::{constant#0}`
--> $DIR/issue-80742.rs:22:10
|
LL | [u8; size_of::<T>() + 1]: ,
| -------------- inside `Inline::<dyn Debug>::{constant#0}`
| ^^^^^^^^^^^^^^
error[E0599]: the function or associated item `new` exists for struct `Inline<dyn Debug>`, but its trait bounds were not satisfied
--> $DIR/issue-80742.rs:30:36
@ -33,15 +36,18 @@ error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` failed
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| size_of called on unsized type `dyn Debug`
| inside `std::mem::size_of::<dyn Debug>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ size_of called on unsized type `dyn Debug`
|
::: $DIR/issue-80742.rs:14:10
note: inside `std::mem::size_of::<dyn Debug>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `Inline::<dyn Debug>::{constant#0}`
--> $DIR/issue-80742.rs:14:10
|
LL | [u8; size_of::<T>() + 1]: ,
| -------------- inside `Inline::<dyn Debug>::{constant#0}`
| ^^^^^^^^^^^^^^
error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
--> $DIR/issue-80742.rs:30:15

View file

@ -1,14 +1,19 @@
error[E0080]: evaluation of constant value failed
--> $DIR/issue-100313.rs:10:13
|
LL | *(B as *const bool as *mut bool) = false;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to alloc7 which is read-only
|
note: inside `T::<&true>::set_false`
--> $DIR/issue-100313.rs:10:13
|
LL | *(B as *const bool as *mut bool) = false;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| writing to alloc7 which is read-only
| inside `T::<&true>::set_false`
...
note: inside `_`
--> $DIR/issue-100313.rs:18:5
|
LL | x.set_false();
| ------------- inside `_`
| ^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -2,43 +2,52 @@ error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
| inside `std::slice::from_raw_parts::<'_, u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
::: $DIR/forbidden_slices.rs:18:34
note: inside `std::slice::from_raw_parts::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S0`
--> $DIR/forbidden_slices.rs:18:34
|
LL | pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
| ------------------------------ inside `S0`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
| inside `std::slice::from_raw_parts::<'_, ()>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
::: $DIR/forbidden_slices.rs:19:33
note: inside `std::slice::from_raw_parts::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S1`
--> $DIR/forbidden_slices.rs:19:33
|
LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
| ------------------------------ inside `S1`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
| inside `std::slice::from_raw_parts::<'_, u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
::: $DIR/forbidden_slices.rs:22:34
note: inside `std::slice::from_raw_parts::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S2`
--> $DIR/forbidden_slices.rs:22:34
|
LL | pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
| ---------------------- inside `S2`
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:25:1
@ -89,72 +98,85 @@ error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
| inside `std::slice::from_raw_parts::<'_, u64>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
::: $DIR/forbidden_slices.rs:43:5
note: inside `std::slice::from_raw_parts::<'_, u64>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S8`
--> $DIR/forbidden_slices.rs:43:5
|
LL | from_raw_parts(ptr, 1)
| ---------------------- inside `S8`
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
|
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, u32>`
|
::: $DIR/forbidden_slices.rs:46:34
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R0`
--> $DIR/forbidden_slices.rs:46:34
|
LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
| ---------------------------------------- inside `R0`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| inside `ptr::const_ptr::<impl *const ()>::sub_ptr`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const ()>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, ()>`
|
::: $DIR/forbidden_slices.rs:47:33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R1`
--> $DIR/forbidden_slices.rs:47:33
|
LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
| ---------------------------------------- inside `R1`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
| inside `ptr::const_ptr::<impl *const u32>::offset`
...
LL | unsafe { self.offset(count as isize) }
| --------------------------- inside `ptr::const_ptr::<impl *const u32>::add`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
::: $DIR/forbidden_slices.rs:50:25
note: inside `ptr::const_ptr::<impl *const u32>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u32>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { self.offset(count as isize) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R2`
--> $DIR/forbidden_slices.rs:50:25
|
LL | from_ptr_range(ptr..ptr.add(2))
| ---------- inside `R2`
| ^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:52:1
@ -205,56 +227,67 @@ error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
| inside `ptr::const_ptr::<impl *const u64>::offset`
...
LL | unsafe { self.offset(count as isize) }
| --------------------------- inside `ptr::const_ptr::<impl *const u64>::add`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
::: $DIR/forbidden_slices.rs:74:25
note: inside `ptr::const_ptr::<impl *const u64>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u64>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { self.offset(count as isize) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R8`
--> $DIR/forbidden_slices.rs:74:25
|
LL | from_ptr_range(ptr..ptr.add(1))
| ---------- inside `R8`
| ^^^^^^^^^^
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `ptr_offset_from_unsigned` called on pointers into different allocations
| inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
|
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, u32>`
|
::: $DIR/forbidden_slices.rs:79:34
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R9`
--> $DIR/forbidden_slices.rs:79:34
|
LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) };
| ----------------------------------------------- inside `R9`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `ptr_offset_from_unsigned` called on pointers into different allocations
| inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
|
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, u32>`
|
::: $DIR/forbidden_slices.rs:80:35
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R10`
--> $DIR/forbidden_slices.rs:80:35
|
LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
| ------------------------ inside `R10`
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 18 previous errors

View file

@ -2,53 +2,62 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
| inside `std::ptr::read::<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
|
::: $DIR/out_of_bounds_read.rs:12:33
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `_READ`
--> $DIR/out_of_bounds_read.rs:12:33
|
LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
| ----------------------- inside `_READ`
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
| inside `std::ptr::read::<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
|
::: $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { read(self) }
| ---------- inside `ptr::const_ptr::<impl *const u32>::read`
|
::: $DIR/out_of_bounds_read.rs:13:39
| ^^^^^^^^^^
note: inside `_CONST_READ`
--> $DIR/out_of_bounds_read.rs:13:39
|
LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
| ------------------- inside `_CONST_READ`
| ^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
| inside `std::ptr::read::<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
|
::: $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::mut_ptr::<impl *mut u32>::read`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
|
LL | unsafe { read(self) }
| ---------- inside `ptr::mut_ptr::<impl *mut u32>::read`
|
::: $DIR/out_of_bounds_read.rs:14:37
| ^^^^^^^^^^
note: inside `_MUT_READ`
--> $DIR/out_of_bounds_read.rs:14:37
|
LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
| --------------------------------- inside `_MUT_READ`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors

View file

@ -1,26 +1,36 @@
error[E0080]: evaluation of constant value failed
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
LL | x(y)
| ^^^^ calling non-const function `double`
|
note: inside `bar`
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
LL | x(y)
| ^^^^
| |
| calling non-const function `double`
| inside `bar`
...
note: inside `Y`
--> $DIR/const_fn_ptr_fail2.rs:14:18
|
LL | const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
| --------- inside `Y`
| ^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
LL | x(y)
| ^^^^ calling non-const function `double`
|
note: inside `bar`
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
LL | x(y)
| ^^^^
| |
| calling non-const function `double`
| inside `bar`
...
note: inside `Z`
--> $DIR/const_fn_ptr_fail2.rs:15:18
|
LL | const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
| -------------- inside `Z`
| ^^^^^^^^^^^^^^
warning: skipping const checks
|

View file

@ -1,14 +1,19 @@
error[E0080]: evaluation of constant value failed
--> $DIR/const_panic_track_caller.rs:15:5
|
LL | b()
| ^^^ the evaluated program panicked at 'hey', $DIR/const_panic_track_caller.rs:15:5
|
note: inside `c`
--> $DIR/const_panic_track_caller.rs:15:5
|
LL | b()
| ^^^
| |
| the evaluated program panicked at 'hey', $DIR/const_panic_track_caller.rs:15:5
| inside `c`
...
note: inside `X`
--> $DIR/const_panic_track_caller.rs:21:16
|
LL | const X: u32 = c();
| --- inside `X`
| ^^^
error: aborting due to previous error

View file

@ -1,14 +1,19 @@
error[E0080]: evaluation of constant value failed
--> $DIR/alloc_intrinsic_errors.rs:9:17
|
LL | const FOO: i32 = foo();
| ----- inside `FOO`
...
LL | let _ = intrinsics::const_allocate(4, 3) as *mut i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ align has to be a power of 2, `3` is not a power of 2
|
note: inside `foo`
--> $DIR/alloc_intrinsic_errors.rs:9:17
|
LL | let _ = intrinsics::const_allocate(4, 3) as *mut i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| align has to be a power of 2, `3` is not a power of 2
| inside `foo`
note: inside `FOO`
--> $DIR/alloc_intrinsic_errors.rs:6:18
|
LL | const FOO: i32 = foo();
| ^^^^^
error: aborting due to previous error

View file

@ -2,14 +2,18 @@ error[E0080]: evaluation of constant value failed
--> $DIR/unwind-abort.rs:4:5
|
LL | panic!()
| ^^^^^^^^
| |
| the evaluated program panicked at 'explicit panic', $DIR/unwind-abort.rs:4:5
| inside `foo`
...
LL | const _: () = foo();
| ----- inside `_`
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/unwind-abort.rs:4:5
|
note: inside `foo`
--> $DIR/unwind-abort.rs:4:5
|
LL | panic!()
| ^^^^^^^^
note: inside `_`
--> $DIR/unwind-abort.rs:7:15
|
LL | const _: () = foo();
| ^^^^^
= 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)
error: aborting due to previous error

View file

@ -13,14 +13,19 @@ LL | unsafe { std::mem::transmute(()) }
error[E0080]: evaluation of constant value failed
--> $DIR/validate_uninhabited_zsts.rs:4:14
|
LL | unsafe { std::mem::transmute(()) }
| ^^^^^^^^^^^^^^^^^^^^^^^ transmuting to uninhabited type
|
note: inside `foo`
--> $DIR/validate_uninhabited_zsts.rs:4:14
|
LL | unsafe { std::mem::transmute(()) }
| ^^^^^^^^^^^^^^^^^^^^^^^
| |
| transmuting to uninhabited type
| inside `foo`
...
note: inside `FOO`
--> $DIR/validate_uninhabited_zsts.rs:19:33
|
LL | const FOO: [empty::Empty; 3] = [foo(); 3];
| ----- inside `FOO`
| ^^^^^
error[E0080]: it is undefined behavior to use this value
--> $DIR/validate_uninhabited_zsts.rs:21:1

View file

@ -2,38 +2,46 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
| inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32`
...
LL | unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) }
| -------------------------------------------------------------------- inside `core::f32::<impl f32>::to_bits`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
|
::: $DIR/const-float-bits-reject-conv.rs:28:30
note: inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f32::<impl f32>::to_bits`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
LL | unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f32::MASKED_NAN1`
--> $DIR/const-float-bits-reject-conv.rs:28:30
|
LL | const MASKED_NAN1: u32 = f32::NAN.to_bits() ^ 0x002A_AAAA;
| ------------------ inside `f32::MASKED_NAN1`
|
| ^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
| inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32`
...
LL | unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) }
| -------------------------------------------------------------------- inside `core::f32::<impl f32>::to_bits`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
|
::: $DIR/const-float-bits-reject-conv.rs:30:30
note: inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f32::<impl f32>::to_bits`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
LL | unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f32::MASKED_NAN2`
--> $DIR/const-float-bits-reject-conv.rs:30:30
|
LL | const MASKED_NAN2: u32 = f32::NAN.to_bits() ^ 0x0055_5555;
| ------------------ inside `f32::MASKED_NAN2`
|
| ^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant used
@ -64,38 +72,46 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
| inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64`
...
LL | unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) }
| -------------------------------------------------------------------- inside `core::f64::<impl f64>::to_bits`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
|
::: $DIR/const-float-bits-reject-conv.rs:50:30
note: inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f64::<impl f64>::to_bits`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
LL | unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f64::MASKED_NAN1`
--> $DIR/const-float-bits-reject-conv.rs:50:30
|
LL | const MASKED_NAN1: u64 = f64::NAN.to_bits() ^ 0x000A_AAAA_AAAA_AAAA;
| ------------------ inside `f64::MASKED_NAN1`
|
| ^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
| inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64`
...
LL | unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) }
| -------------------------------------------------------------------- inside `core::f64::<impl f64>::to_bits`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
|
::: $DIR/const-float-bits-reject-conv.rs:52:30
note: inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f64::<impl f64>::to_bits`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
LL | unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f64::MASKED_NAN2`
--> $DIR/const-float-bits-reject-conv.rs:52:30
|
LL | const MASKED_NAN2: u64 = f64::NAN.to_bits() ^ 0x0005_5555_5555_5555;
| ------------------ inside `f64::MASKED_NAN2`
|
| ^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant used

View file

@ -1,14 +1,19 @@
error[E0080]: evaluation of constant value failed
--> $DIR/mut_ref_in_final_dynamic_check.rs:13:10
|
LL | Some(&mut *(42 as *mut i32))
| ^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: 0x2a[noalloc] is a dangling pointer (it has no provenance)
|
note: inside `helper`
--> $DIR/mut_ref_in_final_dynamic_check.rs:13:10
|
LL | Some(&mut *(42 as *mut i32))
| ^^^^^^^^^^^^^^^^^^^^^^
| |
| dereferencing pointer failed: 0x2a[noalloc] is a dangling pointer (it has no provenance)
| inside `helper`
...
note: inside `A`
--> $DIR/mut_ref_in_final_dynamic_check.rs:18:29
|
LL | const A: Option<&mut i32> = helper();
| -------- inside `A`
| ^^^^^^^^
error: encountered dangling pointer in final constant
--> $DIR/mut_ref_in_final_dynamic_check.rs:25:1

View file

@ -2,18 +2,23 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/hint.rs:LL:COL
|
LL | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| entering unreachable code
| inside `unreachable_unchecked`
| ^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
|
::: $DIR/const_unsafe_unreachable_ub.rs:6:18
note: inside `unreachable_unchecked`
--> $SRC_DIR/core/src/hint.rs:LL:COL
|
LL | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `foo`
--> $DIR/const_unsafe_unreachable_ub.rs:6:18
|
LL | false => std::hint::unreachable_unchecked(),
| ---------------------------------- inside `foo`
...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `BAR`
--> $DIR/const_unsafe_unreachable_ub.rs:10:28
|
LL | const BAR: bool = unsafe { foo(false) };
| ---------- inside `BAR`
| ^^^^^^^^^^
error: aborting due to previous error

View file

@ -32,20 +32,23 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| accessing memory with alignment 1, but alignment 4 is required
| inside `std::ptr::read::<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment 1, but alignment 4 is required
|
::: $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { read(self) }
| ---------- inside `ptr::const_ptr::<impl *const u32>::read`
|
::: $DIR/detect-extra-ub.rs:38:9
| ^^^^^^^^^^
note: inside `INNER`
--> $DIR/detect-extra-ub.rs:38:9
|
LL | ptr.read();
| ---------- inside `INNER`
| ^^^^^^^^^^
note: erroneous constant used
--> $DIR/detect-extra-ub.rs:32:5

View file

@ -2,23 +2,25 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| unable to copy parts of a pointer from memory at ALLOC
| inside `std::ptr::read::<u8>`
|
::: $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { read(self) }
| ---------- inside `ptr::const_ptr::<impl *const u8>::read`
|
::: $DIR/issue-miri-1910.rs:8:5
|
LL | (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
| ------------------------------------------------------------------- inside `C`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to copy parts of a pointer from memory at ALLOC
|
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
note: inside `std::ptr::read::<u8>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u8>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { read(self) }
| ^^^^^^^^^^
note: inside `C`
--> $DIR/issue-miri-1910.rs:8:5
|
LL | (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -1,14 +1,19 @@
error[E0080]: could not evaluate static initializer
--> $DIR/abi-mismatch.rs:9:5
|
LL | my_fn();
| ^^^^^^^ calling a function with calling convention C using calling convention Rust
|
note: inside `call_rust_fn`
--> $DIR/abi-mismatch.rs:9:5
|
LL | my_fn();
| ^^^^^^^
| |
| calling a function with calling convention C using calling convention Rust
| inside `call_rust_fn`
...
note: inside `VAL`
--> $DIR/abi-mismatch.rs:15:18
|
LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
| --------------------------------------------------------------------- inside `VAL`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: skipping const checks
|

View file

@ -2,16 +2,23 @@ error[E0080]: evaluation of `<std::string::String as Bar<std::vec::Vec<u32>, std
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| calling non-const function `<Vec<u32> as Drop>::drop`
| inside `std::ptr::drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))`
| inside `std::ptr::drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<u32> as Drop>::drop`
|
::: $DIR/assoc_const.rs:12:31
note: inside `std::ptr::drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `std::ptr::drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `<String as Bar<Vec<u32>, String>>::F`
--> $DIR/assoc_const.rs:12:31
|
LL | const F: u32 = (U::X, 42).1;
| - inside `<String as Bar<Vec<u32>, String>>::F`
| ^
note: erroneous constant used
--> $DIR/assoc_const.rs:29:13

View file

@ -2,15 +2,18 @@ error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| calling non-const function `<Vec<i32> as Drop>::drop`
| inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<i32> as Drop>::drop`
|
::: $DIR/drop.rs:17:1
note: inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `TEST_BAD`
--> $DIR/drop.rs:17:1
|
LL | };
| - inside `TEST_BAD`
| ^
warning: skipping const checks
|

View file

@ -1,22 +1,25 @@
error[E0080]: evaluation of constant value failed
/rustc/xyz/library/core/src/ptr/mod.rs:925:14: inside `swap_nonoverlapping::<MaybeUninit<u8>>`
/rustc/xyz/library/core/src/ptr/mod.rs:944:9: inside `ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
--> /rustc/xyz/library/core/src/ptr/mod.rs:1135:9
note: unable to copy parts of a pointer from memory at alloc10
note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>`
/rustc/xyz/library/core/src/mem/mod.rs:773:17: inside `mem::swap_simple::<MaybeUninit<MaybeUninit<u8>>>`
/rustc/xyz/library/core/src/ptr/mod.rs:1135:9: unable to copy parts of a pointer from memory at alloc10
|
::: $DIR/missing_span_in_backtrace.rs:16:9
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>`
/rustc/xyz/library/core/src/ptr/mod.rs:1135:9
note: inside `mem::swap_simple::<MaybeUninit<MaybeUninit<u8>>>`
/rustc/xyz/library/core/src/mem/mod.rs:773:17
note: inside `ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
/rustc/xyz/library/core/src/ptr/mod.rs:944:9
note: inside `swap_nonoverlapping::<MaybeUninit<u8>>`
/rustc/xyz/library/core/src/ptr/mod.rs:925:14
note: inside `X`
--> $DIR/missing_span_in_backtrace.rs:16:9
|
LL | / ptr::swap_nonoverlapping(
LL | | &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
LL | | &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
LL | | mem::size_of::<&i32>(),
LL | | );
| |_________- inside `X`
|
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
| |_________^
error: aborting due to previous error

View file

@ -8,15 +8,18 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `ptr_offset_from` called on pointers into different allocations
| inside `ptr::const_ptr::<impl *const u8>::offset_from`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on pointers into different allocations
|
::: $DIR/offset_from_ub.rs:24:14
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `NOT_PTR`
--> $DIR/offset_from_ub.rs:24:14
|
LL | unsafe { (42 as *const u8).offset_from(&5u8) as usize }
| ----------------------------------- inside `NOT_PTR`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $DIR/offset_from_ub.rs:31:14
@ -88,29 +91,35 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset_from`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
|
::: $DIR/offset_from_ub.rs:115:14
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OFFSET_VERY_FAR1`
--> $DIR/offset_from_ub.rs:115:14
|
LL | unsafe { ptr2.offset_from(ptr1) }
| ---------------------- inside `OFFSET_VERY_FAR1`
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset_from`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
|
::: $DIR/offset_from_ub.rs:121:14
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OFFSET_VERY_FAR2`
--> $DIR/offset_from_ub.rs:121:14
|
LL | unsafe { ptr1.offset_from(ptr2.wrapping_offset(1)) }
| ----------------------------------------- inside `OFFSET_VERY_FAR2`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 15 previous errors

View file

@ -2,169 +2,205 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
|
::: $DIR/offset_ub.rs:7:46
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `BEFORE_START`
--> $DIR/offset_ub.rs:7:46
|
LL | pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) };
| ------------------------------ inside `BEFORE_START`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
|
::: $DIR/offset_ub.rs:8:43
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `AFTER_END`
--> $DIR/offset_ub.rs:8:43
|
LL | pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) };
| ----------------------------- inside `AFTER_END`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: allocN has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
|
::: $DIR/offset_ub.rs:9:45
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `AFTER_ARRAY`
--> $DIR/offset_ub.rs:9:45
|
LL | pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) };
| ------------------------------- inside `AFTER_ARRAY`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u16>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
|
::: $DIR/offset_ub.rs:11:43
note: inside `ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OVERFLOW`
--> $DIR/offset_ub.rs:11:43
|
LL | pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) };
| ------------------------------------- inside `OVERFLOW`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u16>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
|
::: $DIR/offset_ub.rs:12:44
note: inside `ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `UNDERFLOW`
--> $DIR/offset_ub.rs:12:44
|
LL | pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) };
| ------------------------------------- inside `UNDERFLOW`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
|
::: $DIR/offset_ub.rs:13:56
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OVERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:13:56
|
LL | pub const OVERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (usize::MAX as *const u8).offset(2) };
| ----------------------------------- inside `OVERFLOW_ADDRESS_SPACE`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
|
::: $DIR/offset_ub.rs:14:57
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `UNDERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:14:57
|
LL | pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).offset(-2) };
| --------------------------- inside `UNDERFLOW_ADDRESS_SPACE`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
|
::: $DIR/offset_ub.rs:15:49
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `NEGATIVE_OFFSET`
--> $DIR/offset_ub.rs:15:49
|
LL | pub const NEGATIVE_OFFSET: *const u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) };
| ------------------------------------------------ inside `NEGATIVE_OFFSET`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: allocN has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
|
::: $DIR/offset_ub.rs:17:50
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ZERO_SIZED_ALLOC`
--> $DIR/offset_ub.rs:17:50
|
LL | pub const ZERO_SIZED_ALLOC: *const u8 = unsafe { [0u8; 0].as_ptr().offset(1) };
| --------------------------- inside `ZERO_SIZED_ALLOC`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) as *mut T }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
| inside `ptr::mut_ptr::<impl *mut u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
|
::: $DIR/offset_ub.rs:18:42
note: inside `ptr::mut_ptr::<impl *mut u8>::offset`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) as *mut T }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `DANGLING`
--> $DIR/offset_ub.rs:18:42
|
LL | pub const DANGLING: *const u8 = unsafe { ptr::NonNull::<u8>::dangling().as_ptr().offset(4) };
| ------------------------------------------------- inside `DANGLING`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
|
::: $DIR/offset_ub.rs:21:50
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `NULL_OFFSET_ZERO`
--> $DIR/offset_ub.rs:21:50
|
LL | pub const NULL_OFFSET_ZERO: *const u8 = unsafe { ptr::null::<u8>().offset(0) };
| --------------------------- inside `NULL_OFFSET_ZERO`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
|
::: $DIR/offset_ub.rs:24:47
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `UNDERFLOW_ABS`
--> $DIR/offset_ub.rs:24:47
|
LL | pub const UNDERFLOW_ABS: *const u8 = unsafe { (usize::MAX as *const u8).offset(isize::MIN) };
| -------------------------------------------- inside `UNDERFLOW_ABS`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 12 previous errors

View file

@ -2,15 +2,18 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| out-of-bounds pointer arithmetic: alloc3 has size $WORD, so pointer to $TWO_WORDS bytes starting at offset 0 is out-of-bounds
| inside `ptr::const_ptr::<impl *const usize>::offset`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: alloc3 has size $WORD, so pointer to $TWO_WORDS bytes starting at offset 0 is out-of-bounds
|
::: $DIR/ptr_comparisons.rs:50:34
note: inside `ptr::const_ptr::<impl *const usize>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `_`
--> $DIR/ptr_comparisons.rs:50:34
|
LL | const _: *const usize = unsafe { (FOO as *const usize).offset(2) };
| ------------------------------- inside `_`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed
--> $DIR/ptr_comparisons.rs:53:33

View file

@ -12,15 +12,24 @@ LL | f(x);
error[E0080]: evaluation of constant value failed
--> $DIR/recursive.rs:4:5
|
LL | f(x);
| ^^^^ reached the configured maximum number of stack frames
|
note: inside `f::<i32>`
--> $DIR/recursive.rs:4:5
|
LL | f(x);
| ^^^^
| |
| reached the configured maximum number of stack frames
| inside `f::<i32>`
| [... 126 additional calls inside `f::<i32>` ...]
...
note: [... 126 additional calls inside `f::<i32>` ...]
--> $DIR/recursive.rs:4:5
|
LL | f(x);
| ^^^^
note: inside `X`
--> $DIR/recursive.rs:8:15
|
LL | const X: () = f(1);
| ---- inside `X`
| ^^^^
error: aborting due to previous error; 1 warning emitted

View file

@ -1,144 +1,649 @@
error[E0080]: evaluation of `<i32 as Const>::CONSTANT` failed
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^ reached the configured maximum number of stack frames
|
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
| |
| reached the configured maximum number of stack frames
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<!>`
| inside `fake_type::<i32>`
...
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| -----------
| |
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
| inside `hint_unreachable`
...
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<!>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `hint_unreachable`
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | fake_type()
| ^^^^^^^^^^^
note: inside `fake_type::<i32>`
--> $DIR/uninhabited-const-issue-61744.rs:4:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
note: inside `<i32 as Const>::CONSTANT`
--> $DIR/uninhabited-const-issue-61744.rs:12:36
|
LL | const CONSTANT: i32 = unsafe { fake_type() };
| ----------- inside `<i32 as Const>::CONSTANT`
| ^^^^^^^^^^^
note: erroneous constant used
--> $DIR/uninhabited-const-issue-61744.rs:18:10

View file

@ -1,144 +1,649 @@
error[E0080]: evaluation of constant value failed
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^ reached the configured maximum number of stack frames
|
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
| |
| reached the configured maximum number of stack frames
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
| inside `a`
...
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ---
| |
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
| inside `b`
LL | }
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `b`
--> $DIR/infinite-recursion-const-fn.rs:7:5
|
LL | a()
| ^^^
note: inside `a`
--> $DIR/infinite-recursion-const-fn.rs:4:5
|
LL | b()
| ^^^
note: inside `ARR::{constant#0}`
--> $DIR/infinite-recursion-const-fn.rs:9:18
|
LL | const ARR: [i32; a()] = [5; 6];
| --- inside `ARR::{constant#0}`
| ^^^
error: aborting due to previous error

View file

@ -2,12 +2,18 @@ error[E0080]: values of the type `[u8; SIZE]` are too big for the current archit
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ inside `std::mem::size_of::<[u8; SIZE]>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: $DIR/issue-55878.rs:7:26
note: inside `std::mem::size_of::<[u8; SIZE]>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
--> $DIR/issue-55878.rs:7:26
|
LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
| ---------------------------------------------- inside `main`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: erroneous constant used
--> $DIR/issue-55878.rs:7:26