Change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at 'range end index 1 out of range for slice of length 0'', 'thread 'rustc' panicked at 'range end index 1 out of range for slice of length 0'' File: --auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- query stack: [typeck] type-checking [analysis] running analysis passes on this crate --
Regression in nightly-2022-06-04 commit[0] 2022-06-02: Auto merge of - nnethercote:lazify-SourceFile-lines, r=Mark-Simulacrum commit[1] 2022-06-02: Auto merge of - spastorino:simplify-universal-impl-trait-lowering, r=cjgillot commit[2] 2022-06-03: Auto merge of - matthiaskrgr:rollup-5cfxc85, r=matthiaskrgr commit[3] 2022-06-03: Auto merge of - c410-f3r:z-errors, r=petrochenkov commit[4] 2022-06-03: Auto merge of - cjgillot:remove-label-lt-shadow, r=petrochenkov commit[5] 2022-06-03: Auto merge of - Dylan-DPC:rollup-nswmgmx, r=Dylan-DPC commit[6] 2022-06-03: Auto merge of - lcnr:path-generics-diagnostics, r=estebank commit[7] 2022-06-03: Auto merge of - Dylan-DPC:rollup-2yxo7ce, r=Dylan-DPC commit[8] 2022-06-03: Auto merge of - bjorn3:serde_json, r=wesleywiser commit[9] 2022-06-03: Auto merge of - notriddle:notriddle/human-readable-signals, r=yaahc ERROR: no CI builds available between and within last 167 days
It appears I'm hitting this one as well. Tacking this on for good measure. <details</details
Looks like it was originally introduced by (and was renamed later to without any change in functionality). I'd PR a fix but I'm not entirely sure how it's supposed to work. Is this masking a deeper bug or can one simply do something like: Derp, missed there was a PR. indeed fixes this on my end. Thanks for the quick fix on this!

Discussion:
// which makes this somewhat difficult and prevents us from just // using `self.path_inferred_arg_iter` here. hir::ExprKind::Struct(&hir::QPath::Resolved(_self_ty, path), _, _) <del> // FIXME(TaKO8Ki): Ideally we should support this. For that // we have to map back from the self type to the // type alias though. That's difficult. </del> <ins> // FIXME(TaKO8Ki): Ideally we should support other kinds, // such as `TyAlias` or `AssocTy`. For that we have to map // back from the self type to the type alias though. That's difficult. </ins> // // See the `need_type_info/issue-103053.rs` test for // a example. <del> if !matches!(path.res, Res::Def(DefKind::TyAlias, _)) => { </del> <ins> if matches!(path.res, Res::Def(DefKind::Struct | DefKind::Enum | DefKind::Union, _)) => { </ins> if let Some(ty) = self.opt_node_type(expr.hir_id) && let ty::Adt(_, args) = ty.kind() {

<del> //@ known-bug: #121613 fn main() { // destructure through a qualified path let <Foo as A>::Assoc { br } = StructStruct { br: 2 }; //~^ ERROR usage of qualified paths in this context is experimental let _ = <Foo as A>::Assoc { br: 2 }; //~^ ERROR usage of qualified paths in this context is experimental let <E>::V(..) = E::V(|a, b| a.cmp(b)); //~^ ERROR usage of qualified paths in this context is experimental } struct StructStruct { br: i8, } struct Foo; trait A { type Assoc; } impl A for Foo { type Assoc = StructStruct; } enum E { V(u8) } </del>

<del> //@ known-bug: #121613 fn main() { let _ = <Foo as A>::Assoc { br: 2 }; let <E>::V(..) = E::V(|a, b| a.cmp(b)); } struct StructStruct { br: i8, } struct Foo; trait A { type Assoc; } impl A for Foo { type Assoc = StructStruct; } enum E { V(u8), } </del>

<ins> // issue#121613 #![feature(more_qualified_paths)] struct S {} struct Foo; trait A { type Assoc; } impl A for Foo { type Assoc = S; } fn f() {} fn main() { <Foo as A>::Assoc {}; f(|a, b| a.cmp(b)); //~^ ERROR: type annotations needed //~| ERROR: this function takes 0 arguments but 1 argument was supplied } </ins>

<ins> error[E0282]: type annotations needed --> $DIR/incompat-call-after-qualified-path-0.rs:21:6 | LL |   f(|a, b| a.cmp(b)); |      ^     - type must be known at this point | help: consider giving this closure parameter an explicit type | LL |   f(|a: /* Type */, b| a.cmp(b)); |       ++++++++++++ error[E0061]: this function takes 0 arguments but 1 argument was supplied --> $DIR/incompat-call-after-qualified-path-0.rs:21:3 | LL |   f(|a, b| a.cmp(b)); |   ^ --------------- unexpected argument | note: function defined here --> $DIR/incompat-call-after-qualified-path-0.rs:17:4 | LL | fn f() {} |    ^ help: remove the extra argument | LL -   f(|a, b| a.cmp(b)); LL +   f(); | error: aborting due to 2 previous errors Some errors have detailed explanations: E0061, E0282. For more information about an error, try `rustc --explain E0061`. </ins>

<ins> // issue#121613 #![feature(more_qualified_paths)] struct S<T> { a: T } struct Foo; trait A { type Assoc<T>; } impl A for Foo { type Assoc<T> = S<T>; } fn f() {} fn main() { <Foo as A>::Assoc::<i32> { a: 1 }; f(|a, b| a.cmp(b)); //~^ ERROR: type annotations needed //~| ERROR: this function takes 0 arguments but 1 argument was supplied } </ins>

<ins> error[E0282]: type annotations needed --> $DIR/incompat-call-after-qualified-path-1.rs:25:6 | LL |   f(|a, b| a.cmp(b)); |      ^     - type must be known at this point | help: consider giving this closure parameter an explicit type | LL |   f(|a: /* Type */, b| a.cmp(b)); |       ++++++++++++ error[E0061]: this function takes 0 arguments but 1 argument was supplied --> $DIR/incompat-call-after-qualified-path-1.rs:25:3 | LL |   f(|a, b| a.cmp(b)); |   ^ --------------- unexpected argument | note: function defined here --> $DIR/incompat-call-after-qualified-path-1.rs:19:4 | LL | fn f() {} |    ^ help: remove the extra argument | LL -   f(|a, b| a.cmp(b)); LL +   f(); | error: aborting due to 2 previous errors Some errors have detailed explanations: E0061, E0282. For more information about an error, try `rustc --explain E0061`. </ins>