SIGN IN SIGN UP

Fix large_futures ICE with the next solver (#17601)

With the new trait solver enabled by default in nightly-2026-08-22 [1],
large_futures can ICE while inspecting an awaited future.

The lint switches to Codegen mode to obtain coroutine layouts but passes
a type whose opaque aliases are still marked rigid from type checking.
Because layout_of receives an already-Codegen environment, its
environment-change path does not clear those markers.

Clear alias rigidity and normalize the awaited type in that environment
before querying its layout. Codegen mode must remain: post-analysis
layout queries cannot compute coroutine sizes [2].

The regression covers direct and pinned futures under both solvers,
without other lint errors that could hide a delayed ICE.

Fixes rust-lang/rust#161495.

changelog: [`large_futures`]: Fix an ICE on awaited futures with the
next trait solver.

[1]: https://github.com/rust-lang/rust/pull/160619
[2]: https://github.com/rust-lang/rust/pull/145477
P
Philipp Krones committed
c58c138bb84f0746e6d2db8fb367ddbd14908e7b
Committed by GitHub <noreply@github.com> on 8/23/2026, 4:53:44 PM