Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Trait re-exports fail due to privacy of containing module #18241

Copy link
Copy link
@Ryman

Description

@Ryman
Issue body actions

This was working previously before rustc 0.13.0-nightly (3d2cf6063 2014-10-22 00:22:04 +0000).

If this is an intended change, we should probably give the error where the re-export is defined and not on use of the trait.

use foo::Bar;

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

    mod bar {
        pub trait Bar {
            fn call(&self) -> bool;
        }
    }
}

impl foo::Bar for uint {
    fn call(&self) -> bool {
        true
    }
}

fn main() {
    println!("{}", 0u.call())
    //^~ ERROR source trait is inaccessible
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyA-trait-systemArea: Trait systemArea: Trait system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.