Mark min_const_fn_fn_ptr test as gate test

This commit is contained in:
Dylan MacKenzie 2020-09-24 16:49:12 -07:00
parent 54d3329c95
commit 368502cc1d
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,5 @@
// gate-test-const_fn_fn_ptr_basics
struct HasPtr {
field: fn(),
}

View File

@ -1,5 +1,5 @@
error[E0658]: function pointers cannot appear in constant functions
--> $DIR/min_const_fn_fn_ptr.rs:11:5
--> $DIR/min_const_fn_fn_ptr.rs:13:5
|
LL | x.0.field;
| ^^^^^^^^^
@ -8,7 +8,7 @@ LL | x.0.field;
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
error[E0658]: function pointers cannot appear in constant functions
--> $DIR/min_const_fn_fn_ptr.rs:14:59
--> $DIR/min_const_fn_fn_ptr.rs:16:59
|
LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasPtr { field }) }
| ^^^^^