Skip to content
Permalink
Browse files

Regression test for issue #60654.

  • Loading branch information...
pnkfelix committed May 24, 2019
1 parent 8e4132a commit c235ba4d0b7b8ff74b0fe020df6625ec9ce74ceb
@@ -0,0 +1,14 @@
// 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]

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

fn main() { }
@@ -0,0 +1,12 @@
error[E0658]: generic associated types are unstable
--> $DIR/gat-dont-ice-on-absent-feature.rs:7:5
|
LL | type Item<'b> = &'b Foo;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/44265
= help: add #![feature(generic_associated_types)] to the crate attributes to enable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.

0 comments on commit c235ba4

Please sign in to comment.
You can’t perform that action at this time.