]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-points-to-static.stderr
Rollup merge of #72279 - RalfJung:raw-ref-macros, r=nikomatsakis
[rust.git] / src / test / ui / consts / const-points-to-static.stderr
1 error[E0080]: it is undefined behavior to use this value
2   --> $DIR/const-points-to-static.rs:5: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
9 warning: skipping const checks
10    |
11 help: skipping check that does not even have a feature gate
12   --> $DIR/const-points-to-static.rs:5:20
13    |
14 LL | const TEST: &u8 = &MY_STATIC;
15    |                    ^^^^^^^^^
16
17 error: aborting due to previous error; 1 warning emitted
18
19 For more information about this error, try `rustc --explain E0080`.