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

Impl on type imported unqualified from different module #12729

Closed
huonw opened this issue Mar 6, 2014 · 1 comment · Fixed by #17321
Closed

Impl on type imported unqualified from different module #12729

huonw opened this issue Mar 6, 2014 · 1 comment · Fixed by #17321

Comments

@huonw
Copy link
Member

huonw commented Mar 6, 2014

pub struct Foo;

mod bar {
    use Foo;

    impl Foo {
        fn baz(&self) {}
    }
}
fn main() {}
qualified.rs:6:10: 6:13 error: found module name used as a type: impl bar::Foo::Foo (id=10)
qualified.rs:6     impl Foo {
                        ^~~
@chris-morgan
Copy link
Member

An example shorter still (depending on prelude types) is

impl Ascii {}
fn main() {}
<anon>:1:6: 1:11 error: found module name used as a type: impl Ascii::Ascii (id=5)
<anon>:1 impl Ascii {} fn main() {}
              ^~~~~

apoelstra added a commit to apoelstra/rust that referenced this issue Sep 28, 2014
bors added a commit that referenced this issue Sep 29, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue May 17, 2024
…ity, r=xFrednet

Lint direct priority conflicts in `[workspace.lints]`

Partially addresses rust-lang#12729

This still doesn't do any workspace resolution stuff, so it will not catch any virtual workspaces or conflicts from inherited definitions. But while we're parsing the `Cargo.toml` we might as well check the workspace definitions if we find them

changelog: none
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

Successfully merging a pull request may close this issue.

2 participants