Closed
Description
This code on the playground
pub enum Option<T> {
/// No value
None,
/// Some value `T`
Some(T),
}
pub use Option::*;
produces the following error
error[E0659]: `Option` is ambiguous
--> src/lib.rs:8:9
|
8 | pub use Option::*;
| ^^^^^^ ambiguous name
|
= note: ambiguous because of multiple potential import sources
note: `Option` could refer to the enum defined here
--> src/lib.rs:1:1
|
1 | / pub enum Option<T> {
2 | | /// No value
3 | | None,
4 | | /// Some value `T`
5 | | Some(T),
6 | | }
| |_^
= help: use `crate::Option` to refer to this enum unambiguously
note: `Option` could also refer to the enum defined here
Note how the 2nd note is dangling: no span is shown after it says 'could also refer to the enum defined here'.
I was not able to reproduce this locally, so this might also have to do with something special the playground is doing -- Cc @shepmaster