11error[E0658]: dereferencing raw pointers in constant functions is unstable (see issue #51911)
2- --> $DIR/min_const_fn_unsafe.rs:29:51
2+ --> $DIR/min_const_fn_unsafe.rs:31:59
33 |
4- LL | const unsafe fn foo30_3 (x: *mut usize) -> usize { *x } //~ ERROR not allowed in const fn
5- | ^^
4+ LL | const unsafe fn deref_forbidden (x: *mut usize) -> usize { *x } //~ ERROR not allowed in const fn
5+ | ^^
66 |
77 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable
88
99error[E0658]: unions in const fn are unstable (see issue #51909)
10- --> $DIR/min_const_fn_unsafe.rs:36 :5
10+ --> $DIR/min_const_fn_unsafe.rs:38 :5
1111 |
1212LL | Foo { x: () }.y //~ ERROR not allowed in const fn
1313 | ^^^^^^^^^^^^^^^
@@ -17,37 +17,37 @@ LL | Foo { x: () }.y //~ ERROR not allowed in const fn
1717error[E0658]: calls to `const unsafe fn` in const fns are unstable (see issue #55607)
1818 --> $DIR/min_const_fn_unsafe.rs:21:14
1919 |
20- LL | unsafe { foo4 () } //~ ERROR calls to `const unsafe fn` in const fns are unstable
21- | ^^^^^^
20+ LL | unsafe { ret_i32_no_unsafe () } //~ ERROR calls to `const unsafe fn` in const fns are unstable
21+ | ^^^^^^^^^^^^^^^^^^^
2222 |
2323 = help: add #![feature(min_const_unsafe_fn)] to the crate attributes to enable
2424
2525error[E0658]: calls to `const unsafe fn` in const fns are unstable (see issue #55607)
2626 --> $DIR/min_const_fn_unsafe.rs:24:14
2727 |
28- LL | unsafe { foo5 ::<String>() } //~ ERROR calls to `const unsafe fn` in const fns are unstable
29- | ^^^^^^^^^^^^^^^^
28+ LL | unsafe { ret_null_ptr_no_unsafe ::<String>() }
29+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3030 |
3131 = help: add #![feature(min_const_unsafe_fn)] to the crate attributes to enable
3232
3333error[E0658]: calls to `const unsafe fn` in const fns are unstable (see issue #55607)
34- --> $DIR/min_const_fn_unsafe.rs:27 :14
34+ --> $DIR/min_const_fn_unsafe.rs:28 :14
3535 |
36- LL | unsafe { foo6 ::<Vec<std::cell::Cell<u32>>>() } //~ ERROR calls to `const unsafe fn` in const fns
37- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+ LL | unsafe { ret_null_mut_ptr_no_unsafe ::<Vec<std::cell::Cell<u32>>>() }
37+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3838 |
3939 = help: add #![feature(min_const_unsafe_fn)] to the crate attributes to enable
4040
4141error: dereference of raw pointer is unsafe and unsafe operations are not allowed in const fn
42- --> $DIR/min_const_fn_unsafe.rs:29:51
42+ --> $DIR/min_const_fn_unsafe.rs:31:59
4343 |
44- LL | const unsafe fn foo30_3 (x: *mut usize) -> usize { *x } //~ ERROR not allowed in const fn
45- | ^^ dereference of raw pointer
44+ LL | const unsafe fn deref_forbidden (x: *mut usize) -> usize { *x } //~ ERROR not allowed in const fn
45+ | ^^ dereference of raw pointer
4646 |
4747 = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
4848
4949error: access to union field is unsafe and unsafe operations are not allowed in const fn
50- --> $DIR/min_const_fn_unsafe.rs:36 :5
50+ --> $DIR/min_const_fn_unsafe.rs:38 :5
5151 |
5252LL | Foo { x: () }.y //~ ERROR not allowed in const fn
5353 | ^^^^^^^^^^^^^^^ access to union field
0 commit comments