blob: 6b87ad86d4bc2a2c53c8372e08e1fd8cf106ef21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#![feature(generic_const_exprs, unsized_const_params)]
#![allow(incomplete_features)]
// Regression test for 128232
fn function() {}
struct Wrapper<const F: fn()>;
//~^ ERROR: using function pointers as const generic parameters is forbidden
impl Wrapper<{ bar() }> {
//~^ ERROR: cannot find function `bar` in this scope
fn call() {}
}
fn main() {
Wrapper::<function>::call;
//~^ ERROR: the function or associated item `call` exists for struct `Wrapper<function>`,
}
|