Change:
The following minimal example causes an internal compiler error. Error in question: rustc version: This error was encountered on stable, but I can confirm that it also occurs on the latest nightly ().
Hasn't the feature gate issue been fixed? :|
I've removed the nomination and this to the tracking issue for GATs . The current impl is highly incomplete and ICEs are, sadly, expected. Also, I verified that a feature gate is indeed required.
triage: P-medium
I don't know if I get you wrong, but the example above ICEs on stable, beta and nightly without feature gate
oops, looks like I accidentally left the feature gate in there when I tried it out, but it produces the same ICE when it is omitted as well.
No, niko edited your question. ping I think you got something wrong there. Can you please clarify that?
Oh, I guess I was indeed incorreect. I tried it on play but didn't notice that, after the "correct" error, it goes on to print an ICE.
What about adding the I-nominated tag again?
I'm not sure why we would nominate this for discussion. Yes, it is an ICE (and an ICE that occurs without the user adding a feature gate), but the message pretty clearly states that you're using an unstable feature. It would be great to fix it so that it issues the error diagnostic without ICEing, but I wouldn't re-prioritize that work above P-medium.
assigning to self since its a clear annoyance
triage: P-medium. (dupe of )
(the remaining bug, when the feature gate is enabled, is tracked in issue )

Discussion:
// The lifetime was defined on node that doesn't own a body, // which in practice can only mean a trait or an impl, that // is the parent of a method, and that is enforced below. <del> assert_eq!(Some(param_owner_id), self.root_parent, "free_scope: {:?} not recognized by the  region scope tree for {:?} / {:?}", param_owner, self.root_parent.map(|id| tcx.hir().local_def_id_from_hir_id(id)), self.root_body.map(|hir_id| DefId::local(hir_id.owner))); </del> <ins> if Some(param_owner_id) != self.root_parent { tcx.sess.delay_span_bug( DUMMY_SP, &format!("free_scope: {:?} not recognized by the  region scope tree for {:?} / {:?}", param_owner, self.root_parent.map(|id| tcx.hir().local_def_id_from_hir_id(id)), self.root_body.map(|hir_id| DefId::local(hir_id.owner)))); } </ins> // The trait/impl lifetime is in scope for the method's body. self.root_body.unwrap().local_id

// the specialized routine `ty::replace_late_regions()`. match *r { ty::ReEarlyBound(data) => { <del> let r = self.substs.get(data.index as usize).map(|k| k.unpack()); match r { </del> <ins> let rk = self.substs.get(data.index as usize).map(|k| k.unpack()); match rk { </ins> Some(UnpackedKind::Lifetime(lt)) => { self.shift_region_through_binders(lt) } _ => { let span = self.span.unwrap_or(DUMMY_SP); <del> span_bug!( span, </del> <ins> let msg = format!( </ins> "Region parameter out of range  when substituting in region {} (root type={:?})  (index={})", data.name, self.root_ty, data.index); <ins> self.tcx.sess.delay_span_bug(span, &msg); r </ins> } } }

<ins> // 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() { } </ins>

<ins> 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`. </ins>