Skip to content

[regression] ambiguous local variable #71765

Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum

For example:

INFO] [stderr] error[E0659]: `time` is ambiguous (glob import vs glob import in the same module)
[INFO] [stderr]    --> src/main.rs:257:13
[INFO] [stderr]     |
[INFO] [stderr] 257 |     let mut time = Local::now();
[INFO] [stderr]     |             ^^^^ ambiguous name
[INFO] [stderr]     |
[INFO] [stderr] note: `time` could refer to the function imported here
[INFO] [stderr]    --> src/main.rs:4:5
[INFO] [stderr]     |
[INFO] [stderr] 4   | use libc::*;
[INFO] [stderr]     |     ^^^^^^^
[INFO] [stderr]     = help: consider adding an explicit import of `time` to disambiguate
[INFO] [stderr] note: `time` could also refer to the function imported here
[INFO] [stderr]    --> src/main.rs:11:5
[INFO] [stderr]     |
[INFO] [stderr] 11  | use xcb_bindings::*;
[INFO] [stderr]     |     ^^^^^^^^^^^^^^^
[INFO] [stderr]     = help: consider adding an explicit import of `time` to disambiguate
[INFO] [stderr] 

cc @petrochenkov

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.P-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions