Auto merge of #104449 - oli-obk:unhide_unknown_spans, r=estebank,RalfJung

Start emitting labels even if their pointed to file is not available locally

r? `@estebank`

cc `@RalfJung`

fixes #97699
This commit is contained in:
bors 2022-12-09 06:24:28 +00:00
commit badd6a5a03
103 changed files with 2204 additions and 878 deletions

View file

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

View file

@ -17,7 +17,7 @@ use rustc_middle::ty::{
};
use rustc_mir_dataflow::storage::always_storage_live_locals;
use rustc_session::Limit;
use rustc_span::{Pos, Span};
use rustc_span::Span;
use rustc_target::abi::{call::FnAbi, Align, HasDataLayout, Size, TargetDataLayout};
use super::{
@ -256,25 +256,13 @@ impl<'tcx> fmt::Display for FrameInfo<'tcx> {
if tcx.def_key(self.instance.def_id()).disambiguated_data.data
== DefPathData::ClosureExpr
{
write!(f, "inside closure")?;
write!(f, "inside closure")
} else {
// Note: this triggers a `good_path_bug` state, which means that if we ever get here
// we must emit a diagnostic. We should never display a `FrameInfo` unless we
// actually want to emit a warning or error to the user.
write!(f, "inside `{}`", self.instance)?;
write!(f, "inside `{}`", self.instance)
}
if !self.span.is_dummy() {
let sm = tcx.sess.source_map();
let lo = sm.lookup_char_pos(self.span.lo());
write!(
f,
" at {}:{}:{}",
sm.filename_for_diagnostics(&lo.file.name),
lo.line,
lo.col.to_usize() + 1
)?;
}
Ok(())
})
}
}

View file

@ -24,7 +24,7 @@ use rustc_lint_defs::pluralize;
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
use rustc_data_structures::sync::Lrc;
use rustc_error_messages::FluentArgs;
use rustc_error_messages::{FluentArgs, SpanLabel};
use rustc_span::hygiene::{ExpnKind, MacroKind};
use std::borrow::Cow;
use std::cmp::{max, min, Reverse};
@ -773,6 +773,7 @@ impl EmitterWriter {
draw_col_separator_no_space(buffer, line_offset, width_offset - 2);
}
#[instrument(level = "trace", skip(self), ret)]
fn render_source_line(
&self,
buffer: &mut StyledBuffer,
@ -804,6 +805,7 @@ impl EmitterWriter {
Some(s) => normalize_whitespace(&s),
None => return Vec::new(),
};
trace!(?source_string);
let line_offset = buffer.num_lines();
@ -1323,6 +1325,7 @@ impl EmitterWriter {
}
}
#[instrument(level = "trace", skip(self, args), ret)]
fn emit_message_default(
&mut self,
msp: &MultiSpan,
@ -1384,22 +1387,15 @@ impl EmitterWriter {
}
}
let mut annotated_files = FileWithAnnotatedLines::collect_annotations(self, args, msp);
trace!("{annotated_files:#?}");
// Make sure our primary file comes first
let (primary_lo, sm) = if let (Some(sm), Some(ref primary_span)) =
(self.sm.as_ref(), msp.primary_span().as_ref())
{
if !primary_span.is_dummy() {
(sm.lookup_char_pos(primary_span.lo()), sm)
} else {
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message)?;
return Ok(());
}
} else {
let primary_span = msp.primary_span().unwrap_or_default();
let (Some(sm), false) = (self.sm.as_ref(), primary_span.is_dummy()) else {
// If we don't have span information, emit and exit
emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message)?;
return Ok(());
return emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message);
};
let primary_lo = sm.lookup_char_pos(primary_span.lo());
if let Ok(pos) =
annotated_files.binary_search_by(|x| x.file.name.cmp(&primary_lo.file.name))
{
@ -1410,6 +1406,54 @@ impl EmitterWriter {
for annotated_file in annotated_files {
// we can't annotate anything if the source is unavailable.
if !sm.ensure_source_file_source_present(annotated_file.file.clone()) {
if !self.short_message {
// We'll just print an unannotated message.
for (annotation_id, line) in annotated_file.lines.into_iter().enumerate() {
let mut annotations = line.annotations.clone();
annotations.sort_by_key(|a| Reverse(a.start_col));
let mut line_idx = buffer.num_lines();
buffer.append(
line_idx,
&format!(
"{}:{}:{}",
sm.filename_for_diagnostics(&annotated_file.file.name),
sm.doctest_offset_line(&annotated_file.file.name, line.line_index),
annotations[0].start_col + 1,
),
Style::LineAndColumn,
);
if annotation_id == 0 {
buffer.prepend(line_idx, "--> ", Style::LineNumber);
for _ in 0..max_line_num_len {
buffer.prepend(line_idx, " ", Style::NoStyle);
}
line_idx += 1;
};
for (i, annotation) in annotations.into_iter().enumerate() {
if let Some(label) = &annotation.label {
let style = if annotation.is_primary {
Style::LabelPrimary
} else {
Style::LabelSecondary
};
if annotation_id == 0 {
buffer.prepend(line_idx, " |", Style::LineNumber);
for _ in 0..max_line_num_len {
buffer.prepend(line_idx, " ", Style::NoStyle);
}
line_idx += 1;
buffer.append(line_idx + i, " = note: ", style);
for _ in 0..max_line_num_len {
buffer.prepend(line_idx, " ", Style::NoStyle);
}
} else {
buffer.append(line_idx + i, ": ", style);
}
buffer.append(line_idx + i, label, style);
}
}
}
}
continue;
}
@ -1656,6 +1700,7 @@ impl EmitterWriter {
multilines.extend(&to_add);
}
}
trace!("buffer: {:#?}", buffer.render());
}
if let Some(tracked) = emitted_at {
@ -1979,6 +2024,7 @@ impl EmitterWriter {
Ok(())
}
#[instrument(level = "trace", skip(self, args, code, children, suggestions))]
fn emit_messages_default(
&mut self,
level: &Level,
@ -2209,8 +2255,14 @@ impl FileWithAnnotatedLines {
let mut multiline_annotations = vec![];
if let Some(ref sm) = emitter.source_map() {
for span_label in msp.span_labels() {
let fixup_lo_hi = |span: Span| {
for SpanLabel { span, is_primary, label } in msp.span_labels() {
// If we don't have a useful span, pick the primary span if that exists.
// Worst case we'll just print an error at the top of the main file.
let span = match (span.is_dummy(), msp.primary_span()) {
(_, None) | (false, _) => span,
(true, Some(span)) => span,
};
let lo = sm.lookup_char_pos(span.lo());
let mut hi = sm.lookup_char_pos(span.hi());
@ -2223,32 +2275,8 @@ impl FileWithAnnotatedLines {
if lo.col_display == hi.col_display && lo.line == hi.line {
hi.col_display += 1;
}
(lo, hi)
};
if span_label.span.is_dummy() {
if let Some(span) = msp.primary_span() {
// if we don't know where to render the annotation, emit it as a note
// on the primary span.
let (lo, hi) = fixup_lo_hi(span);
let ann = Annotation {
start_col: lo.col_display,
end_col: hi.col_display,
is_primary: span_label.is_primary,
label: span_label
.label
.as_ref()
.map(|m| emitter.translate_message(m, args).to_string()),
annotation_type: AnnotationType::Singleline,
};
add_annotation_to_file(&mut output, lo.file, lo.line, ann);
}
continue;
}
let (lo, hi) = fixup_lo_hi(span_label.span);
let label = label.as_ref().map(|m| emitter.translate_message(m, args).to_string());
if lo.line != hi.line {
let ml = MultilineAnnotation {
@ -2257,11 +2285,8 @@ impl FileWithAnnotatedLines {
line_end: hi.line,
start_col: lo.col_display,
end_col: hi.col_display,
is_primary: span_label.is_primary,
label: span_label
.label
.as_ref()
.map(|m| emitter.translate_message(m, args).to_string()),
is_primary,
label,
overlaps_exactly: false,
};
multiline_annotations.push((lo.file, ml));
@ -2269,11 +2294,8 @@ impl FileWithAnnotatedLines {
let ann = Annotation {
start_col: lo.col_display,
end_col: hi.col_display,
is_primary: span_label.is_primary,
label: span_label
.label
.as_ref()
.map(|m| emitter.translate_message(m, args).to_string()),
is_primary,
label,
annotation_type: AnnotationType::Singleline,
};
add_annotation_to_file(&mut output, lo.file, lo.line, ann);

View file

@ -1,15 +1,19 @@
error[E0080]: evaluation of constant value failed
--> $DIR/issue-81899.rs:11:5
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| -------------- inside `_CONST` at $DIR/issue-81899.rs:4:24
...
LL | panic!()
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-81899.rs:11:5
|
note: inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34]>`
--> $DIR/issue-81899.rs:11:5
|
LL | panic!()
| ^^^^^^^^
| |
| the evaluated program panicked at 'explicit panic', $DIR/issue-81899.rs:11:5
| inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34]>` at $SRC_DIR/std/src/panic.rs:LL:COL
note: inside `_CONST`
--> $DIR/issue-81899.rs:4:24
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant used

View file

@ -1,15 +1,19 @@
error[E0080]: evaluation of constant value failed
--> $DIR/issue-88434-minimal-example.rs:10:5
|
LL | const _CONST: &() = &f(&|_| {});
| ---------- inside `_CONST` at $DIR/issue-88434-minimal-example.rs:3:22
...
LL | panic!()
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:10:5
|
note: inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28]>`
--> $DIR/issue-88434-minimal-example.rs:10:5
|
LL | panic!()
| ^^^^^^^^
| |
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:10:5
| inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28]>` at $SRC_DIR/std/src/panic.rs:LL:COL
note: inside `_CONST`
--> $DIR/issue-88434-minimal-example.rs:3:22
|
LL | const _CONST: &() = &f(&|_| {});
| ^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant used

View file

@ -1,15 +1,19 @@
error[E0080]: evaluation of constant value failed
--> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| -------------- inside `_CONST` at $DIR/issue-88434-removal-index-should-be-less.rs:3:24
...
LL | panic!()
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:10:5
|
note: inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34]>`
--> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
|
LL | panic!()
| ^^^^^^^^
| |
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:10:5
| inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34]>` at $SRC_DIR/std/src/panic.rs:LL:COL
note: inside `_CONST`
--> $DIR/issue-88434-removal-index-should-be-less.rs:3:24
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant used

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,14 +2,18 @@ error[E0080]: evaluation of constant value failed
--> $DIR/unwind-abort.rs:4:5
|
LL | panic!()
| ^^^^^^^^
| |
| the evaluated program panicked at 'explicit panic', $DIR/unwind-abort.rs:4:5
| inside `foo` at $SRC_DIR/std/src/panic.rs:LL:COL
...
LL | const _: () = foo();
| ----- inside `_` at $DIR/unwind-abort.rs:7:15
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/unwind-abort.rs:4:5
|
note: inside `foo`
--> $DIR/unwind-abort.rs:4:5
|
LL | panic!()
| ^^^^^^^^
note: inside `_`
--> $DIR/unwind-abort.rs:7:15
|
LL | const _: () = foo();
| ^^^^^
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,27 @@
// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
// normalize-stderr-test "alloc[0-9]+" -> "ALLOC_ID"
#![feature(const_swap)]
#![feature(const_mut_refs)]
use std::{
mem::{self, MaybeUninit},
ptr,
};
const X: () = {
let mut ptr1 = &1;
let mut ptr2 = &2;
// Swap them, bytewise.
unsafe {
ptr::swap_nonoverlapping(
&mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
&mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
mem::size_of::<&i32>(),
);
}
};
fn main() {
X
}

View file

@ -0,0 +1,28 @@
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
= note: unable to copy parts of a pointer from memory at ALLOC_ID
|
= 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>>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `mem::swap_simple::<MaybeUninit<MaybeUninit<u8>>>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: inside `ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `swap_nonoverlapping::<MaybeUninit<u8>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `X`
--> $DIR/missing_span_in_backtrace.rs:17:9
|
17 | / ptr::swap_nonoverlapping(
18 | | &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
19 | | &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
20 | | mem::size_of::<&i32>(),
21 | | );
| |_________^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0080`.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/xyz -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
struct MyError;
impl std::error::Error for MyError {}

View file

@ -7,6 +7,9 @@ error[E0277]: `MyError` doesn't implement `std::fmt::Display`
= help: the trait `std::fmt::Display` is not implemented for `MyError`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `std::error::Error`
--> $SRC_DIR/core/src/error.rs:LL:COL
|
= note: required by this bound in `std::error::Error`
error[E0277]: `MyError` doesn't implement `Debug`
--> $DIR/issue-71363.rs:4:6
@ -17,6 +20,9 @@ error[E0277]: `MyError` doesn't implement `Debug`
= help: the trait `Debug` is not implemented for `MyError`
= note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
note: required by a bound in `std::error::Error`
--> $SRC_DIR/core/src/error.rs:LL:COL
|
= note: required by this bound in `std::error::Error`
help: consider annotating `MyError` with `#[derive(Debug)]`
|
3 | #[derive(Debug)]

View file

@ -3542,6 +3542,8 @@ impl<'test> TestCx<'test> {
option_env!("CFG_VIRTUAL_RUST_SOURCE_BASE_DIR").map(PathBuf::from),
// Virtual `/rustc/$sha` coming from download-rustc:
std::env::var_os("FAKE_DOWNLOAD_RUSTC_PREFIX").map(PathBuf::from),
// Tests using -Zsimulate-remapped-rust-src-base should use this fake path
Some("/rustc/FAKE_PREFIX".into()),
];
for base_dir in source_bases {
if let Some(base_dir) = base_dir {

View file

@ -364,7 +364,9 @@ fn report_msg<'tcx>(
if is_local && idx > 0 {
err.span_note(frame_info.span, &frame_info.to_string());
} else {
err.note(&frame_info.to_string());
let sm = sess.source_map();
let span = sm.span_to_embeddable_string(frame_info.span);
err.note(format!("{frame_info} at {span}"));
}
}

View file

@ -10,7 +10,7 @@ LL | | }
| |_^ the program aborted execution
|
= note: inside `panic_abort` at $DIR/abort-terminator.rs:LL:CC
note: inside `main` at $DIR/abort-terminator.rs:LL:CC
note: inside `main`
--> $DIR/abort-terminator.rs:LL:CC
|
LL | panic_abort();

View file

@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
note: inside `main` at $DIR/deallocate-bad-alignment.rs:LL:CC
note: inside `main`
--> $DIR/deallocate-bad-alignment.rs:LL:CC
|
LL | dealloc(x, Layout::from_size_align_unchecked(1, 2));

View file

@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
note: inside `main` at $DIR/deallocate-bad-size.rs:LL:CC
note: inside `main`
--> $DIR/deallocate-bad-size.rs:LL:CC
|
LL | dealloc(x, Layout::from_size_align_unchecked(2, 1));

View file

@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
note: inside `main` at $DIR/deallocate-twice.rs:LL:CC
note: inside `main`
--> $DIR/deallocate-twice.rs:LL:CC
|
LL | dealloc(x, Layout::from_size_align_unchecked(1, 1));

View file

@ -9,7 +9,7 @@ LL | FREE();
= note: BACKTRACE:
= note: inside `std::sys::PLATFORM::alloc::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC
= note: inside `<std::alloc::System as std::alloc::Allocator>::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC
note: inside `main` at $DIR/global_system_mixup.rs:LL:CC
note: inside `main`
--> $DIR/global_system_mixup.rs:LL:CC
|
LL | System.deallocate(ptr, l);

View file

@ -8,7 +8,7 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
note: inside `main` at $DIR/reallocate-bad-size.rs:LL:CC
note: inside `main`
--> $DIR/reallocate-bad-size.rs:LL:CC
|
LL | let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1);

View file

@ -8,7 +8,7 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
note: inside `main` at $DIR/reallocate-dangling.rs:LL:CC
note: inside `main`
--> $DIR/reallocate-dangling.rs:LL:CC
|
LL | let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);

View file

@ -12,7 +12,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
= note: inside `alloc::alloc::box_free::<i32, std::alloc::Global>` at RUSTLIB/alloc/src/alloc.rs:LL:CC
= note: inside `std::ptr::drop_in_place::<std::boxed::Box<i32>> - shim(Some(std::boxed::Box<i32>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
= note: inside `std::mem::drop::<std::boxed::Box<i32>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
note: inside `main` at $DIR/stack_free.rs:LL:CC
note: inside `main`
--> $DIR/stack_free.rs:LL:CC
|
LL | drop(bad_box);

View file

@ -21,7 +21,7 @@ LL | let res = helper(val, ptr);
| ^^^
= note: BACKTRACE:
= note: inside `helper` at $DIR/box-cell-alias.rs:LL:CC
note: inside `main` at $DIR/box-cell-alias.rs:LL:CC
note: inside `main`
--> $DIR/box-cell-alias.rs:LL:CC
|
LL | let res = helper(val, ptr);

View file

@ -10,7 +10,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(
= note: inside `std::sys::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC
= note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
= note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
note: inside `main` at $DIR/windows_join_detached.rs:LL:CC
note: inside `main`
--> $DIR/windows_join_detached.rs:LL:CC
|
LL | thread.join().unwrap();

View file

@ -6,7 +6,7 @@ LL | let res = syscall!(epoll_create1(libc::EPOLL_CLOEXEC));
|
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
= note: BACKTRACE:
note: inside `main` at $DIR/tokio_mvp.rs:LL:CC
note: inside `main`
--> $DIR/tokio_mvp.rs:LL:CC
|
LL | #[tokio::main]

View file

@ -8,7 +8,7 @@ LL | unsafe { &mut *(LEAK as *mut i32) };
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `evil` at $DIR/storage_dead_dangling.rs:LL:CC
note: inside `main` at $DIR/storage_dead_dangling.rs:LL:CC
note: inside `main`
--> $DIR/storage_dead_dangling.rs:LL:CC
|
LL | evil();

View file

@ -8,7 +8,7 @@ LL | }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `race` at $DIR/stack_pop_race.rs:LL:CC
note: inside `main` at $DIR/stack_pop_race.rs:LL:CC
note: inside `main`
--> $DIR/stack_pop_race.rs:LL:CC
|
LL | race(0);

View file

@ -11,7 +11,7 @@ LL | | }
| |_^ the program aborted execution
|
= note: inside `nounwind` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC
note: inside `main` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC
note: inside `main`
--> $DIR/exported_symbol_bad_unwind2.rs:LL:CC
|
LL | unsafe { nounwind() }

View file

@ -11,7 +11,7 @@ LL | | }
| |_^ the program aborted execution
|
= note: inside `nounwind` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC
note: inside `main` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC
note: inside `main`
--> $DIR/exported_symbol_bad_unwind2.rs:LL:CC
|
LL | unsafe { nounwind() }

View file

@ -8,13 +8,13 @@ LL | *num += 1;
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC
note: inside `<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-moved.rs:LL:CC]> as std::iter::Iterator>::next` at $DIR/generator-pinned-moved.rs:LL:CC
note: inside `<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-moved.rs:LL:CC]> as std::iter::Iterator>::next`
--> $DIR/generator-pinned-moved.rs:LL:CC
|
LL | match me.resume(()) {
| ^^^^^^^^^^^^^
= note: inside `<std::boxed::Box<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-moved.rs:LL:CC]>> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside `main` at $DIR/generator-pinned-moved.rs:LL:CC
note: inside `main`
--> $DIR/generator-pinned-moved.rs:LL:CC
|
LL | generator_iterator_2.next(); // and use moved value

View file

@ -8,7 +8,7 @@ LL | unsafe { intrinsics::simd_cast(self) }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::simd::Simd::<f32, 2>::to_int_unchecked::<i32>` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
note: inside `main` at $DIR/simd-float-to-int.rs:LL:CC
note: inside `main`
--> $DIR/simd-float-to-int.rs:LL:CC
|
LL | let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked();

View file

@ -8,7 +8,7 @@ LL | unsafe { intrinsics::simd_gather(or, ptrs, enable.to_int()) }
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::simd::Simd::<i8, 4>::gather_select_unchecked` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
note: inside `main` at $DIR/simd-gather.rs:LL:CC
note: inside `main`
--> $DIR/simd-gather.rs:LL:CC
|
LL | let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0));

View file

@ -8,7 +8,7 @@ LL | intrinsics::simd_scatter(self, ptrs, enable.to_int())
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `std::simd::Simd::<i8, 4>::scatter_select_unchecked` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC
note: inside `main` at $DIR/simd-scatter.rs:LL:CC
note: inside `main`
--> $DIR/simd-scatter.rs:LL:CC
|
LL | / Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked(

View file

@ -8,7 +8,7 @@ LL | let obj = std::mem::transmute::<FatPointer, *mut FunnyPointer>(obj)
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `FunnyPointer::from_data_ptr` at $DIR/issue-miri-1112.rs:LL:CC
note: inside `main` at $DIR/issue-miri-1112.rs:LL:CC
note: inside `main`
--> $DIR/issue-miri-1112.rs:LL:CC
|
LL | let _raw: &FunnyPointer = FunnyPointer::from_data_ptr(&hello, &meta as *const _);

View file

@ -8,7 +8,7 @@ LL | match v.0 {}
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `m::f` at $DIR/never_transmute_void.rs:LL:CC
note: inside `main` at $DIR/never_transmute_void.rs:LL:CC
note: inside `main`
--> $DIR/never_transmute_void.rs:LL:CC
|
LL | m::f(v);

View file

@ -13,7 +13,7 @@ LL | std::panic::catch_unwind(|| unwind()).unwrap_err();
= note: inside `std::panicking::r#try::do_call::<[closure@$DIR/bad_unwind.rs:LL:CC], ()>` at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside `std::panicking::r#try::<(), [closure@$DIR/bad_unwind.rs:LL:CC]>` at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside `std::panic::catch_unwind::<[closure@$DIR/bad_unwind.rs:LL:CC], ()>` at RUSTLIB/std/src/panic.rs:LL:CC
note: inside `main` at $DIR/bad_unwind.rs:LL:CC
note: inside `main`
--> $DIR/bad_unwind.rs:LL:CC
|
LL | std::panic::catch_unwind(|| unwind()).unwrap_err();

View file

@ -75,13 +75,13 @@ LL | ABORT();
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::rt::begin_panic<&str>::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
note: inside `<Foo as std::ops::Drop>::drop` at RUSTLIB/std/src/panic.rs:LL:CC
note: inside `<Foo as std::ops::Drop>::drop`
--> $DIR/double_panic.rs:LL:CC
|
LL | panic!("second");
| ^
= note: inside `std::ptr::drop_in_place::<Foo> - shim(Some(Foo))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
note: inside `main` at $DIR/double_panic.rs:LL:CC
note: inside `main`
--> $DIR/double_panic.rs:LL:CC
|
LL | }

View file

@ -6,7 +6,7 @@ LL | core::intrinsics::abort();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the program aborted execution
|
= note: inside `panic_handler` at $DIR/no_std.rs:LL:CC
note: inside `start` at RUSTLIB/core/src/panic.rs:LL:CC
note: inside `start`
--> $DIR/no_std.rs:LL:CC
|
LL | panic!("blarg I am dead")

View file

@ -12,7 +12,7 @@ LL | ABORT();
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::rt::begin_panic<&str>::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
note: inside `main` at RUSTLIB/std/src/panic.rs:LL:CC
note: inside `main`
--> $DIR/panic_abort1.rs:LL:CC
|
LL | std::panic!("panicking from libstd");

View file

@ -13,7 +13,7 @@ LL | ABORT();
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
note: inside `main` at RUSTLIB/std/src/panic.rs:LL:CC
note: inside `main`
--> $DIR/panic_abort2.rs:LL:CC
|
LL | std::panic!("{}-panicking from libstd", 42);

View file

@ -13,7 +13,7 @@ LL | ABORT();
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
note: inside `main` at RUSTLIB/core/src/panic.rs:LL:CC
note: inside `main`
--> $DIR/panic_abort3.rs:LL:CC
|
LL | core::panic!("panicking from libcore");

View file

@ -13,7 +13,7 @@ LL | ABORT();
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
note: inside `main` at RUSTLIB/core/src/panic.rs:LL:CC
note: inside `main`
--> $DIR/panic_abort4.rs:LL:CC
|
LL | core::panic!("{}-panicking from libcore", 42);

View file

@ -8,7 +8,7 @@ LL | let _val = *left_ptr;
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `deref` at $DIR/provenance_transmute.rs:LL:CC
note: inside `main` at $DIR/provenance_transmute.rs:LL:CC
note: inside `main`
--> $DIR/provenance_transmute.rs:LL:CC
|
LL | deref(ptr1, ptr2.with_addr(ptr1.addr()));

View file

@ -17,7 +17,7 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a
= note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC
= note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC
= note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC
note: inside `main` at $DIR/isolated_file.rs:LL:CC
note: inside `main`
--> $DIR/isolated_file.rs:LL:CC
|
LL | let _file = std::fs::File::open("file.txt").unwrap();

View file

@ -8,7 +8,7 @@ LL | let _fd = unsafe { libc::mkstemp(s) };
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `test_mkstemp_immutable_arg` at $DIR/mkstemp_immutable_arg.rs:LL:CC
note: inside `main` at $DIR/mkstemp_immutable_arg.rs:LL:CC
note: inside `main`
--> $DIR/mkstemp_immutable_arg.rs:LL:CC
|
LL | test_mkstemp_immutable_arg();

View file

@ -8,7 +8,7 @@ LL | ...safe { libc::open(name_ptr, libc::O_CREAT) };
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `test_file_open_missing_needed_mode` at $DIR/unix_open_missing_required_mode.rs:LL:CC
note: inside `main` at $DIR/unix_open_missing_required_mode.rs:LL:CC
note: inside `main`
--> $DIR/unix_open_missing_required_mode.rs:LL:CC
|
LL | test_file_open_missing_needed_mode();

View file

@ -8,7 +8,7 @@ LL | std::hint::unreachable_unchecked();
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `test_cpp20_rwc_syncs` at $DIR/cpp20_rwc_syncs.rs:LL:CC
note: inside `main` at $DIR/cpp20_rwc_syncs.rs:LL:CC
note: inside `main`
--> $DIR/cpp20_rwc_syncs.rs:LL:CC
|
LL | test_cpp20_rwc_syncs();

View file

@ -18,7 +18,7 @@ LL | pub fn safe(_x: &mut i32, _y: &mut i32) {}
| ^^
= note: BACKTRACE:
= note: inside `safe` at $DIR/aliasing_mut1.rs:LL:CC
note: inside `main` at $DIR/aliasing_mut1.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut1.rs:LL:CC
|
LL | safe_raw(xraw, xraw);

View file

@ -18,7 +18,7 @@ LL | pub fn safe(_x: &i32, _y: &mut i32) {}
| ^^
= note: BACKTRACE:
= note: inside `safe` at $DIR/aliasing_mut2.rs:LL:CC
note: inside `main` at $DIR/aliasing_mut2.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut2.rs:LL:CC
|
LL | safe_raw(xshr, xraw);

View file

@ -21,7 +21,7 @@ LL | safe_raw(xraw, xshr);
| ^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: inside `safe` at $DIR/aliasing_mut3.rs:LL:CC
note: inside `main` at $DIR/aliasing_mut3.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut3.rs:LL:CC
|
LL | safe_raw(xraw, xshr);

View file

@ -18,7 +18,7 @@ LL | pub fn safe(_x: &i32, _y: &mut Cell<i32>) {}
| ^^
= note: BACKTRACE:
= note: inside `safe` at $DIR/aliasing_mut4.rs:LL:CC
note: inside `main` at $DIR/aliasing_mut4.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut4.rs:LL:CC
|
LL | safe_raw(xshr, xraw as *mut _);

View file

@ -21,12 +21,12 @@ LL | *our = 5;
| ^^^^^^^^
= note: BACKTRACE:
= note: inside `unknown_code_2` at $DIR/box_exclusive_violation1.rs:LL:CC
note: inside `demo_box_advanced_unique` at $DIR/box_exclusive_violation1.rs:LL:CC
note: inside `demo_box_advanced_unique`
--> $DIR/box_exclusive_violation1.rs:LL:CC
|
LL | unknown_code_2();
| ^^^^^^^^^^^^^^^^
note: inside `main` at $DIR/box_exclusive_violation1.rs:LL:CC
note: inside `main`
--> $DIR/box_exclusive_violation1.rs:LL:CC
|
LL | demo_box_advanced_unique(Box::new(0));

View file

@ -18,7 +18,7 @@ LL | unsafe fn test(mut x: Box<i32>, y: *const i32) -> i32 {
| ^^^^^
= note: BACKTRACE:
= note: inside `test` at $DIR/box_noalias_violation.rs:LL:CC
note: inside `main` at $DIR/box_noalias_violation.rs:LL:CC
note: inside `main`
--> $DIR/box_noalias_violation.rs:LL:CC
|
LL | test(Box::from_raw(ptr), ptr);

View file

@ -12,18 +12,18 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
= note: inside `alloc::alloc::box_free::<i32, std::alloc::Global>` at RUSTLIB/alloc/src/alloc.rs:LL:CC
= note: inside `std::ptr::drop_in_place::<std::boxed::Box<i32>> - shim(Some(std::boxed::Box<i32>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
= note: inside `std::mem::drop::<std::boxed::Box<i32>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
note: inside closure at $DIR/deallocate_against_protector1.rs:LL:CC
note: inside closure
--> $DIR/deallocate_against_protector1.rs:LL:CC
|
LL | drop(unsafe { Box::from_raw(raw) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: inside `<[closure@$DIR/deallocate_against_protector1.rs:LL:CC] as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
note: inside `inner` at $DIR/deallocate_against_protector1.rs:LL:CC
note: inside `inner`
--> $DIR/deallocate_against_protector1.rs:LL:CC
|
LL | f(x)
| ^^^^
note: inside `main` at $DIR/deallocate_against_protector1.rs:LL:CC
note: inside `main`
--> $DIR/deallocate_against_protector1.rs:LL:CC
|
LL | / inner(Box::leak(Box::new(0)), |x| {

View file

@ -12,18 +12,18 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
= note: inside `alloc::alloc::box_free::<NotUnpin, std::alloc::Global>` at RUSTLIB/alloc/src/alloc.rs:LL:CC
= note: inside `std::ptr::drop_in_place::<std::boxed::Box<NotUnpin>> - shim(Some(std::boxed::Box<NotUnpin>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
= note: inside `std::mem::drop::<std::boxed::Box<NotUnpin>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
note: inside closure at $DIR/deallocate_against_protector2.rs:LL:CC
note: inside closure
--> $DIR/deallocate_against_protector2.rs:LL:CC
|
LL | drop(unsafe { Box::from_raw(raw) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: inside `<[closure@$DIR/deallocate_against_protector2.rs:LL:CC] as std::ops::FnOnce<(&mut NotUnpin,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
note: inside `inner` at $DIR/deallocate_against_protector2.rs:LL:CC
note: inside `inner`
--> $DIR/deallocate_against_protector2.rs:LL:CC
|
LL | f(x)
| ^^^^
note: inside `main` at $DIR/deallocate_against_protector2.rs:LL:CC
note: inside `main`
--> $DIR/deallocate_against_protector2.rs:LL:CC
|
LL | / inner(Box::leak(Box::new(NotUnpin(0, PhantomPinned))), |x| {

View file

@ -18,7 +18,7 @@ LL | ptr1.write(0);
| ^^^^^^^^^^^^^
= note: BACKTRACE:
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
note: inside `main` at $DIR/illegal_deALLOC.rs:LL:CC
note: inside `main`
--> $DIR/illegal_deALLOC.rs:LL:CC
|
LL | dealloc(ptr2, Layout::from_size_align_unchecked(1, 1));

View file

@ -18,7 +18,7 @@ LL | fn foo(a: &mut u32, y: *mut u32) -> u32 {
| ^
= note: BACKTRACE:
= note: inside `foo` at $DIR/illegal_write6.rs:LL:CC
note: inside `main` at $DIR/illegal_write6.rs:LL:CC
note: inside `main`
--> $DIR/illegal_write6.rs:LL:CC
|
LL | foo(x, p);

View file

@ -18,7 +18,7 @@ LL | fn inner(x: *mut i32, _y: &mut i32) {
| ^^
= note: BACKTRACE:
= note: inside `inner` at $DIR/invalidate_against_protector1.rs:LL:CC
note: inside `main` at $DIR/invalidate_against_protector1.rs:LL:CC
note: inside `main`
--> $DIR/invalidate_against_protector1.rs:LL:CC
|
LL | inner(xraw, xref);

View file

@ -18,7 +18,7 @@ LL | fn inner(x: *mut i32, _y: &i32) {
| ^^
= note: BACKTRACE:
= note: inside `inner` at $DIR/invalidate_against_protector2.rs:LL:CC
note: inside `main` at $DIR/invalidate_against_protector2.rs:LL:CC
note: inside `main`
--> $DIR/invalidate_against_protector2.rs:LL:CC
|
LL | inner(xraw, xref);

View file

@ -18,7 +18,7 @@ LL | fn inner(x: *mut i32, _y: &i32) {
| ^^
= note: BACKTRACE:
= note: inside `inner` at $DIR/invalidate_against_protector3.rs:LL:CC
note: inside `main` at $DIR/invalidate_against_protector3.rs:LL:CC
note: inside `main`
--> $DIR/invalidate_against_protector3.rs:LL:CC
|
LL | inner(ptr, &*ptr);

View file

@ -9,7 +9,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
= note: BACKTRACE:
= note: inside `std::boxed::Box::<u32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
= note: inside `std::boxed::Box::<u32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside `main` at $DIR/issue-miri-1050-1.rs:LL:CC
note: inside `main`
--> $DIR/issue-miri-1050-1.rs:LL:CC
|
LL | drop(Box::from_raw(ptr as *mut u32));

View file

@ -9,7 +9,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
= note: BACKTRACE:
= note: inside `std::boxed::Box::<i32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
= note: inside `std::boxed::Box::<i32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside `main` at $DIR/issue-miri-1050-2.rs:LL:CC
note: inside `main`
--> $DIR/issue-miri-1050-2.rs:LL:CC
|
LL | drop(Box::from_raw(ptr.as_ptr()));

View file

@ -21,12 +21,12 @@ LL | *our = 5;
| ^^^^^^^^
= note: BACKTRACE:
= note: inside `unknown_code_2` at $DIR/mut_exclusive_violation1.rs:LL:CC
note: inside `demo_mut_advanced_unique` at $DIR/mut_exclusive_violation1.rs:LL:CC
note: inside `demo_mut_advanced_unique`
--> $DIR/mut_exclusive_violation1.rs:LL:CC
|
LL | unknown_code_2();
| ^^^^^^^^^^^^^^^^
note: inside `main` at $DIR/mut_exclusive_violation1.rs:LL:CC
note: inside `main`
--> $DIR/mut_exclusive_violation1.rs:LL:CC
|
LL | demo_mut_advanced_unique(&mut 0);

View file

@ -19,17 +19,17 @@ LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
= note: BACKTRACE:
= note: inside `std::boxed::Box::<i32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
= note: inside `std::boxed::Box::<i32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside closure at $DIR/newtype_pair_retagging.rs:LL:CC
note: inside closure
--> $DIR/newtype_pair_retagging.rs:LL:CC
|
LL | || drop(Box::from_raw(ptr)),
| ^^^^^^^^^^^^^^^^^^
note: inside `dealloc_while_running::<[closure@$DIR/newtype_pair_retagging.rs:LL:CC]>` at $DIR/newtype_pair_retagging.rs:LL:CC
note: inside `dealloc_while_running::<[closure@$DIR/newtype_pair_retagging.rs:LL:CC]>`
--> $DIR/newtype_pair_retagging.rs:LL:CC
|
LL | dealloc();
| ^^^^^^^^^
note: inside `main` at $DIR/newtype_pair_retagging.rs:LL:CC
note: inside `main`
--> $DIR/newtype_pair_retagging.rs:LL:CC
|
LL | / dealloc_while_running(

View file

@ -19,17 +19,17 @@ LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
= note: BACKTRACE:
= note: inside `std::boxed::Box::<i32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
= note: inside `std::boxed::Box::<i32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside closure at $DIR/newtype_retagging.rs:LL:CC
note: inside closure
--> $DIR/newtype_retagging.rs:LL:CC
|
LL | || drop(Box::from_raw(ptr)),
| ^^^^^^^^^^^^^^^^^^
note: inside `dealloc_while_running::<[closure@$DIR/newtype_retagging.rs:LL:CC]>` at $DIR/newtype_retagging.rs:LL:CC
note: inside `dealloc_while_running::<[closure@$DIR/newtype_retagging.rs:LL:CC]>`
--> $DIR/newtype_retagging.rs:LL:CC
|
LL | dealloc();
| ^^^^^^^^^
note: inside `main` at $DIR/newtype_retagging.rs:LL:CC
note: inside `main`
--> $DIR/newtype_retagging.rs:LL:CC
|
LL | / dealloc_while_running(

View file

@ -21,7 +21,7 @@ LL | *val = 2; // this invalidates any raw ptrs `fun1` might have created.
| ^^^^^^^^
= note: BACKTRACE:
= note: inside `fun2` at $DIR/pointer_smuggling.rs:LL:CC
note: inside `main` at $DIR/pointer_smuggling.rs:LL:CC
note: inside `main`
--> $DIR/pointer_smuggling.rs:LL:CC
|
LL | fun2(); // if they now use a raw ptr they break our reference

View file

@ -8,7 +8,7 @@ LL | *p = 5;
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `thread_2` at $DIR/retag_data_race_read.rs:LL:CC
note: inside closure at $DIR/retag_data_race_read.rs:LL:CC
note: inside closure
--> $DIR/retag_data_race_read.rs:LL:CC
|
LL | let t2 = std::thread::spawn(move || thread_2(p));

View file

@ -8,7 +8,7 @@ LL | *p = 5;
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `thread_2` at $DIR/retag_data_race_write.rs:LL:CC
note: inside closure at $DIR/retag_data_race_write.rs:LL:CC
note: inside closure
--> $DIR/retag_data_race_write.rs:LL:CC
|
LL | let t2 = std::thread::spawn(move || thread_2(p));

View file

@ -21,7 +21,7 @@ LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: inside `foo` at $DIR/return_invalid_mut.rs:LL:CC
note: inside `main` at $DIR/return_invalid_mut.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_mut.rs:LL:CC
|
LL | foo(&mut (1, 2));

View file

@ -21,7 +21,7 @@ LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: inside `foo` at $DIR/return_invalid_mut_option.rs:LL:CC
note: inside `main` at $DIR/return_invalid_mut_option.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_mut_option.rs:LL:CC
|
LL | match foo(&mut (1, 2)) {

View file

@ -21,7 +21,7 @@ LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: inside `foo` at $DIR/return_invalid_mut_tuple.rs:LL:CC
note: inside `main` at $DIR/return_invalid_mut_tuple.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_mut_tuple.rs:LL:CC
|
LL | foo(&mut (1, 2)).0;

View file

@ -21,7 +21,7 @@ LL | unsafe { *xraw = (42, 23) }; // unfreeze
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: inside `foo` at $DIR/return_invalid_shr.rs:LL:CC
note: inside `main` at $DIR/return_invalid_shr.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_shr.rs:LL:CC
|
LL | foo(&mut (1, 2));

View file

@ -21,7 +21,7 @@ LL | unsafe { *xraw = (42, 23) }; // unfreeze
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: inside `foo` at $DIR/return_invalid_shr_option.rs:LL:CC
note: inside `main` at $DIR/return_invalid_shr_option.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_shr_option.rs:LL:CC
|
LL | match foo(&mut (1, 2)) {

View file

@ -21,7 +21,7 @@ LL | unsafe { *xraw = (42, 23) }; // unfreeze
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: inside `foo` at $DIR/return_invalid_shr_tuple.rs:LL:CC
note: inside `main` at $DIR/return_invalid_shr_tuple.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_shr_tuple.rs:LL:CC
|
LL | foo(&mut (1, 2)).0;

View file

@ -16,12 +16,12 @@ LL | *(x as *const i32 as *mut i32) = 7;
| ^
= note: BACKTRACE:
= note: inside `unknown_code` at $DIR/shr_frozen_violation1.rs:LL:CC
note: inside `foo` at $DIR/shr_frozen_violation1.rs:LL:CC
note: inside `foo`
--> $DIR/shr_frozen_violation1.rs:LL:CC
|
LL | unknown_code(&*x);
| ^^^^^^^^^^^^^^^^^
note: inside `main` at $DIR/shr_frozen_violation1.rs:LL:CC
note: inside `main`
--> $DIR/shr_frozen_violation1.rs:LL:CC
|
LL | println!("{}", foo(&mut 0));

View file

@ -16,7 +16,7 @@ LL | assert_eq!(*s.get_unchecked(1), 2);
| ^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: inside `core::slice::<impl [i32]>::get_unchecked::<usize>` at RUSTLIB/core/src/slice/mod.rs:LL:CC
note: inside `main` at $DIR/zst_slice.rs:LL:CC
note: inside `main`
--> $DIR/zst_slice.rs:LL:CC
|
LL | assert_eq!(*s.get_unchecked(1), 2);

Some files were not shown because too many files have changed in this diff Show more