What the-.
enum Enum<T> { Variant, Carry(T) }
mod module { pub(super) use super::Enum::Variant; }
fn scope() {
let _ = module::<i32>::Variant; // OK! 😨
let _ = self::module::<()>::Variant {}; // OK! 😨
}
I expected that we would only allow generic arguments on the penultimate segment if it actually referred to an enum (and no generic arguments were passed to the final segment).
If the second-to-last segment doesn't refer to an enum (here: module), I expected us to prohibit generic argument lists on it.
What the-.
I expected that we would only allow generic arguments on the penultimate segment if it actually referred to an enum (and no generic arguments were passed to the final segment).
If the second-to-last segment doesn't refer to an enum (here: module), I expected us to prohibit generic argument lists on it.