]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-99875.rs
Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgr
[rust.git] / src / test / ui / issues / issue-99875.rs
1 struct Argument;
2 struct Return;
3
4 fn function(_: Argument) -> Return { todo!() }
5
6 trait Trait {}
7 impl Trait for fn(Argument) -> Return {}
8
9 fn takes(_: impl Trait) {}
10
11 fn main() {
12     takes(function);
13     //~^ ERROR the trait bound
14     takes(|_: Argument| -> Return { todo!() });
15     //~^ ERROR the trait bound
16 }