Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

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

Closed

Description

@SiegeLord
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

Activity

  1. flaper87 commented on Jan 29, 2014

    @flaper87
    Contributor

    visiting for triage. still reproducible.

  2. apoelstra commented on Sep 16, 2014

    @apoelstra
    Contributor

    This is fixed by #17163, recommend close.

  3. alexcrichton commented on Sep 16, 2014

    @alexcrichton
    Member

    Thanks @apoelstra!

  4. added a commit that references this issue on Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions