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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
974 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) {
╾ALLOC0╼ │ ╾──────╼
}
2020-05-03 12:23:08 +00: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 12:23:08 +00: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`.