Change:
First time filing a bug report, apologies if i missed anything or if this is a duplicate. Encountered this bug while writing some non-sensical associated function types. Searched around for any similar issues and the closest i found was , seems closely related? Minimal example: Playground link: The ICE happens on all channels it seems
Yes, I think so too. The snippet is rejected as expected on 1.42 but ICE occurs instead since 1.43.
Assigning as and removing .

Discussion:
placeholder_type_error(tcx, None, &[], visitor.0, false); } <del> hir::TraitItemKind::Type(_, None) => {} </del> <ins> hir::TraitItemKind::Type(_, None) => { // #74612: Visit and try to find bad placeholders // even if there is no concrete type. let mut visitor = PlaceholderHirTyCollector::default(); visitor.visit_trait_item(trait_item); placeholder_type_error(tcx, None, &[], visitor.0, false); } </ins> }; tcx.ensure().predicates_of(def_id);

const D: _ = 42; //~^ ERROR the type placeholder `_` is not allowed within types on item signatures // type E: _; // FIXME: make the parser propagate the existence of `B` <ins> type F: std::ops::Fn(_); //~^ ERROR the type placeholder `_` is not allowed within types on item signatures </ins> } impl Qux for Struct { type A = _;

|                   ^ expected identifier, found reserved identifier error: associated constant in `impl` without body <del> --> $DIR/typeck_type_placeholder_item.rs:203:5 </del> <ins> --> $DIR/typeck_type_placeholder_item.rs:205:5 </ins> | LL |     const C: _; |     ^^^^^^^^^^-

|              help: replace `_` with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures <ins> --> $DIR/typeck_type_placeholder_item.rs:197:26 | LL |     type F: std::ops::Fn(_); |                          ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures </ins> --> $DIR/typeck_type_placeholder_item.rs:40:24 | LL |     fn test9(&self) -> _ { () }

|                            help: replace with the correct return type: `main::FnTest9` error[E0121]: the type placeholder `_` is not allowed within types on item signatures <del> --> $DIR/typeck_type_placeholder_item.rs:199:14 </del> <ins> --> $DIR/typeck_type_placeholder_item.rs:201:14 </ins> | LL |     type A = _; |              ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures <del> --> $DIR/typeck_type_placeholder_item.rs:201:14 </del> <ins> --> $DIR/typeck_type_placeholder_item.rs:203:14 </ins> | LL |     type B = _; |              ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures <del> --> $DIR/typeck_type_placeholder_item.rs:203:14 </del> <ins> --> $DIR/typeck_type_placeholder_item.rs:205:14 </ins> | LL |     const C: _; |              ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures <del> --> $DIR/typeck_type_placeholder_item.rs:206:14 </del> <ins> --> $DIR/typeck_type_placeholder_item.rs:208:14 </ins> | LL |     const D: _ = 42; |              ^

|              not allowed in type signatures |              help: replace `_` with the correct type: `i32` <del> error: aborting due to 66 previous errors </del> <ins> error: aborting due to 67 previous errors </ins> Some errors have detailed explanations: E0121, E0282, E0403. For more information about an error, try `rustc --explain E0121`.