Skip to content

Very large error file creation on exponentially growing type #157259

@oli-obk

Description

@oli-obk

I tried this code:

struct B<T: 'static>(&'static B<(T, T)>, T);

static BOO: B<u32> = todo!();

I expected to see this happen: compilation error

Instead, this happened: disk space filled up with a large error file (it terminates at some point, just probably not this year).

Meta

rustc --version --verbose:

rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
Backtrace

<backtrace>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.I-heavyIssue: Problems and improvements with respect to binary size of generated code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions