Files
rust/src/test/ui/const-generics/issues/issue-71611.rs

15 lines
602 B
Rust
Raw Normal View History

// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]
2020-06-27 20:34:16 +09:00
fn func<A, const F: fn(inner: A)>(outer: A) {
//[full]~^ ERROR: using function pointers as const generic parameters is forbidden
//[full]~| ERROR: the type of const parameters must not depend on other generic parameters
//[min]~^^^ ERROR: using function pointers as const generic parameters is forbidden
//[min]~| ERROR: the type of const parameters must not depend on other generic parameters
2020-06-27 20:34:16 +09:00
F(outer);
}
fn main() {}