Change:
<ins> warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/bad-suggestion-on-missing-assoc.rs:1:12 | LL | #![feature(generic_const_exprs)] |            ^^^^^^^^^^^^^^^^^^^ | = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information = note: `#[warn(incomplete_features)]` on by default warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/bad-suggestion-on-missing-assoc.rs:3:12 | LL | #![feature(non_lifetime_binders)] |            ^^^^^^^^^^^^^^^^^^^^ | = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information error: defaults for generic parameters are not allowed in `for<...>` binders --> $DIR/bad-suggestion-on-missing-assoc.rs:20:9 | LL |     for<const N: u8 = { T::A }> T: TraitA<AsA = impl TraitB<AsB = impl TraitC>>, |         ^^^^^^^^^^^^^^^^^^^^^^ error[E0562]: `impl Trait` is not allowed in bounds --> $DIR/bad-suggestion-on-missing-assoc.rs:20:49 | LL |     for<const N: u8 = { T::A }> T: TraitA<AsA = impl TraitB<AsB = impl TraitC>>, |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `impl Trait` is only allowed in arguments and return types of functions and methods error: aborting due to 2 previous errors; 2 warnings emitted For more information about this error, try `rustc --explain E0562`. </ins>

Discussion:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at 'assertion failed: expect 1 RPITITs in call to '', 'thread 'rustc' panicked at 'assertion failed: expect 1 RPITITs in call to '' File: --auto-reduced (treereduce-rust): original: Version information ` <!-- query stack: [collectreturnpositionimpltraitintraittys] comparing an impl and trait method signature, inferring any hidden types in the process [typeof] computing type of [checkmodimplwf] checking that impls are well-formed in top-level module [analysis] running analysis passes on this crate --
Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details

<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Regression in nightly-2023-05-04 commit[0] 2023-05-02: Auto merge of - compiler-errors:attr-query-no-caching, r=cjgillot commit[1] 2023-05-02: Auto merge of - fortanix:raoul/bugfixlibtestjson_synchronization, r=pietroalbini commit[2] 2023-05-03: Auto merge of - nnethercote:restrict-From-for-Diagnostics, r=davidtwco commit[3] 2023-05-03: Auto merge of - weihanglo:update-cargo, r=weihanglo commit[4] 2023-05-03: Auto merge of - jdno:reduce-builder-sizes, r=pietroalbini commit[5] 2023-05-03: Auto merge of - cuviper:ct-ng-1.25, r=pietroalbini commit[6] 2023-05-03: Auto merge of - Dylan-DPC:rollup-0pq0hh3, r=Dylan-DPC
Minimized:
Above example bisects to :thinking: