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

rustc: impl on unknown type generates incorrect error #14691

Closed
aturon opened this issue Jun 6, 2014 · 1 comment
Closed

rustc: impl on unknown type generates incorrect error #14691

aturon opened this issue Jun 6, 2014 · 1 comment

Comments

@aturon
Copy link
Member

aturon commented Jun 6, 2014

The code

impl Foo {}
fn main() {}

generates the error

impl-bug.rs:1:6: 1:9 error: found module name used as a type: impl Foo::Foo (id=4)
impl-bug.rs:1 impl Foo {}
                   ^~~

but should instead give an error saying that Foo is not a known type. (This is the entire file, so no module named Foo is in scope.)

@Ryman
Copy link
Contributor

Ryman commented Jun 14, 2014

Dupe of #8767

@jdm jdm closed this as completed Jun 15, 2014
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

3 participants