Skip to content

ICE: resolve_trait_associated_const: unexpected vtable type #29924

Closed
@oli-obk

Description

@oli-obk

the following code ices on nightly:

#![feature(const_fn, associated_consts)]

trait Trait {
    const N: usize;
}

impl Trait {
    const fn n() -> usize { Self::N }
}

It should give an error instead noting that you can't do Self::N.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions