]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / gat-dont-ice-on-absent-feature.rs
1 // rust-lang/rust#60654: Do not ICE on an attempt to use GATs that is
2 // missing the feature gate.
3
4 struct Foo;
5
6 impl Iterator for Foo {
7     type Item<'b> = &'b Foo;
8     //~^ ERROR generic associated types are unstable [E0658]
9     //~| ERROR lifetime parameters or bounds on type `Item` do not match the trait declaration
10
11     fn next(&mut self) -> Option<Self::Item> {
12         None
13     }
14 }
15
16 fn main() { }