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

View file

@ -1,15 +1,19 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/issue-81899.rs:11:5 --> $DIR/issue-81899.rs:11:5
| |
LL | const _CONST: &[u8] = &f(&[], |_| {}); LL | panic!()
| -------------- inside `_CONST` | ^^^^^^^^ 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!() LL | panic!()
| ^^^^^^^^ | ^^^^^^^^
| | note: inside `_CONST`
| the evaluated program panicked at 'explicit panic', $DIR/issue-81899.rs:11:5 --> $DIR/issue-81899.rs:4:24
| inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34]>`
| |
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: 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 note: erroneous constant used

View file

@ -1,15 +1,19 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/issue-88434-minimal-example.rs:10:5 --> $DIR/issue-88434-minimal-example.rs:10:5
| |
LL | const _CONST: &() = &f(&|_| {}); LL | panic!()
| ---------- inside `_CONST` | ^^^^^^^^ 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!() LL | panic!()
| ^^^^^^^^ | ^^^^^^^^
| | note: inside `_CONST`
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:10:5 --> $DIR/issue-88434-minimal-example.rs:3:22
| inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28]>`
| |
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: 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 note: erroneous constant used

View file

@ -1,15 +1,19 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
| |
LL | const _CONST: &[u8] = &f(&[], |_| {}); LL | panic!()
| -------------- inside `_CONST` | ^^^^^^^^ 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!() LL | panic!()
| ^^^^^^^^ | ^^^^^^^^
| | note: inside `_CONST`
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:10:5 --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24
| inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34]>`
| |
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: 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 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 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
| |
LL | intrinsics::size_of::<T>() LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ size_of called on unsized type `dyn Debug`
| |
| size_of called on unsized type `dyn Debug`
| inside `std::mem::size_of::<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]: , 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 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 --> $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 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
| |
LL | intrinsics::size_of::<T>() LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ size_of called on unsized type `dyn Debug`
| |
| size_of called on unsized type `dyn Debug`
| inside `std::mem::size_of::<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]: , 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 error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
--> $DIR/issue-80742.rs:30:15 --> $DIR/issue-80742.rs:30:15

View file

@ -1,14 +1,19 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/issue-100313.rs:10:13 --> $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; LL | *(B as *const bool as *mut bool) = false;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | note: inside `_`
| writing to alloc7 which is read-only --> $DIR/issue-100313.rs:18:5
| inside `T::<&true>::set_false` |
...
LL | x.set_false(); LL | x.set_false();
| ------------- inside `_` | ^^^^^^^^^^^^^
error: aborting due to previous error 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 --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
| |
LL | &*ptr::slice_from_raw_parts(data, len) LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
| |
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
| inside `std::slice::from_raw_parts::<'_, u32>`
| |
::: $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) }; LL | pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
| ------------------------------ inside `S0` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
| |
LL | &*ptr::slice_from_raw_parts(data, len) LL | &*ptr::slice_from_raw_parts(data, len)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
| |
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
| inside `std::slice::from_raw_parts::<'_, ()>`
| |
::: $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) }; LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
| ------------------------------ inside `S1` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
| |
LL | &*ptr::slice_from_raw_parts(data, len) 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
| |
| 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>`
| |
::: $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) }; LL | pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
| ---------------------- inside `S2` | ^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:25:1 --> $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 --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
| |
LL | &*ptr::slice_from_raw_parts(data, len) 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
| |
| 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>`
| |
::: $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) LL | from_raw_parts(ptr, 1)
| ---------------------- inside `S8` | ^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) } LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| |
| out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
| |
::: $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)) } LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, u32>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| note: inside `R0`
::: $DIR/forbidden_slices.rs:46:34 --> $DIR/forbidden_slices.rs:46:34
| |
LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) }; LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
| ---------------------------------------- inside `R0` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize); 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
| |
| 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`
| |
::: $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)) } LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, ()>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| note: inside `R1`
::: $DIR/forbidden_slices.rs:47:33 --> $DIR/forbidden_slices.rs:47:33
| |
LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) }; 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) = 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 error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } 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
| |
| 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`
| |
::: $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)) LL | from_ptr_range(ptr..ptr.add(2))
| ---------- inside `R2` | ^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:52:1 --> $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 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } 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
| |
| 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`
| |
::: $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)) LL | from_ptr_range(ptr..ptr.add(1))
| ---------- inside `R8` | ^^^^^^^^^^
error[E0080]: could not evaluate static initializer error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) } LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
| |
| `ptr_offset_from_unsigned` called on pointers into different allocations
| inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
| |
::: $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)) } LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, u32>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| note: inside `R9`
::: $DIR/forbidden_slices.rs:79:34 --> $DIR/forbidden_slices.rs:79:34
| |
LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) }; 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 error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) } LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
| |
| `ptr_offset_from_unsigned` called on pointers into different allocations
| inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
| |
::: $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)) } LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
| ------------------------------ inside `from_ptr_range::<'_, u32>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| note: inside `R10`
::: $DIR/forbidden_slices.rs:80:35 --> $DIR/forbidden_slices.rs:80:35
| |
LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) }; LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
| ------------------------ inside `R10` | ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 18 previous errors 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 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| |
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); 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
| |
| 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>`
| |
::: $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) }; LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
| ----------------------- inside `_READ` | ^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| |
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); 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
| |
| 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>`
| |
::: $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) } LL | unsafe { read(self) }
| ---------- inside `ptr::const_ptr::<impl *const u32>::read` | ^^^^^^^^^^
| note: inside `_CONST_READ`
::: $DIR/out_of_bounds_read.rs:13:39 --> $DIR/out_of_bounds_read.rs:13:39
| |
LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() }; LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
| ------------------- inside `_CONST_READ` | ^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| |
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); 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
| |
| 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>`
| |
::: $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) } LL | unsafe { read(self) }
| ---------- inside `ptr::mut_ptr::<impl *mut u32>::read` | ^^^^^^^^^^
| note: inside `_MUT_READ`
::: $DIR/out_of_bounds_read.rs:14:37 --> $DIR/out_of_bounds_read.rs:14:37
| |
LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() }; LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
| --------------------------------- inside `_MUT_READ` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View file

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

View file

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

View file

@ -1,14 +1,19 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/alloc_intrinsic_errors.rs:9:17 --> $DIR/alloc_intrinsic_errors.rs:9:17
| |
LL | const FOO: i32 = foo(); LL | let _ = intrinsics::const_allocate(4, 3) as *mut i32;
| ----- inside `FOO` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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; LL | let _ = intrinsics::const_allocate(4, 3) as *mut i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | note: inside `FOO`
| align has to be a power of 2, `3` is not a power of 2 --> $DIR/alloc_intrinsic_errors.rs:6:18
| inside `foo` |
LL | const FOO: i32 = foo();
| ^^^^^
error: aborting due to previous error 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 --> $DIR/unwind-abort.rs:4:5
| |
LL | panic!() LL | panic!()
| ^^^^^^^^ | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/unwind-abort.rs:4:5
| |
| the evaluated program panicked at 'explicit panic', $DIR/unwind-abort.rs:4:5
| inside `foo`
...
LL | const _: () = foo();
| ----- inside `_`
| |
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) = 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 error: aborting due to previous error

View file

@ -13,14 +13,19 @@ LL | unsafe { std::mem::transmute(()) }
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/validate_uninhabited_zsts.rs:4:14 --> $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(()) } LL | unsafe { std::mem::transmute(()) }
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^
| | note: inside `FOO`
| transmuting to uninhabited type --> $DIR/validate_uninhabited_zsts.rs:19:33
| inside `foo` |
...
LL | const FOO: [empty::Empty; 3] = [foo(); 3]; LL | const FOO: [empty::Empty; 3] = [foo(); 3];
| ----- inside `FOO` | ^^^^^
error[E0080]: it is undefined behavior to use this value error[E0080]: it is undefined behavior to use this value
--> $DIR/validate_uninhabited_zsts.rs:21:1 --> $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 --> $SRC_DIR/core/src/num/f32.rs:LL:COL
| |
LL | panic!("const-eval error: cannot use f32::to_bits on a NaN") 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
| |
| 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`
| |
::: $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; 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) = 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 error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f32.rs:LL:COL --> $SRC_DIR/core/src/num/f32.rs:LL:COL
| |
LL | panic!("const-eval error: cannot use f32::to_bits on a NaN") 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
| |
| 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`
| |
::: $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; 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: 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 note: erroneous constant used
@ -64,38 +72,46 @@ error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f64.rs:LL:COL --> $SRC_DIR/core/src/num/f64.rs:LL:COL
| |
LL | panic!("const-eval error: cannot use f64::to_bits on a NaN") 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
| |
| 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`
| |
::: $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; 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) = 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 error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f64.rs:LL:COL --> $SRC_DIR/core/src/num/f64.rs:LL:COL
| |
LL | panic!("const-eval error: cannot use f64::to_bits on a NaN") 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
| |
| 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`
| |
::: $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; 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: 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 note: erroneous constant used

View file

@ -1,14 +1,19 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/mut_ref_in_final_dynamic_check.rs:13:10 --> $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)) LL | Some(&mut *(42 as *mut i32))
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
| | note: inside `A`
| dereferencing pointer failed: 0x2a[noalloc] is a dangling pointer (it has no provenance) --> $DIR/mut_ref_in_final_dynamic_check.rs:18:29
| inside `helper` |
...
LL | const A: Option<&mut i32> = helper(); LL | const A: Option<&mut i32> = helper();
| -------- inside `A` | ^^^^^^^^
error: encountered dangling pointer in final constant error: encountered dangling pointer in final constant
--> $DIR/mut_ref_in_final_dynamic_check.rs:25:1 --> $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 --> $SRC_DIR/core/src/hint.rs:LL:COL
| |
LL | intrinsics::unreachable() LL | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
| |
| entering unreachable code
| inside `unreachable_unchecked`
| |
::: $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(), 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) }; LL | const BAR: bool = unsafe { foo(false) };
| ---------- inside `BAR` | ^^^^^^^^^^
error: aborting due to previous error 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 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| |
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment 1, but alignment 4 is required
| |
| accessing memory with alignment 1, but alignment 4 is required
| inside `std::ptr::read::<u32>`
| |
::: $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) } LL | unsafe { read(self) }
| ---------- inside `ptr::const_ptr::<impl *const u32>::read` | ^^^^^^^^^^
| note: inside `INNER`
::: $DIR/detect-extra-ub.rs:38:9 --> $DIR/detect-extra-ub.rs:38:9
| |
LL | ptr.read(); LL | ptr.read();
| ---------- inside `INNER` | ^^^^^^^^^^
note: erroneous constant used note: erroneous constant used
--> $DIR/detect-extra-ub.rs:32:5 --> $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 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| |
LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to copy parts of a pointer from memory at ALLOC
| |
| 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`
| |
= help: this code performed an operation that depends on the underlying bytes representing a pointer = 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 = 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 error: aborting due to previous error

View file

@ -1,14 +1,19 @@
error[E0080]: could not evaluate static initializer error[E0080]: could not evaluate static initializer
--> $DIR/abi-mismatch.rs:9:5 --> $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(); LL | my_fn();
| ^^^^^^^ | ^^^^^^^
| | note: inside `VAL`
| calling a function with calling convention C using calling convention Rust --> $DIR/abi-mismatch.rs:15:18
| inside `call_rust_fn` |
...
LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) }); LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
| --------------------------------------------------------------------- inside `VAL` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: skipping const checks 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 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| |
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) { LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<u32> as Drop>::drop`
| |
| 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)))`
| |
::: $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; LL | const F: u32 = (U::X, 42).1;
| - inside `<String as Bar<Vec<u32>, String>>::F` | ^
note: erroneous constant used note: erroneous constant used
--> $DIR/assoc_const.rs:29:13 --> $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 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| |
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) { LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<i32> as Drop>::drop`
| |
| calling non-const function `<Vec<i32> as Drop>::drop`
| inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
| |
::: $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 | }; LL | };
| - inside `TEST_BAD` | ^
warning: skipping const checks warning: skipping const checks
| |

View file

@ -1,22 +1,25 @@
error[E0080]: evaluation of constant value failed 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:1135:9: unable to copy parts of a pointer from memory at alloc10
/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>>>`
| |
::: $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 | / ptr::swap_nonoverlapping(
LL | | &mut ptr1 as *mut _ as *mut MaybeUninit<u8>, LL | | &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
LL | | &mut ptr2 as *mut _ as *mut MaybeUninit<u8>, LL | | &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
LL | | mem::size_of::<&i32>(), LL | | mem::size_of::<&i32>(),
LL | | ); 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 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 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::ptr_offset_from(self, origin) } LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on pointers into different allocations
| |
| `ptr_offset_from` called on pointers into different allocations
| inside `ptr::const_ptr::<impl *const u8>::offset_from`
| |
::: $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 } LL | unsafe { (42 as *const u8).offset_from(&5u8) as usize }
| ----------------------------------- inside `NOT_PTR` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/offset_from_ub.rs:31:14 --> $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 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::ptr_offset_from(self, origin) } LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| |
| out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset_from`
| |
::: $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) } LL | unsafe { ptr2.offset_from(ptr1) }
| ---------------------- inside `OFFSET_VERY_FAR1` | ^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::ptr_offset_from(self, origin) } LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| |
| out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset_from`
| |
::: $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)) } LL | unsafe { ptr1.offset_from(ptr2.wrapping_offset(1)) }
| ----------------------------------------- inside `OFFSET_VERY_FAR2` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 15 previous errors 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 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u8>::offset`
| |
::: $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) }; LL | pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) };
| ------------------------------ inside `BEFORE_START` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } 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
| |
| 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`
| |
::: $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) }; LL | pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) };
| ----------------------------- inside `AFTER_END` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } 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
| |
| 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`
| |
::: $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) }; LL | pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) };
| ------------------------------- inside `AFTER_ARRAY` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u16>::offset`
| |
::: $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) }; LL | pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) };
| ------------------------------------- inside `OVERFLOW` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u16>::offset`
| |
::: $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) }; LL | pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) };
| ------------------------------------- inside `UNDERFLOW` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u8>::offset`
| |
::: $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) }; 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 error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
| |
| overflowing in-bounds pointer arithmetic
| inside `ptr::const_ptr::<impl *const u8>::offset`
| |
::: $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) }; 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 error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } 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
| |
| 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`
| |
::: $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) }; 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 error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } 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
| |
| 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`
| |
::: $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) }; 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 error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) as *mut T } LL | unsafe { intrinsics::offset(self, count) as *mut T }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
| |
| out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
| inside `ptr::mut_ptr::<impl *mut u8>::offset`
| |
::: $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) }; LL | pub const DANGLING: *const u8 = unsafe { ptr::NonNull::<u8>::dangling().as_ptr().offset(4) };
| ------------------------------------------------- inside `DANGLING` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
| |
| out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset`
| |
::: $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) }; 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 error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
| |
| out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
| inside `ptr::const_ptr::<impl *const u8>::offset`
| |
::: $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) }; 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 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 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| |
LL | unsafe { intrinsics::offset(self, count) } 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
| |
| 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`
| |
::: $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) }; LL | const _: *const usize = unsafe { (FOO as *const usize).offset(2) };
| ------------------------------- inside `_` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/ptr_comparisons.rs:53:33 --> $DIR/ptr_comparisons.rs:53:33

View file

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

View file

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

View file

@ -1,144 +1,649 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> $DIR/infinite-recursion-const-fn.rs:4:5 --> $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() LL | b()
| ^^^ | ^^^
| | note: inside `b`
| reached the configured maximum number of stack frames --> $DIR/infinite-recursion-const-fn.rs:7:5
| 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`
...
LL | a() LL | a()
| --- | ^^^
| | note: inside `a`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:4:5
| inside `b` |
| inside `b` LL | b()
| inside `b` | ^^^
| inside `b` note: inside `b`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:7:5
| inside `b` |
| inside `b` LL | a()
| inside `b` | ^^^
| inside `b` note: inside `a`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:4:5
| inside `b` |
| inside `b` LL | b()
| inside `b` | ^^^
| inside `b` note: inside `b`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:7:5
| inside `b` |
| inside `b` LL | a()
| inside `b` | ^^^
| inside `b` note: inside `a`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:4:5
| inside `b` |
| inside `b` LL | b()
| inside `b` | ^^^
| inside `b` note: inside `b`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:7:5
| inside `b` |
| inside `b` LL | a()
| inside `b` | ^^^
| inside `b` note: inside `a`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:4:5
| inside `b` |
| inside `b` LL | b()
| inside `b` | ^^^
| inside `b` note: inside `b`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:7:5
| inside `b` |
| inside `b` LL | a()
| inside `b` | ^^^
| inside `b` note: inside `a`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:4:5
| inside `b` |
| inside `b` LL | b()
| inside `b` | ^^^
| inside `b` note: inside `b`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:7:5
| inside `b` |
| inside `b` LL | a()
| inside `b` | ^^^
| inside `b` note: inside `a`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:4:5
| inside `b` |
| inside `b` LL | b()
| inside `b` | ^^^
| inside `b` note: inside `b`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:7:5
| inside `b` |
| inside `b` LL | a()
| inside `b` | ^^^
| inside `b` note: inside `a`
| inside `b` --> $DIR/infinite-recursion-const-fn.rs:4:5
| inside `b` |
| inside `b` LL | b()
LL | } | ^^^
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]; LL | const ARR: [i32; a()] = [5; 6];
| --- inside `ARR::{constant#0}` | ^^^
error: aborting due to previous error 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 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
| |
LL | intrinsics::size_of::<T>() 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]>()); LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
| ---------------------------------------------- inside `main` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: erroneous constant used note: erroneous constant used
--> $DIR/issue-55878.rs:7:26 --> $DIR/issue-55878.rs:7:26