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
Copy file name to clipboardExpand all lines: compiler/rustc_const_eval/messages.ftl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -479,11 +479,11 @@ const_eval_validation_never_val = {$front_matter}: encountered a value of the ne
479
479
const_eval_validation_null_box = {$front_matter}: encountered a null box
480
480
const_eval_validation_null_fn_ptr = {$front_matter}: encountered a null function pointer
481
481
const_eval_validation_null_ref = {$front_matter}: encountered a null reference
482
-
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}
482
+
const_eval_validation_nonnull_ptr_out_of_range = {$front_matter}: encountered a maybe-null pointer, but expected something that is definitely non-zero
483
483
const_eval_validation_out_of_range = {$front_matter}: encountered {$value}, but expected something {$in_range}
484
484
const_eval_validation_partial_pointer = {$front_matter}: encountered a partial pointer or a mix of pointers
485
485
const_eval_validation_pointer_as_int = {$front_matter}: encountered a pointer, but {$expected}
486
-
const_eval_validation_ptr_out_of_range = {$front_matter}: encountered a pointer, but expected something that cannot possibly fail to be{$in_range}
486
+
const_eval_validation_ptr_out_of_range = {$front_matter}: encountered a pointer with unknown absolute address, but expected something that is definitely{$in_range}
487
487
const_eval_validation_ref_to_uninhabited = {$front_matter}: encountered a reference pointing to uninhabited type {$ty}
488
488
const_eval_validation_unaligned_box = {$front_matter}: encountered an unaligned box (required {$required_bytes} byte alignment but found {$found_bytes})
489
489
const_eval_validation_unaligned_ref = {$front_matter}: encountered an unaligned reference (required {$required_bytes} byte alignment but found {$found_bytes})
error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 255 bytes, but got ALLOC1 which is only 1 byte from the end of the allocation
12
+
error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 255 bytes, but got ALLOC2 which is only 1 byte from the end of the allocation
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
88
+
|
89
+
= 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.
90
+
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
91
+
HEX_DUMP
92
+
}
93
+
94
+
error: aborting due to 9 previous errors
84
95
85
96
For more information about this error, try `rustc --explain E0080`.
@@ -162,6 +162,17 @@ error[E0080]: accessing memory based on pointer with alignment 1, but alignment
162
162
LL | ptr.read();
163
163
| ^^^^^^^^^^ evaluation of `UNALIGNED_READ` failed here
164
164
165
-
error: aborting due to 15 previous errors
165
+
error[E0080]: constructing invalid value: encountered a pointer with unknown absolute address, but expected something that is definitely greater or equal to 1000
166
+
--> $DIR/ub-ref-ptr.rs:74:1
167
+
|
168
+
LL | const INVALID_VALUE_PTR: High = unsafe { mem::transmute(&S) };
169
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
170
+
|
171
+
= 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.
172
+
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
173
+
HEX_DUMP
174
+
}
175
+
176
+
error: aborting due to 16 previous errors
166
177
167
178
For more information about this error, try `rustc --explain E0080`.
0 commit comments