rust/tests/ui/consts/const-points-to-static.64bit.stderr

23 lines
1019 B
Plaintext
Raw Normal View History

error[E0080]: it is undefined behavior to use this value
--> $DIR/const-points-to-static.rs:6:1
|
LL | const TEST: &u8 = &MY_STATIC;
| ^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable in a constant
|
= 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.
= note: the raw bytes of the constant (size: 8, align: 8) {
2021-07-12 17:21:35 -05:00
╾───────alloc1────────╼ │ ╾──────╼
}
2020-05-03 07:23:08 -05:00
warning: skipping const checks
|
help: skipping check that does not even have a feature gate
--> $DIR/const-points-to-static.rs:6:20
2020-05-03 07:23:08 -05:00
|
LL | const TEST: &u8 = &MY_STATIC;
| ^^^^^^^^^
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.