Skip to content

"Associated Const" shadowing itself #7396

@xunilrj

Description

@xunilrj

"Associated Const" shadows itself in the example below. What causes the problem is the "where T: A". Removing it makes the compiler happy.

Same problem does not happen for fns and types.

pub trait A {
    const C: bool;
}

struct S<T> { }

impl<T> A for S<T> where T: A {
    const C: bool = true;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions