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

Name resolution 2.0 impl block not resolved #2946

Closed
P-E-P opened this issue Apr 11, 2024 · 0 comments · Fixed by #2952
Closed

Name resolution 2.0 impl block not resolved #2946

P-E-P opened this issue Apr 11, 2024 · 0 comments · Fixed by #2952

Comments

@P-E-P
Copy link
Member

P-E-P commented Apr 11, 2024

I tried this code:

struct Test;

impl Test {}

I expected to see this happen: Compiles with a few warnings (unused struct).

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ff15ab3e54dafb6bae44b9470d94d768

Instead, this happened:

name.rs:3:6: error: unknown reference for resolved name: ‘Test’
    3 | impl Test {}
      |      ^~~~

Meta

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

Successfully merging a pull request may close this issue.

1 participant