mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	Emit a wrap expr span_bug only if context is not tainted Fixes #127332 The ICE occurs because of this `span_bug`:51917e2e69/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 commit814bfe9335from 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.