Skip to content

Non-existant shadowed import succeeds incorrectly #13404

Closed
@brson

Description

@brson

This program should not compile because b::f does not exist, but it prints "a":

use a::f;
use b::f;

mod a { pub fn f() { println!("a"); } }
mod b { }

fn main() {
    f();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions