diff options
| author | bors <bors@rust-lang.org> | 2024-05-07 20:01:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-07 20:01:18 +0000 |
| commit | faefc618cf48bd794cbc808448df1bf3f59f36af (patch) | |
| tree | 589ee8f0dc044a65ebaff64bfcf463ae711dae1b /compiler/rustc_codegen_llvm/src | |
| parent | b923ea4924fede68af127ac1857dcb0382e4caf9 (diff) | |
| parent | 446f78d05192ada54441f0a4ff237064d086e0e8 (diff) | |
| download | rust-faefc618cf48bd794cbc808448df1bf3f59f36af.tar.gz rust-faefc618cf48bd794cbc808448df1bf3f59f36af.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
