Glob import with auto-derive

Hello everyone,

I wonder why and how:

pub enum A {
    A,
    B,
}
impl Copy for A {}
impl Clone for A {
    fn clone(&self) -> A { *self }
}
pub use A::*; // No issue here

But:

#[derive(Copy, Clone)] // Or anything really...
pub enum A {
    A,
    B,
}
pub use A::*; // `A` is ambiguous

Since it seems that Rust understands "type position" and "value position":

use A::{self, *};

fn a(a: A) {} // Type
a(A); // Value
a(A::A); // I don't want my API users (nor myself) to do this

Expanding the derive gives me no clue on this error.

Thank you!

seems like a bug to me, feel free to report it here

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.