Skip to content
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

Default Associated Consts cannot use Self:: #32241

Closed
strega-nil opened this issue Mar 14, 2016 · 1 comment
Closed

Default Associated Consts cannot use Self:: #32241

strega-nil opened this issue Mar 14, 2016 · 1 comment
Labels
A-resolve Area: Name resolution

Comments

@strega-nil
Copy link
Contributor

#![feature(associated_consts)]

trait Boop {
    const X: fn() = Self::x;
    fn x();
}

errors with

<anon>:4:21: 4:28 error: failed to resolve. Use of undeclared type or module `Self` [E0433]
<anon>:4     const X: fn() = Self::x;
                             ^~~~~~~
<anon>:4:21: 4:28 help: see the detailed explanation for E0433
<anon>:4:21: 4:28 error: unresolved name `Self::x` [E0425]
<anon>:4     const X: fn() = Self::x;
                             ^~~~~~~
<anon>:4:21: 4:28 help: see the detailed explanation for E0425
@eddyb eddyb added the A-resolve Area: Name resolution label Mar 14, 2016
@petrochenkov
Copy link
Contributor

Duplicate of #28809
(It's not only A-resolve, type checker support is also required.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name resolution
Projects
None yet
Development

No branches or pull requests

4 participants