mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-13 02:17:41 +00:00
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
![]() |
error[E0080]: it is undefined behavior to use this value
|
||
|
--> $DIR/ub-int-array.rs:15:1
|
||
|
|
|
||
|
LL | / const UNINIT_INT_0: [u32; 3] = unsafe {
|
||
|
LL | |
|
||
|
LL | |
|
||
|
LL | | [
|
||
|
... |
|
||
|
LL | | ]
|
||
|
LL | | };
|
||
|
| |__^ type validation failed: encountered uninitialized bytes at [0]
|
||
|
|
|
||
|
= 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.
|
||
|
|
||
|
error[E0080]: it is undefined behavior to use this value
|
||
|
--> $DIR/ub-int-array.rs:24:1
|
||
|
|
|
||
|
LL | / const UNINIT_INT_1: [u32; 3] = unsafe {
|
||
|
LL | |
|
||
|
LL | |
|
||
|
LL | | mem::transmute(
|
||
|
... |
|
||
|
LL | | )
|
||
|
LL | | };
|
||
|
| |__^ type validation failed: encountered uninitialized bytes at [1]
|
||
|
|
|
||
|
= 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.
|
||
|
|
||
|
error[E0080]: it is undefined behavior to use this value
|
||
|
--> $DIR/ub-int-array.rs:44:1
|
||
|
|
|
||
|
LL | / const UNINIT_INT_2: [u32; 3] = unsafe {
|
||
|
LL | |
|
||
|
LL | |
|
||
|
LL | | mem::transmute(
|
||
|
... |
|
||
|
LL | | )
|
||
|
LL | | };
|
||
|
| |__^ type validation failed: encountered uninitialized bytes at [2]
|
||
|
|
|
||
|
= 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.
|
||
|
|
||
|
error: aborting due to 3 previous errors
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0080`.
|