blob: 820b6433f36c524c050c91df99160cac254281d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
error[E0658]: dereferencing raw mutable pointers in constant functions is unstable
--> $DIR/min_const_fn_unsafe_bad.rs:1:77
|
LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { &*x } }
| ^^^
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
error[E0658]: dereferencing raw mutable pointers in constant functions is unstable
--> $DIR/min_const_fn_unsafe_bad.rs:4:70
|
LL | const unsafe fn bad_const_unsafe_deref_raw(x: *mut usize) -> usize { *x }
| ^^
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
error[E0658]: dereferencing raw mutable pointers in constant functions is unstable
--> $DIR/min_const_fn_unsafe_bad.rs:7:83
|
LL | const unsafe fn bad_const_unsafe_deref_raw_ref(x: *mut usize) -> &'static usize { &*x }
| ^^^
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0658`.
|