Skip to content

default specialization keyword not supported for associated constants #4264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aloucks opened this issue May 2, 2020 · 1 comment
Closed

Comments

@aloucks
Copy link
Contributor

aloucks commented May 2, 2020

The following compiles on nightly with specialization enabled, but rust-analyzer flags the default keyword as an error.

#![cfg(feature(min_specialization)]
#![cfg(feature(specialization)]

trait Foo {
    const BAR: i32;
}

impl Foo for () {
    default const BAR: i32 = 1;
}

Related:

#1402
#1415

bors bot added a commit that referenced this issue Jun 4, 2020
4737: Parse default unsafe & default const r=matklad a=Avi-D-coder

Closes: #4718 #4264

Co-authored-by: Avi Dessauer <[email protected]>
@matklad
Copy link
Member

matklad commented Jul 15, 2020

fixed some time ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants