Skip to content

Commit fd49caa

Browse files
committed
Auto merge of #124219 - gurry:122989-ice-unexpected-anon-const, r=compiler-errors
Do not ICE on `AnonConst`s in `diagnostic_hir_wf_check` Fixes #122989 Below is the snippet from #122989 that ICEs: ```rust trait Traitor<const N: N<2> = 1, const N: N<2> = N> { fn N(&N) -> N<2> { M } } trait N<const N: Traitor<2> = 12> {} ``` The `AnonConst` that triggers the ICE is the `2` in the param `const N: N<2> = 1`. The currently existing code in `diagnostic_hir_wf_check` deals only with `AnonConst`s that are default values of some param, but the `2` is not a default value. It is just an `AnonConst` HIR node inside a `TraitRef` HIR node corresponding to `N<2>`. Therefore the existing code cannot handle it and this PR ensures that it does.
2 parents 0167e0b + 39404d3 commit fd49caa

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)