14 lines
391 B
Plaintext
14 lines
391 B
Plaintext
|
error: any use of this value will cause an error
|
||
|
--> $DIR/dangling_raw_ptr.rs:3:1
|
||
|
|
|
||
|
LL | / const FOO: *const u32 = { //~ ERROR any use of this value will cause an error
|
||
|
LL | | let x = 42;
|
||
|
LL | | &x
|
||
|
LL | | };
|
||
|
| |__^ type validation failed: encountered dangling pointer in final constant
|
||
|
|
|
||
|
= note: #[deny(const_err)] on by default
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|