mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
17 lines
311 B
Rust
17 lines
311 B
Rust
struct Argument;
|
|
struct Return;
|
|
|
|
fn function(_: Argument) -> Return { todo!() }
|
|
|
|
trait Trait {}
|
|
impl Trait for fn(Argument) -> Return {}
|
|
|
|
fn takes(_: impl Trait) {}
|
|
|
|
fn main() {
|
|
takes(function);
|
|
//~^ ERROR the trait bound
|
|
takes(|_: Argument| -> Return { todo!() });
|
|
//~^ ERROR the trait bound
|
|
}
|