2018-10-22 08:45:03 -05:00
|
|
|
error: any use of this value will cause an error
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/dangling_raw_ptr.rs:1:1
|
2018-10-22 08:45:03 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | / const FOO: *const u32 = {
|
2018-10-22 08:45:03 -05:00
|
|
|
LL | | let x = 42;
|
|
|
|
LL | | &x
|
|
|
|
LL | | };
|
2020-03-08 13:44:09 -05:00
|
|
|
| |__^ encountered dangling pointer in final constant
|
2018-10-22 08:45:03 -05:00
|
|
|
|
|
2019-07-16 15:17:38 -05:00
|
|
|
= note: `#[deny(const_err)]` on by default
|
2018-10-22 08:45:03 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|