blob: 4d5b8eac541dfd28ac0123e2629efdb73102cd23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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) {
╾───────alloc1────────╼ │ ╾──────╼
}
warning: skipping const checks
|
help: skipping check that does not even have a feature gate
--> $DIR/const-points-to-static.rs:6:20
|
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`.
|