Skip to content

ICE on trait aliases without a flag #65673

Closed
@wdanilo

Description

@wdanilo

The following code panics the compiler:

pub struct SharedRange<Ix, OnSet> {
    pub data: f32,
}

trait HasCtx {
    type Ctx;
}

trait Callback0 {}

trait Foo<Ix, OnSet> = where OnSet: Callback0;

impl<Ix, OnSet> HasCtx for SharedRange<Ix, OnSet> {
    type Ctx = Foo<Ix, OnSet>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-trait_alias`#![feature(trait_alias)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions