diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs b/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs new file mode 100644 index 000000000..e8fc47d2a --- /dev/null +++ b/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs @@ -0,0 +1,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() { } |