about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-07-28 18:28:23 +0900
committerGitHub <noreply@github.com>2021-07-28 18:28:23 +0900
commit7985e4c7c3fb9c1a4f09f1c24949f21e65ceee37 (patch)
treebd3d35943e13d2cfcf54fdbf688dc2c9cb3f4aad /compiler/rustc_mir/src/transform/coverage/debug.rs
parent4ae529688a5166f7a7cc5366b95599893e232c91 (diff)
parentdbd0fd2c2a6c0c5ea649dfb4d2a1b3d09e725ca0 (diff)
downloadrust-7985e4c7c3fb9c1a4f09f1c24949f21e65ceee37.tar.gz
rust-7985e4c7c3fb9c1a4f09f1c24949f21e65ceee37.zip
Rollup merge of #87524 - FabianWolff:issue-87495, r=Aaron1011
Fix ICE in `diagnostic_hir_wf_check`

Fixes #87495. The [documentation for `ObligationCauseCode::WellFormed`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/traits/enum.ObligationCauseCode.html#variant.WellFormed) says that

> it is always correct [...] to specify `WellFormed(None)`

instead of `WellFormed(Some(...))`, which seems to have caused the issue here, as `diagnostic_hir_wf_check` does not expect to be called with an associated constant and will ICE:

https://github.com/rust-lang/rust/blob/fd853c00e255559255885aadff9e93a1760c8728/compiler/rustc_typeck/src/hir_wf_check.rs#L131-L134

Therefore, I have changed `check_associated_item()` to pass a `WellFormed(None)` for associated constants.

r? ``@Aaron1011``
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions