]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / issue-68645-codegen-fulfillment.rs
CommitLineData
f035d41b
XL
1// Regression test for #68645
2
3#![feature(generic_associated_types)]
4//~^ WARNING the feature `generic_associated_types` is incomplete and may not
5
6trait Fun {
7 type F<'a>: Fn() -> u32;
8
9 fn callme<'a>(f: Self::F<'a>) -> u32 {
10 f()
11 }
12}
13
14impl<T> Fun for T {
15 type F<'a> = Self;
1b1a35ee 16 //~^ ERROR expected a `Fn<()>` closure, found `T`
f035d41b
XL
17}
18
19fn main() {
20 <&dyn Iterator<Item = u8>>::callme(&std::iter::once(1));
21}