mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
1992e7111d
Avoid a bogus THIR span for `let x = offset_of!(..)` The code that creates spans for THIR `let` statements was doing span endpoint manipulation without checking for inclusion/context, resulting in bogus spans observed in https://github.com/rust-lang/rust/pull/151693. The incorrect spans are easiest to observe with `-Zunpretty=thir-tree`, but they also cause strange user-facing diagnostics for irrefutable let-else.