Skip to content

[ICE] Unexpected rigid alias in layout_of after normalization #161495

Description

@dtolnay

Minimized from https://github.com/dtolnay/get-all-crates: the following small program successfully runs cargo clippy in 1.98.0 stable, 1.99.0-beta.1, and nightly-2026-08-21 but crashes in nightly-2026-08-22.

Bisects to #160619. @Kivooeo @lcnr @jdonszelmann @Kobzol

# Cargo.toml

[package]
name = "repro"
edition = "2024"
publish = false
// src/main.rs

#![warn(clippy::large_futures)]

async fn f() {}

fn main() {
    _ = async {
        f().await;
    };
}
$ cargo clippy

note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: unexpected rigid alias in layout_of after normalization: Alias(Yes, Alias { kind: Opaque { def_id: DefId(0:4 ~ repro[d350]::f::{opaque#0}) }, args: [], .. })
  |
  = note: delayed at /rustc-dev/c656540d6467dee1381f0cbd882412d6bd1cd5ae/compiler/rustc_ty_utils/src/layout.rs:835:61 - disabled backtrace

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/git/repro/rustc-ice-2026-08-22T04_33_52-1828027.txt` to your bug report

note: rustc 1.100.0-nightly (c656540d6 2026-08-21) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=line-tables-only -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
note: Clippy version: clippy 0.1.99 (c656540d64 2026-08-21)

error: could not compile `repro` (bin "repro")

Caused by:
  process didn't exit successfully: `/home/david/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/clippy-driver /home/david/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name repro --edition=2024 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=118 --crate-type bin --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=line-tables-only --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=bbd45fce7d22b72c -C extra-filename=-e73b62e47ec3f460 --out-dir /git/repro/target/debug/build/repro/e73b62e47ec3f460/out -C incremental=/git/repro/target/debug/incremental` (exit status: 101)

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitA-layoutArea: Memory layout of typesC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}S-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-clippyRelevant to the Clippy team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions