rust/tests/ui/traits/non_lifetime_binders/on-ptr.rs

14 lines
305 B
Rust
Raw Normal View History

// Tests to make sure that we reject polymorphic fn ptrs.
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete
fn foo() -> for<T> fn(T) {
//~^ ERROR late-bound type parameter not allowed on function pointer types
todo!()
}
fn main() {
foo()(1i32);
}