Skip to content

Using a trait as a bound on a on a associated type of a sub-trait causes MEMORY LEAK #21950

@TirushOne

Description

@TirushOne

rust-analyzer version: 0.3.2845-standalone (f1297b2 2026-03-29)

rustc version: rustc 1.92.0 (ded5c06cf 2025-12-08)

editor or extension: VSCode for windows 1.114.0

settings: unmodified/default

code snippet to reproduce:

trait SubTrait {
    type SubType;
}

trait SuperTrait: SubTrait<SubType: SuperTrait> {}

Run Rust Analyzer over the included code and watch as it consumes your RAM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    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