about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-07 14:22:02 +0200
committerGitHub <noreply@github.com>2024-07-07 14:22:02 +0200
commit1ee6345b7b76416ca9cf4eacdb74d9590563c53f (patch)
tree7b526cf6659a4695749800c7fd2c7d86101b7b02 /compiler/rustc_parse/src
parentc40530d0de9ab1eca158a3113d3873e983bc1bf7 (diff)
parent9da3638c6a90748cc913a3e2e02a74eb851ec48a (diff)
downloadrust-1ee6345b7b76416ca9cf4eacdb74d9590563c53f.tar.gz
rust-1ee6345b7b76416ca9cf4eacdb74d9590563c53f.zip
Rollup merge of #127409 - gurry:127332-ice-with-expr-not-struct, r=oli-obk
Emit a wrap expr span_bug only if context is not tainted

Fixes #127332

The ICE occurs because of this `span_bug`: https://github.com/rust-lang/rust/blob/51917e2e69702e5752bce6a4f3bfd285d0f4ae39/compiler/rustc_hir_typeck/src/expr_use_visitor.rs#L732-L738
which is triggered by the fact that we're trying to use an `enum` in a `with` expression instead of a `struct`.

The issue originates in commit https://github.com/rust-lang/rust/pull/127202/commits/814bfe9335fd7c941169e0ef15ae2cffeacc78eb   from PR #127202. As per the title of that commit the ICEing code should not be reachable any more, but looks like it still is.

This PR changes the code so that the `span_bug` will be emitted only if the context is not tainted by a previous error.
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions