]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-95305.rs
Rollup merge of #97712 - RalfJung:untyped, r=scottmcm
[rust.git] / src / test / ui / generic-associated-types / issue-95305.rs
1 // It's not yet clear how '_ and GATs should interact.
2 // Forbid it for now but proper support might be added
3 // at some point in the future.
4
5 #![feature(generic_associated_types)]
6
7 trait Foo {
8     type Item<'a>;
9 }
10
11 fn foo(x: &impl Foo<Item<'_> = u32>) { }
12                        //~^ ERROR `'_` cannot be used here [E0637]
13
14 fn bar(x: &impl for<'a> Foo<Item<'a> = &'_ u32>) { }
15                                       //~^ ERROR missing lifetime specifier
16
17 fn main() {}