summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs
blob: e8fc47d2a59f9d01edacbac1f11235e600e5b5b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// rust-lang/rust#60654: Do not ICE on an attempt to use GATs that is
// missing the feature gate.

struct Foo;

impl Iterator for Foo {
    type Item<'b> = &'b Foo;
    //~^ ERROR generic associated types are unstable [E0658]
    //~| ERROR lifetime parameters or bounds on type `Item` do not match the trait declaration

    fn next(&mut self) -> Option<Self::Item> {
        None
    }
}

fn main() { }