File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/test/ui/consts/min_const_fn Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change
1
+ // gate-test-const_fn_fn_ptr_basics
2
+
1
3
struct HasPtr {
2
4
field : fn ( ) ,
3
5
}
Original file line number Diff line number Diff line change 1
1
error[E0658]: function pointers cannot appear in constant functions
2
- --> $DIR/min_const_fn_fn_ptr.rs:11 :5
2
+ --> $DIR/min_const_fn_fn_ptr.rs:13 :5
3
3
|
4
4
LL | x.0.field;
5
5
| ^^^^^^^^^
@@ -8,7 +8,7 @@ LL | x.0.field;
8
8
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
9
9
10
10
error[E0658]: function pointers cannot appear in constant functions
11
- --> $DIR/min_const_fn_fn_ptr.rs:14 :59
11
+ --> $DIR/min_const_fn_fn_ptr.rs:16 :59
12
12
|
13
13
LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasPtr { field }) }
14
14
| ^^^^^
You can’t perform that action at this time.
0 commit comments