mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
17 lines
319 B
Rust
17 lines
319 B
Rust
trait Foo {
|
|
const ASSOC: bool = true;
|
|
}
|
|
impl<T> Foo for fn(T) {}
|
|
|
|
fn foo(_x: i32) {}
|
|
|
|
fn impls_foo<T: Foo>(_x: T) {}
|
|
|
|
fn main() {
|
|
impls_foo(foo as fn(i32));
|
|
|
|
<fn(&u8) as Foo>::ASSOC;
|
|
//~^ ERROR implementation of `Foo` is not general enough
|
|
//~| ERROR implementation of `Foo` is not general enough
|
|
}
|