]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/min_const_fn/min_const_fn_unsafe_bad.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / min_const_fn / min_const_fn_unsafe_bad.stderr
1 error[E0658]: dereferencing raw pointers in constant functions is unstable
2 --> $DIR/min_const_fn_unsafe_bad.rs:1:77
3 |
4 LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { &*x } }
5 | ^^^
6 |
7 = note: see issue #51911 <https://github.com/rust-lang/rust/issues/51911> for more information
8 = help: add `#![feature(const_raw_ptr_deref)]` to the crate attributes to enable
9
10 error[E0658]: dereferencing raw pointers in constant functions is unstable
11 --> $DIR/min_const_fn_unsafe_bad.rs:4:70
12 |
13 LL | const unsafe fn bad_const_unsafe_deref_raw(x: *mut usize) -> usize { *x }
14 | ^^
15 |
16 = note: see issue #51911 <https://github.com/rust-lang/rust/issues/51911> for more information
17 = help: add `#![feature(const_raw_ptr_deref)]` to the crate attributes to enable
18
19 error[E0658]: dereferencing raw pointers in constant functions is unstable
20 --> $DIR/min_const_fn_unsafe_bad.rs:7:83
21 |
22 LL | const unsafe fn bad_const_unsafe_deref_raw_ref(x: *mut usize) -> &'static usize { &*x }
23 | ^^^
24 |
25 = note: see issue #51911 <https://github.com/rust-lang/rust/issues/51911> for more information
26 = help: add `#![feature(const_raw_ptr_deref)]` to the crate attributes to enable
27
28 error[E0658]: unions in const fn are unstable
29 --> $DIR/min_const_fn_unsafe_bad.rs:14:5
30 |
31 LL | Foo { x: () }.y
32 | ^^^^^^^^^^^^^^^
33 |
34 = note: see issue #51909 <https://github.com/rust-lang/rust/issues/51909> for more information
35 = help: add `#![feature(const_fn_union)]` to the crate attributes to enable
36
37 error: aborting due to 4 previous errors
38
39 For more information about this error, try `rustc --explain E0658`.