mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Regression test for issue #60654.
This commit is contained in:
parent
8e4132a55c
commit
c235ba4d0b
@ -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`.
|
Loading…
Reference in New Issue
Block a user