Files
rust/compiler/rustc_trait_selection
Jacob Pratt defee2995b Rollup merge of #153888 - MaximilianAzendorf:issue-153583, r=Kivooeo
Avoid stack overflow in FindExprBySpan

Fixes rust-lang/rust#153583.

Deeply nested `?` desugarings can build a very deep HIR expression spine.
When `FindExprBySpan` walks that expression during error reporting, the
recursive `visit_expr` traversal can overflow the stack before rustc emits the
actual diagnostic.

This wraps the recursive expression walk in `ensure_sufficient_stack`, which
lets the compiler report the expected E0277 instead of crashing.

Added a UI regression test for a deeply nested `?` chain.
2026-04-08 23:03:58 -04:00
..
2026-02-24 10:50:38 +01:00