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

Can't call methods from re-exported traits #18296

Closed
kmcallister opened this issue Oct 24, 2014 · 3 comments
Closed

Can't call methods from re-exported traits #18296

kmcallister opened this issue Oct 24, 2014 · 3 comments
Labels
A-resolve Area: Path resolution A-traits Area: Trait system

Comments

@kmcallister
Copy link
Contributor

Code of this form used to work, and this still compiles if I remove the call to f.

use foo::Trait;

mod foo {
    pub use self::bar::Trait;

    mod bar {
        pub trait Trait {
            fn f(self);
        }
    }
}

struct S;

impl Trait for S {
    fn f(self) { }
}

fn main() {
    S.f();
}

rustc 0.13.0-dev (a10917a 2014-10-24 17:32:04 +0000)

@kmcallister kmcallister added I-wrong A-resolve Area: Path resolution A-traits Area: Trait system labels Oct 24, 2014
@arielb1
Copy link
Contributor

arielb1 commented Jun 29, 2015

This gives a privacy error now. Not sure this is a bug.

@arielb1 arielb1 removed the I-wrong label Jun 29, 2015
@Ryman
Copy link
Contributor

Ryman commented Jul 29, 2015

Just noticed this is dupe of #18241?

@huonw
Copy link
Member

huonw commented Oct 20, 2015

Looks like it! Closing as a dupe.

@huonw huonw closed this as completed Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Path resolution A-traits Area: Trait system
Projects
None yet
Development

No branches or pull requests

4 participants