Change:
<del> //@ known-bug: #121957 #![feature(const_trait_impl, effects)] #[const_trait] trait Main { fn compute<T: ~const Aux>() -> u32; } impl const Main for () { fn compute<'x, 'y, 'z: 'x>() -> u32 {} } #[const_trait] trait Aux {} impl const Aux for () {} fn main() { const _: u32 = <()>::compute::<()>(); } </del>

Discussion:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: Unexpected parameter Type(()) when instantiating in region 'x (index=1)', 'error: internal compiler error: Unexpected parameter Type(()) when instantiating in region 'x (index=1)' 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: [fnabiofinstance] computing call ABI of [evaltoallocationraw] const-evaluating + checking [evaltoconstvalueraw] simplifying constant for the type system [analysis] running analysis passes on this crate --
Regression in cc
closing for whch has more up to date stacktrace :sweat_smile:

<!-- [31mICE[0m: Rustc '-Zpolymorphize=on --edition=2021 -Zinline-mir=yes -ooutputfile -Zdump-mir-dir=dir' 'error: internal compiler error: type parameter (impl AsRef<Path//0) out of range when instantiating, args=[]', 'error: internal compiler error: type parameter (impl AsRef<Path//0) out of range when instantiating, args=[]' File: --It appears that generic crash exprs are not even required :explodinghead: snippet: 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: [optimizedmir] optimizing MIR for [unusedgenericparams] determining which generic parameters are unused by [analysis] running analysis passes on this crate --
cc
sassy :P lol
probably the same issue:
Backtrace update rustc 1.80.0-nightly ( 2024-05-29) <details<summary<strongBacktrace</strong</summary<p</p</details- ICE location is moved from

<details<summaryfull stderr (including backtrace)</summary</details
Minimized:
update:

<!-- [31mICE[0m: Rustc '-Zpolymorphize=on -Zinline-mir=yes -ooutputfile -Zdump-mir-dir=dir' 'error: internal compiler error: expected type for (W//1) but found Lifetime(ReErased) when substituting, args=[(), ReErased, (), T/]', 'error: internal compiler error: expected type for (W//1) but found Lifetime(ReErased) when substituting, args=[(), ReErased, (), T/]' File: --auto-reduced (treereduce-rust): &lt;details&lt;summary&lt;strongoriginal code&lt;/strong&lt;/summary&lt;poriginal: </p</detailsVersion information Command: &lt;!-- Include a backtrace in the code block by setting in your environment. E.g. . --&lt;details&lt;summary&lt;strongProgram output&lt;/strong&lt;/summary&lt;p&lt;/p&lt;/details&lt;!-- query stack: [mircallgraphreachable] computing if (transitively) calls [optimizedmir] optimizing MIR for [unusedgenericparams] determining which generic parameters are unused by [analysis] running analysis passes on this crate --
&lt;!-- ICE: Rustc '-Zpolymorphize=on -Zinline-mir=yes -ooutputfile -Zdump-mir-dir=dir' 'error: internal compiler error: expected type for (K//0) but found Lifetime('{erased}) when instantiating, args=['{erased}, ()]', 'error: internal compiler error: expected type for (K//0) but found Lifetime('{erased}) when instantiating, args=['{erased}, ()]' 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: [optimizedmir] optimizing MIR for [unusedgenericparams] determining which generic parameters are unused by [analysis] running analysis passes on this crate --