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

Trouble resolving associated functions from a non-trait impl within a different module #9584

Closed
SiegeLord opened this issue Sep 28, 2013 · 3 comments

Comments

@SiegeLord
Copy link
Contributor

use B::*;

pub struct S;
mod B
{
    impl super::S
    {
        pub fn new() -> super::S
        {
            super::S
        }
    }
}

fn main()
{
    let s = S::new();
}

Error:

test.rs:17:9: 17:15 error: unresolved name
test.rs:17      let s = S::new();
                        ^~~~~~
test.rs:17:9: 17:15 error: use of undeclared module `S`
test.rs:17      let s = S::new();
                        ^~~~~~
test.rs:17:9: 17:15 error: unresolved name `S::new`.
test.rs:17      let s = S::new();
                        ^~~~~~
error: aborting due to 3 previous errors
rustc --version
rustc 0.8 (76e8f08 2013-09-27 11:11:06 -0700)
host: x86_64-unknown-linux-gnu
@flaper87
Copy link
Contributor

visiting for triage. still reproducible.

@apoelstra
Copy link
Contributor

This is fixed by #17163, recommend close.

@alexcrichton
Copy link
Member

Thanks @apoelstra!

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 20, 2022
…llogiq

add tests in `implicit_saturating_sub` lint

This adds more tests to the `implicit_saturating_sub` lint to rule out certain false positives that have appeared in the past.

Now with those false positives out of the equation, we can move the lint to `style`.

---

changelog: promote [`implicit-saturating-sub`] to the `style` category
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

4 participants