Change:
Compiling this code results in no output by . But exits with 101 and does not produce any artifacts. () The error happens with: , , and -
If I set breakpoints on - It hits the first two but not the third, seemingly pointing to returning an .
The silent exit is a regression. From godbolt, #### 1.23.0 exit code = 101 #### 1.24.0–1.25.0 exit code = 101 #### 1.26.0–1.28.0(beta) No message, exit code = 101 #### 1.29.0(nightly) No message, exit code = 1
cc -- it'd be good to find out why we stopped providing any output at all here
I'm worried it might be one of my parser changes to provide better diagnostics... I would probably check for any odd looking .
It's not the parsing itself, it's that in 1.24 the feature was introduced:
do you think you see what the problem is?
Calling P-high but we don't yet have an obvious assignee. Still, seems bad that there is no diagnostic output at all! Not a good look.
The core issue is reported in However, the example here also demonstrates that clauses aren't being feature gated properly.
I've made to address the surface problem, which is that you can trigger this on stable, without declaring the feature. I thought it was better to fix that part of the problem straight away.
Narrowing it down a little more: is at this point when the clauses are defined, so something's going wrong before that point.

Discussion:
"existential types are unstable" ); } <del> ast::ImplItemKind::Type(_) if !ii.generics.params.is_empty() => { gate_feature_post!(&self, generic_associated_types, ii.span, "generic associated types are unstable"); </del> <ins> ast::ImplItemKind::Type(_) => { if !ii.generics.params.is_empty() { gate_feature_post!(&self, generic_associated_types, ii.span, "generic associated types are unstable"); } if !ii.generics.where_clause.predicates.is_empty() { gate_feature_post!(&self, generic_associated_types, ii.span, "where clauses on associated types are unstable"); } </ins> } _ => {} }

} struct Foo; impl PointerFamily<u32> for Foo { type Pointer<usize> = Box<usize>; //~^ ERROR generic associated types are unstable

//~^ ERROR where clauses on associated types are unstable } <ins> impl Bar for Foo { type Assoc where Self: Sized = Foo; //~^ ERROR where clauses on associated types are unstable } </ins> fn main() {}

= help: add #![feature(generic_associated_types)] to the crate attributes to enable error[E0658]: generic associated types are unstable (see issue #44265) <del> --> $DIR/feature-gate-generic_associated_types.rs:23:5 </del> <ins> --> $DIR/feature-gate-generic_associated_types.rs:24:5 </ins> | LL |     type Pointer<usize> = Box<usize>; |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= help: add #![feature(generic_associated_types)] to the crate attributes to enable error[E0658]: generic associated types are unstable (see issue #44265) <del> --> $DIR/feature-gate-generic_associated_types.rs:25:5 </del> <ins> --> $DIR/feature-gate-generic_associated_types.rs:26:5 </ins> | LL |     type Pointer2<u32> = Box<u32>; |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= help: add #![feature(generic_associated_types)] to the crate attributes to enable error[E0658]: where clauses on associated types are unstable (see issue #44265) <del> --> $DIR/feature-gate-generic_associated_types.rs:30:5 </del> <ins> --> $DIR/feature-gate-generic_associated_types.rs:31:5 </ins> | LL |     type Assoc where Self: Sized; |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable <del> error: aborting due to 6 previous errors </del> <ins> error[E0658]: where clauses on associated types are unstable (see issue #44265) --> $DIR/feature-gate-generic_associated_types.rs:36:5 | LL |     type Assoc where Self: Sized = Foo; |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable error: aborting due to 7 previous errors </ins> For more information about this error, try `rustc --explain E0658`.