You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.unstable_sugg = if it is not part of the public API, make this function unstably const
393
403
.bypass_sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
394
404
395
-
const_eval_unsupported_untyped_pointer = unsupported untyped pointer in constant
396
-
.note = memory only reachable via raw pointers is not supported
397
-
398
405
const_eval_unterminated_c_string =
399
406
reading a null-terminated string starting at {$pointer} with no null found before end of allocation
400
407
@@ -406,7 +413,6 @@ const_eval_upcast_mismatch =
406
413
407
414
## The `front_matter`s here refer to either `const_eval_front_matter_invalid_value` or `const_eval_front_matter_invalid_value_with_path`.
408
415
## (We'd love to sort this differently to make that more clear but tidy won't let us...)
409
-
const_eval_validation_box_to_mut = {$front_matter}: encountered a box pointing to mutable memory in a constant
410
416
const_eval_validation_box_to_static = {$front_matter}: encountered a box pointing to a static variable in a constant
411
417
const_eval_validation_box_to_uninhabited = {$front_matter}: encountered a box pointing to uninhabited type {$ty}
412
418
const_eval_validation_dangling_box_no_provenance = {$front_matter}: encountered a dangling box ({$pointer} has no provenance)
@@ -441,7 +447,8 @@ const_eval_validation_invalid_fn_ptr = {$front_matter}: encountered {$value}, bu
441
447
const_eval_validation_invalid_ref_meta = {$front_matter}: encountered invalid reference metadata: total size is bigger than largest supported object
442
448
const_eval_validation_invalid_ref_slice_meta = {$front_matter}: encountered invalid reference metadata: slice is bigger than largest supported object
443
449
const_eval_validation_invalid_vtable_ptr = {$front_matter}: encountered {$value}, but expected a vtable pointer
444
-
const_eval_validation_mutable_ref_in_const = {$front_matter}: encountered mutable reference in a `const`
450
+
const_eval_validation_mutable_ref_in_const = {$front_matter}: encountered mutable reference in a `const` or `static`
451
+
const_eval_validation_mutable_ref_to_immutable = {$front_matter}: encountered mutable reference or box pointing to read-only memory
445
452
const_eval_validation_never_val = {$front_matter}: encountered a value of the never type `!`
446
453
const_eval_validation_null_box = {$front_matter}: encountered a null box
447
454
const_eval_validation_null_fn_ptr = {$front_matter}: encountered a null function pointer
@@ -451,15 +458,14 @@ const_eval_validation_out_of_range = {$front_matter}: encountered {$value}, but
451
458
const_eval_validation_partial_pointer = {$front_matter}: encountered a partial pointer or a mix of pointers
452
459
const_eval_validation_pointer_as_int = {$front_matter}: encountered a pointer, but {$expected}
453
460
const_eval_validation_ptr_out_of_range = {$front_matter}: encountered a pointer, but expected something that cannot possibly fail to be {$in_range}
454
-
const_eval_validation_ref_to_mut = {$front_matter}: encountered a reference pointing to mutable memory in a constant
455
461
const_eval_validation_ref_to_static = {$front_matter}: encountered a reference pointing to a static variable in a constant
456
462
const_eval_validation_ref_to_uninhabited = {$front_matter}: encountered a reference pointing to uninhabited type {$ty}
457
463
const_eval_validation_unaligned_box = {$front_matter}: encountered an unaligned box (required {$required_bytes} byte alignment but found {$found_bytes})
458
464
const_eval_validation_unaligned_ref = {$front_matter}: encountered an unaligned reference (required {$required_bytes} byte alignment but found {$found_bytes})
459
465
const_eval_validation_uninhabited_enum_variant = {$front_matter}: encountered an uninhabited enum variant
460
466
const_eval_validation_uninhabited_val = {$front_matter}: encountered a value of uninhabited type `{$ty}`
461
467
const_eval_validation_uninit = {$front_matter}: encountered uninitialized memory, but {$expected}
462
-
const_eval_validation_unsafe_cell = {$front_matter}: encountered `UnsafeCell` in a `const`
468
+
const_eval_validation_unsafe_cell = {$front_matter}: encountered `UnsafeCell` in read-only memory
463
469
464
470
const_eval_write_through_immutable_pointer =
465
471
writing through a pointer that was derived from a shared (immutable) reference
0 commit comments