summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-99875.rs
blob: cf73fd8d31fbbca83353df292b81db2da6449cd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
}