mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
14 lines
181 B
Rust
14 lines
181 B
Rust
trait Trait {
|
|
fn method(&self) {}
|
|
}
|
|
|
|
impl<F: Fn() -> T, T> Trait for F {}
|
|
|
|
impl Trait for f32 {}
|
|
|
|
fn main() {
|
|
|| 10. .method();
|
|
|| .. .method();
|
|
|| 1.. .method();
|
|
}
|