2023-05-17 05:30:14 -05:00
const_eval_address_space_full =
there are no more free addresses in the address space
2023-09-26 09:25:05 -05:00
2023-05-17 05:30:14 -05:00
const_eval_alignment_check_failed =
2023-09-26 09:25:05 -05:00
{$msg ->
[AccessedPtr] accessing memory
*[other] accessing memory based on pointer
} with alignment {$has}, but alignment {$required} is required
2023-05-17 05:30:14 -05:00
const_eval_already_reported =
an error has already been reported elsewhere (this should not usually be printed)
const_eval_assume_false =
`assume` called with `false`
const_eval_await_non_const =
cannot convert `{$ty}` into a future in {const_eval_const_context}s
const_eval_bounds_check_failed =
indexing out of bounds: the len is {$len} but the index is {$index}
const_eval_call_nonzero_intrinsic =
`{$name}` called on 0
const_eval_closure_call =
closures need an RFC before allowed to be called in {const_eval_const_context}s
const_eval_closure_fndef_not_const =
function defined here, but it is not `const`
const_eval_closure_non_const =
cannot call non-const closure in {const_eval_const_context}s
const_eval_consider_dereferencing =
consider dereferencing here
2024-01-05 05:18:11 -06:00
const_eval_const_accesses_mut_global =
constant accesses mutable global memory
2023-05-17 05:30:14 -05:00
const_eval_const_context = {$kind ->
[const] constant
[static] static
[const_fn] constant function
*[other] {""}
}
const_eval_copy_nonoverlapping_overlapping =
`copy_nonoverlapping` called on overlapping ranges
const_eval_dangling_int_pointer =
2024-07-27 11:09:50 -05:00
{$bad_pointer_message}: {const_eval_expected_inbounds_pointer}, but got {$pointer} which is a dangling pointer (it has no provenance)
2023-05-17 05:30:14 -05:00
const_eval_dangling_null_pointer =
2024-07-27 11:09:50 -05:00
{$bad_pointer_message}: {const_eval_expected_inbounds_pointer}, but got a null pointer
2023-05-17 05:30:14 -05:00
2023-12-16 09:24:25 -06:00
const_eval_dangling_ptr_in_final = encountered dangling pointer in final value of {const_eval_intern_kind}
2023-05-17 05:30:14 -05:00
const_eval_dead_local =
accessing a dead local variable
const_eval_dealloc_immutable =
deallocating immutable allocation {$alloc}
const_eval_dealloc_incorrect_layout =
incorrect layout on deallocation: {$alloc} has size {$size} and alignment {$align}, but gave size {$size_found} and alignment {$align_found}
const_eval_dealloc_kind_mismatch =
deallocating {$alloc}, which is {$alloc_kind} memory, using {$kind} deallocation operation
const_eval_deref_coercion_non_const =
cannot perform deref coercion on `{$ty}` in {const_eval_const_context}s
.note = attempting to deref into `{$target_ty}`
.target_note = deref defined here
const_eval_deref_function_pointer =
accessing {$allocation} which contains a function
const_eval_deref_vtable_pointer =
accessing {$allocation} which contains a vtable
const_eval_division_by_zero =
dividing by zero
const_eval_division_overflow =
overflow in signed division (dividing MIN by -1)
const_eval_dyn_call_not_a_method =
`dyn` call trying to call something that is not a method
const_eval_error = {$error_kind ->
[static] could not evaluate static initializer
[const] evaluation of constant value failed
[const_with_path] evaluation of `{$instance}` failed
*[other] {""}
}
const_eval_exact_div_has_remainder =
exact_div: {$a} cannot be divided by {$b} without remainder
2024-07-27 11:09:50 -05:00
const_eval_expected_inbounds_pointer =
2024-07-29 09:40:21 -05:00
expected a pointer to {$inbounds_size_abs ->
[0] some allocation
*[x] {$inbounds_size_is_neg ->
[false] {$inbounds_size_abs ->
[1] 1 byte of memory
*[x] {$inbounds_size_abs} bytes of memory
}
*[true] the end of {$inbounds_size_abs ->
[1] 1 byte of memory
*[x] {$inbounds_size_abs} bytes of memory
}
}
2024-07-27 11:09:50 -05:00
}
2024-02-10 08:41:08 -06:00
const_eval_extern_static =
cannot access extern static ({$did})
2024-06-22 09:26:30 -05:00
const_eval_extern_type_field = `extern type` field does not have a known offset
2023-05-17 05:30:14 -05:00
const_eval_fn_ptr_call =
function pointers need an RFC before allowed to be called in {const_eval_const_context}s
const_eval_for_loop_into_iter_non_const =
cannot convert `{$ty}` into an iterator in {const_eval_const_context}s
const_eval_frame_note = {$times ->
[0] {const_eval_frame_note_inner}
*[other] [... {$times} additional calls {const_eval_frame_note_inner} ...]
}
const_eval_frame_note_inner = inside {$where_ ->
[closure] closure
[instance] `{$instance}`
*[other] {""}
}
const_eval_in_bounds_test = out-of-bounds pointer use
const_eval_incompatible_calling_conventions =
calling a function with calling convention {$callee_conv} using calling convention {$caller_conv}
const_eval_incompatible_return_types =
calling a function with return type {$callee_ty} passing return place of type {$caller_ty}
const_eval_incompatible_types =
calling a function with argument of type {$callee_ty} passing data of type {$caller_ty}
2024-10-08 05:25:26 -05:00
const_eval_interior_mutable_ref_escaping =
2023-05-17 05:30:14 -05:00
{const_eval_const_context}s cannot refer to interior mutable data
2022-06-29 00:32:32 -05:00
.label = this borrow of an interior mutable value may end up in the final value
.help = to fix this, the value can be extracted to a separate `static` item and then referenced
.teach_note =
2024-10-08 05:25:26 -05:00
References that escape into the final value of a constant or static must be immutable.
This is to avoid accidentally creating shared mutable state.
If you really want global mutable state, try using an interior mutable `static` or a `static mut`.
2022-06-29 00:32:32 -05:00
2023-12-16 09:24:25 -06:00
const_eval_intern_kind = {$kind ->
[static] static
[static_mut] mutable static
[const] constant
[promoted] promoted
*[other] {""}
}
2023-05-19 15:03:35 -05:00
const_eval_interrupted = compilation was interrupted
2023-05-17 05:30:14 -05:00
const_eval_invalid_align_details =
invalid align passed to `{$name}`: {$align} is {$err_kind ->
[not_power_of_two] not a power of 2
[too_large] too large
*[other] {""}
}
const_eval_invalid_bool =
interpreting an invalid 8-bit value as a bool: 0x{$value}
const_eval_invalid_char =
interpreting an invalid 32-bit value as a char: 0x{$value}
const_eval_invalid_dealloc =
deallocating {$alloc_id}, which is {$kind ->
[fn] a function
[vtable] a vtable
[static_mem] static memory
*[other] {""}
}
const_eval_invalid_function_pointer =
using {$pointer} as function pointer but it does not point to a function
const_eval_invalid_meta =
invalid metadata in wide pointer: total size is bigger than largest supported object
const_eval_invalid_meta_slice =
invalid metadata in wide pointer: slice is bigger than largest supported object
2024-02-10 08:26:55 -06:00
const_eval_invalid_niched_enum_variant_written =
trying to set discriminant of a {$ty} to the niched variant, but the value does not match
2023-05-17 05:30:14 -05:00
const_eval_invalid_str =
this string is not valid UTF-8: {$err}
const_eval_invalid_tag =
enum value has invalid tag: {$tag}
const_eval_invalid_transmute =
transmuting from {$src_bytes}-byte type to {$dest_bytes}-byte type: `{$src}` -> `{$dest}`
const_eval_invalid_uninit_bytes =
reading memory at {$alloc}{$access}, but memory is uninitialized at {$uninit}, and this operation requires initialized memory
const_eval_invalid_uninit_bytes_unknown =
using uninitialized data, but this operation requires initialized memory
const_eval_invalid_vtable_pointer =
using {$pointer} as vtable pointer but it does not point to a vtable
2024-04-21 04:35:02 -05:00
const_eval_invalid_vtable_trait =
2024-09-22 19:00:01 -05:00
using vtable for `{$vtable_dyn_type}` but `{$expected_dyn_type}` was expected
2023-05-17 05:30:14 -05:00
2024-08-07 10:42:55 -05:00
const_eval_lazy_lock =
consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
2023-05-17 05:30:14 -05:00
const_eval_live_drop =
destructor of `{$dropped_ty}` cannot be evaluated at compile-time
.label = the destructor for this type cannot be evaluated in {const_eval_const_context}s
.dropped_at_label = value is dropped here
2022-11-02 06:57:40 -05:00
const_eval_long_running =
constant evaluation is taking a long time
.note = this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
If your compilation actually takes a long time, you can safely allow the lint.
.label = the const evaluator is currently interpreting this expression
.help = the constant being evaluated
2023-05-17 05:30:14 -05:00
2023-06-18 00:24:38 -05:00
const_eval_match_eq_non_const = cannot match on `{$ty}` in {const_eval_const_context}s
.note = `{$ty}` cannot be compared in compile-time, and therefore cannot be used in `match`es
2022-08-10 02:42:10 -05:00
const_eval_max_num_nodes_in_const = maximum number of nodes exceeded in constant {$global_const_id}
2022-06-29 00:46:25 -05:00
2023-05-17 05:30:14 -05:00
const_eval_memory_access_test = memory access failed
const_eval_memory_exhausted =
tried to allocate more memory than available to compiler
2023-08-02 09:14:36 -05:00
2023-05-17 05:30:14 -05:00
const_eval_modified_global =
modifying a static's initial value from another static's initializer
2023-12-16 09:24:25 -06:00
const_eval_mutable_ptr_in_final = encountered mutable pointer in final value of {const_eval_intern_kind}
2024-10-08 05:25:26 -05:00
const_eval_mutable_raw_escaping =
raw mutable pointers are not allowed in the final value of {const_eval_const_context}s
.teach_note =
Pointers that escape into the final value of a constant or static must be immutable.
This is to avoid accidentally creating shared mutable state.
If you really want global mutable state, try using an interior mutable `static` or a `static mut`.
const_eval_mutable_ref_escaping =
mutable references are not allowed in the final value of {const_eval_const_context}s
.teach_note =
References that escape into the final value of a constant or static must be immutable.
This is to avoid accidentally creating shared mutable state.
If you really want global mutable state, try using an interior mutable `static` or a `static mut`.
2024-04-02 08:00:46 -05:00
const_eval_nested_static_in_thread_local = #[thread_local] does not support implicit nested statics, please create explicit static items and refer to them instead
2022-08-10 02:42:10 -05:00
const_eval_non_const_fmt_macro_call =
2023-05-17 05:30:14 -05:00
cannot call non-const formatting macro in {const_eval_const_context}s
2023-05-22 20:51:25 -05:00
2022-06-29 00:46:25 -05:00
const_eval_non_const_fn_call =
2023-05-17 05:30:14 -05:00
cannot call non-const fn `{$def_path_str}` in {const_eval_const_context}s
const_eval_non_const_impl =
impl defined here, but it is not `const`
2024-10-06 12:59:19 -05:00
const_eval_non_const_intrinsic =
cannot call non-const intrinsic `{$name}` in {const_eval_const_context}s
2023-05-17 05:30:14 -05:00
const_eval_not_enough_caller_args =
calling a function with fewer arguments than it requires
const_eval_nullary_intrinsic_fail =
could not evaluate nullary intrinsic
2024-05-09 06:09:47 -05:00
const_eval_offset_from_different_allocations =
`{$name}` called on pointers into different allocations
2023-05-17 05:30:14 -05:00
const_eval_offset_from_overflow =
`{$name}` called when first pointer is too far ahead of second
2024-05-09 06:09:47 -05:00
const_eval_offset_from_test =
2024-07-29 09:40:21 -05:00
out-of-bounds `offset_from` origin
2023-05-17 05:30:14 -05:00
const_eval_offset_from_underflow =
`{$name}` called when first pointer is too far before second
2024-05-09 06:09:47 -05:00
const_eval_offset_from_unsigned_overflow =
2024-07-27 10:18:35 -05:00
`ptr_offset_from_unsigned` called when first pointer has smaller {$is_addr ->
[true] address
*[false] offset
} than second: {$a_offset} < {$b_offset}
2023-05-17 05:30:14 -05:00
const_eval_operator_non_const =
cannot call non-const operator in {const_eval_const_context}s
2024-05-21 05:17:34 -05:00
const_eval_overflow_arith =
arithmetic overflow in `{$intrinsic}`
2023-05-17 05:30:14 -05:00
const_eval_overflow_shift =
2024-05-21 05:17:34 -05:00
overflowing shift by {$shift_amount} in `{$intrinsic}`
2023-05-17 05:30:14 -05:00
const_eval_panic =
the evaluated program panicked at '{$msg}', {$file}:{$line}:{$col}
2023-05-22 20:51:25 -05:00
2022-06-29 00:46:25 -05:00
const_eval_panic_non_str = argument to `panic!()` in a const context must have type `&str`
2023-05-17 05:30:14 -05:00
const_eval_partial_pointer_copy =
unable to copy parts of a pointer from memory at {$ptr}
const_eval_partial_pointer_overwrite =
unable to overwrite parts of a pointer in memory at {$ptr}
const_eval_pointer_arithmetic_overflow =
2024-08-01 07:38:58 -05:00
overflowing pointer arithmetic: the total offset in bytes does not fit in an `isize`
2023-05-17 05:30:14 -05:00
const_eval_pointer_arithmetic_test = out-of-bounds pointer arithmetic
const_eval_pointer_out_of_bounds =
2024-07-27 11:09:50 -05:00
{$bad_pointer_message}: {const_eval_expected_inbounds_pointer}, but got {$pointer} {$ptr_offset_is_neg ->
[true] which points to before the beginning of the allocation
2024-07-29 09:40:21 -05:00
*[false] {$inbounds_size_is_neg ->
[true] {$ptr_offset_abs ->
[0] which is at the beginning of the allocation
*[other] which does not have enough space to the beginning of the allocation
}
*[false] {$alloc_size_minus_ptr_offset ->
[0] which is at or beyond the end of the allocation of size {$alloc_size ->
[1] 1 byte
*[x] {$alloc_size} bytes
}
[1] which is only 1 byte from the end of the allocation
*[x] which is only {$alloc_size_minus_ptr_offset} bytes from the end of the allocation
2024-07-27 11:09:50 -05:00
}
}
}
2023-05-17 05:30:14 -05:00
const_eval_pointer_use_after_free =
2023-08-01 10:03:19 -05:00
{$bad_pointer_message}: {$alloc_id} has been freed, so this pointer is dangling
2023-05-17 05:30:14 -05:00
const_eval_ptr_as_bytes_1 =
this code performed an operation that depends on the underlying bytes representing a pointer
const_eval_ptr_as_bytes_2 =
the absolute address of a pointer is not known at compile-time, so such operations are not supported
const_eval_question_branch_non_const =
`?` cannot determine the branch of `{$ty}` in {const_eval_const_context}s
const_eval_question_from_residual_non_const =
`?` cannot convert from residual of `{$ty}` in {const_eval_const_context}s
const_eval_range = in the range {$lo}..={$hi}
const_eval_range_lower = greater or equal to {$lo}
const_eval_range_singular = equal to {$lo}
const_eval_range_upper = less or equal to {$hi}
const_eval_range_wrapping = less or equal to {$hi}, or greater or equal to {$lo}
const_eval_raw_bytes = the raw bytes of the constant (size: {$size}, align: {$align}) {"{"}{$bytes}{"}"}
2022-08-10 02:42:10 -05:00
const_eval_raw_ptr_comparison =
2022-06-29 00:46:25 -05:00
pointers cannot be reliably compared during const eval
.note = see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
2022-08-10 02:42:10 -05:00
const_eval_raw_ptr_to_int =
pointers cannot be cast to integers during const eval
.note = at compile-time, pointers do not have an integer value
.note2 = avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
2022-06-29 01:22:15 -05:00
2023-08-02 09:14:36 -05:00
const_eval_read_pointer_as_int =
unable to turn pointer into integer
2023-05-17 05:30:14 -05:00
const_eval_realloc_or_alloc_with_offset =
{$kind ->
[dealloc] deallocating
[realloc] reallocating
*[other] {""}
} {$ptr} which does not point to the beginning of an object
2023-10-12 06:27:43 -05:00
const_eval_recursive_static = encountered static that tried to initialize itself with itself
2023-05-17 05:30:14 -05:00
const_eval_remainder_by_zero =
calculating the remainder with a divisor of zero
const_eval_remainder_overflow =
overflow in signed remainder (dividing MIN by -1)
const_eval_scalar_size_mismatch =
scalar size mismatch: expected {$target_size} bytes but got {$data_size} bytes instead
const_eval_size_overflow =
overflow computing total size of `{$name}`
const_eval_stack_frame_limit_reached =
reached the configured maximum number of stack frames
2022-07-07 22:46:18 -05:00
const_eval_thread_local_access =
2022-08-20 14:27:41 -05:00
thread-local statics cannot be accessed at compile-time
2022-07-07 22:46:18 -05:00
2023-05-17 05:30:14 -05:00
const_eval_thread_local_static =
cannot access thread local static ({$did})
const_eval_too_generic =
encountered overly generic constant
const_eval_too_many_caller_args =
calling a function with more arguments than it expected
2022-07-07 22:46:18 -05:00
2023-05-17 05:30:14 -05:00
const_eval_try_block_from_output_non_const =
`try` block cannot convert `{$ty}` to the result in {const_eval_const_context}s
const_eval_unallowed_fn_pointer_call = function pointer calls are not allowed in {const_eval_const_context}s
2022-08-18 20:49:59 -05:00
2022-08-20 14:27:41 -05:00
const_eval_unallowed_heap_allocations =
2023-05-17 05:30:14 -05:00
allocations are not allowed in {const_eval_const_context}s
.label = allocation not allowed in {const_eval_const_context}s
2024-10-08 05:25:26 -05:00
.teach_note =
The runtime heap is not yet available at compile-time, so no runtime heap allocations can be created.
2023-05-22 20:51:25 -05:00
2022-08-20 14:27:41 -05:00
const_eval_unallowed_inline_asm =
2023-05-17 05:30:14 -05:00
inline assembly is not allowed in {const_eval_const_context}s
2022-08-19 13:36:09 -05:00
2022-08-22 10:38:16 -05:00
const_eval_unallowed_op_in_const_context =
2022-08-19 13:36:09 -05:00
{$msg}
2023-07-24 04:44:58 -05:00
const_eval_uninhabited_enum_variant_read =
read discriminant of an uninhabited enum variant
2023-05-17 05:30:14 -05:00
const_eval_uninhabited_enum_variant_written =
2023-07-24 04:44:58 -05:00
writing discriminant of an uninhabited enum variant
2024-10-06 12:59:19 -05:00
const_eval_unmarked_const_fn_exposed = `{$def_path}` cannot be (indirectly) exposed to stable
.help = either mark the callee as `#[rustc_const_stable_indirect]`, or the caller as `#[rustc_const_unstable]`
const_eval_unmarked_intrinsic_exposed = intrinsic `{$def_path}` cannot be (indirectly) exposed to stable
.help = mark the caller as `#[rustc_const_unstable]`, or mark the intrinsic `#[rustc_const_stable_indirect]` (but this requires team approval)
2023-05-17 05:30:14 -05:00
const_eval_unreachable = entering unreachable code
const_eval_unreachable_unwind =
unwinding past a stack frame that does not allow unwinding
2023-08-06 11:40:37 -05:00
const_eval_unsized_local = unsized locals are not supported
2022-08-20 14:27:41 -05:00
const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn
2024-10-06 12:59:19 -05:00
const_eval_unstable_in_stable_exposed =
const function that might be (indirectly) exposed to stable cannot use `#[feature({$gate})]`
.is_function_call = mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
.unstable_sugg = if the {$is_function_call2 ->
[true] caller
*[false] function
} is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
.bypass_sugg = otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
const_eval_unstable_intrinsic = `{$name}` is not yet stable as a const intrinsic
.help = add `#![feature({$feature})]` to the crate attributes to enable
2023-05-17 05:30:14 -05:00
const_eval_unterminated_c_string =
reading a null-terminated string starting at {$pointer} with no null found before end of allocation
const_eval_unwind_past_top =
unwinding past the topmost frame of the stack
2023-08-02 09:14:36 -05:00
## The `front_matter`s here refer to either `const_eval_front_matter_invalid_value` or `const_eval_front_matter_invalid_value_with_path`.
## (We'd love to sort this differently to make that more clear but tidy won't let us...)
const_eval_validation_box_to_uninhabited = {$front_matter}: encountered a box pointing to uninhabited type {$ty}
2024-01-06 06:48:48 -06:00
2024-01-06 08:06:22 -06:00
const_eval_validation_const_ref_to_extern = {$front_matter}: encountered reference to `extern` static in `const`
2024-01-06 06:48:48 -06:00
const_eval_validation_const_ref_to_mutable = {$front_matter}: encountered reference to mutable memory in `const`
2023-08-02 09:14:36 -05:00
const_eval_validation_dangling_box_no_provenance = {$front_matter}: encountered a dangling box ({$pointer} has no provenance)
const_eval_validation_dangling_box_out_of_bounds = {$front_matter}: encountered a dangling box (going beyond the bounds of its allocation)
const_eval_validation_dangling_box_use_after_free = {$front_matter}: encountered a dangling box (use-after-free)
const_eval_validation_dangling_ref_no_provenance = {$front_matter}: encountered a dangling reference ({$pointer} has no provenance)
const_eval_validation_dangling_ref_out_of_bounds = {$front_matter}: encountered a dangling reference (going beyond the bounds of its allocation)
const_eval_validation_dangling_ref_use_after_free = {$front_matter}: encountered a dangling reference (use-after-free)
const_eval_validation_expected_bool = expected a boolean
const_eval_validation_expected_box = expected a box
const_eval_validation_expected_char = expected a unicode scalar value
const_eval_validation_expected_enum_tag = expected a valid enum tag
const_eval_validation_expected_float = expected a floating point number
const_eval_validation_expected_fn_ptr = expected a function pointer
const_eval_validation_expected_init_scalar = expected initialized scalar value
const_eval_validation_expected_int = expected an integer
const_eval_validation_expected_raw_ptr = expected a raw pointer
const_eval_validation_expected_ref = expected a reference
const_eval_validation_expected_str = expected a string
2024-03-13 04:25:20 -05:00
const_eval_validation_failure =
it is undefined behavior to use this value
const_eval_validation_failure_note =
The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
2023-08-02 09:14:36 -05:00
const_eval_validation_front_matter_invalid_value = constructing invalid value
const_eval_validation_front_matter_invalid_value_with_path = constructing invalid value at {$path}
2023-05-17 05:30:14 -05:00
const_eval_validation_invalid_bool = {$front_matter}: encountered {$value}, but expected a boolean
2023-08-02 09:14:36 -05:00
const_eval_validation_invalid_box_meta = {$front_matter}: encountered invalid box metadata: total size is bigger than largest supported object
const_eval_validation_invalid_box_slice_meta = {$front_matter}: encountered invalid box metadata: slice is bigger than largest supported object
2023-05-17 05:30:14 -05:00
const_eval_validation_invalid_char = {$front_matter}: encountered {$value}, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
2023-08-02 09:14:36 -05:00
const_eval_validation_invalid_enum_tag = {$front_matter}: encountered {$value}, but expected a valid enum tag
const_eval_validation_invalid_fn_ptr = {$front_matter}: encountered {$value}, but expected a function pointer
const_eval_validation_invalid_ref_meta = {$front_matter}: encountered invalid reference metadata: total size is bigger than largest supported object
const_eval_validation_invalid_ref_slice_meta = {$front_matter}: encountered invalid reference metadata: slice is bigger than largest supported object
const_eval_validation_invalid_vtable_ptr = {$front_matter}: encountered {$value}, but expected a vtable pointer
2024-09-22 19:00:01 -05:00
const_eval_validation_invalid_vtable_trait = {$front_matter}: wrong trait in wide pointer vtable: expected `{$expected_dyn_type}`, but encountered `{$vtable_dyn_type}`
2023-12-16 09:24:25 -06:00
const_eval_validation_mutable_ref_to_immutable = {$front_matter}: encountered mutable reference or box pointing to read-only memory
2023-08-02 09:14:36 -05:00
const_eval_validation_never_val = {$front_matter}: encountered a value of the never type `!`
const_eval_validation_null_box = {$front_matter}: encountered a null box
const_eval_validation_null_fn_ptr = {$front_matter}: encountered a null function pointer
const_eval_validation_null_ref = {$front_matter}: encountered a null reference
const_eval_validation_nullable_ptr_out_of_range = {$front_matter}: encountered a potentially null pointer, but expected something that cannot possibly fail to be {$in_range}
const_eval_validation_out_of_range = {$front_matter}: encountered {$value}, but expected something {$in_range}
const_eval_validation_partial_pointer = {$front_matter}: encountered a partial pointer or a mix of pointers
const_eval_validation_pointer_as_int = {$front_matter}: encountered a pointer, but {$expected}
const_eval_validation_ptr_out_of_range = {$front_matter}: encountered a pointer, but expected something that cannot possibly fail to be {$in_range}
const_eval_validation_ref_to_uninhabited = {$front_matter}: encountered a reference pointing to uninhabited type {$ty}
const_eval_validation_unaligned_box = {$front_matter}: encountered an unaligned box (required {$required_bytes} byte alignment but found {$found_bytes})
const_eval_validation_unaligned_ref = {$front_matter}: encountered an unaligned reference (required {$required_bytes} byte alignment but found {$found_bytes})
const_eval_validation_uninhabited_enum_variant = {$front_matter}: encountered an uninhabited enum variant
const_eval_validation_uninhabited_val = {$front_matter}: encountered a value of uninhabited type `{$ty}`
const_eval_validation_uninit = {$front_matter}: encountered uninitialized memory, but {$expected}
2023-12-16 09:24:25 -06:00
const_eval_validation_unsafe_cell = {$front_matter}: encountered `UnsafeCell` in read-only memory
2023-08-02 09:14:36 -05:00
2023-11-26 09:57:13 -06:00
const_eval_write_through_immutable_pointer =
writing through a pointer that was derived from a shared (immutable) reference
2023-05-17 05:30:14 -05:00
const_eval_write_to_read_only =
writing to {$allocation} which is read-only