]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-points-to-static.64bit.stderr
adjust tests
[rust.git] / src / test / ui / consts / const-points-to-static.64bit.stderr
1 error[E0080]: it is undefined behavior to use this value
2   --> $DIR/const-points-to-static.rs:6:1
3    |
4 LL | const TEST: &u8 = &MY_STATIC;
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a reference pointing to a static variable
6    |
7    = 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.
8    = note: the raw bytes of the constant (size: 8, align: 8) {
9                ╾───────alloc1────────╼                         │ ╾──────╼
10            }
11
12 warning: skipping const checks
13    |
14 help: skipping check that does not even have a feature gate
15   --> $DIR/const-points-to-static.rs:6:20
16    |
17 LL | const TEST: &u8 = &MY_STATIC;
18    |                    ^^^^^^^^^
19
20 error: aborting due to previous error; 1 warning emitted
21
22 For more information about this error, try `rustc --explain E0080`.