Skip to content

Commit

Permalink
Add test for issue-71611
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jun 27, 2020
1 parent 99884bd commit 7125ce7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/const-generics/issues/issue-71611.rs
@@ -0,0 +1,9 @@
#![feature(const_generics)]
#![allow(incomplete_features)]

fn func<A, const F: fn(inner: A)>(outer: A) {
//~^ ERROR: using function pointers as const generic parameters is forbidden
F(outer);
}

fn main() {}
8 changes: 8 additions & 0 deletions src/test/ui/const-generics/issues/issue-71611.stderr
@@ -0,0 +1,8 @@
error: using function pointers as const generic parameters is forbidden
--> $DIR/issue-71611.rs:4:21
|
LL | fn func<A, const F: fn(inner: A)>(outer: A) {
| ^^^^^^^^^^^^

error: aborting due to previous error

0 comments on commit 7125ce7

Please sign in to comment.