Skip to content

Outdated --explain examples for E0659 "An item usage is ambiguous." #65571

Description

@mattheww

See E0659 for the current text.

It includes the following example:

pub mod moon {
    pub fn foo() {}
}

pub mod earth {
    pub fn foo() {}
}

mod collider {
    pub use moon::*;
    pub use earth::*;
}

fn main() {
    collider::foo(); // ERROR: `foo` is ambiguous
}

which needs updating for Rust 2018: it needs crate:: or parent:: adding inside mod collider.

The same is true in the recommended replacement.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-resolveArea: Name/path resolution done by `rustc_resolve` specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions