Skip to content

impl Undefined {} gives impl coherence error, not unresolved name #18058

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
huonw opened this issue Oct 15, 2014 · 2 comments
Closed

impl Undefined {} gives impl coherence error, not unresolved name #18058

huonw opened this issue Oct 15, 2014 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@huonw
Copy link
Member

huonw commented Oct 15, 2014

impl Undefined {}

fn main() {}
<anon>:1:6: 1:15 error: inherent implementations are not allowed for types not defined in the current module.
<anon>:1 impl Undefined {}
              ^~~~~~~~~

This should say error: use of undeclared type name Undefined`` like fn foo() -> Undefined {} does.

@huonw huonw added I-papercut A-diagnostics Area: Messages for errors, warnings, and lints labels Oct 15, 2014
@steveklabnik
Copy link
Member

triage: still true today

@nham
Copy link
Contributor

nham commented Jun 20, 2015

As of rustc 1.2.0-nightly (20d23d8e5 2015-06-18) the error is

18058.rs:1:6: 1:15 error: use of undeclared type name `Undefined`
18058.rs:1 impl Undefined {}
                ^~~~~~~~~
error: aborting due to previous error

I will add a regression test so this issue can be closed.

nham pushed a commit to nham/rust that referenced this issue Jun 20, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Jun 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

3 participants