Closed
Description
// main.rs
extern crate really;
fn main() {
let my_enum = really::long::A;
// This match works with full scoping
match my_enum {
really::long::A => {},
really::long::B => {},
really::long::C => {},
really::long::D => {},
really::long::E => {},
really::long::F => {},
really::long::G => {},
}
// This doesn't because the scope is missing but the scope
// doesn't add anything because it's matching variants of an
// already defined enum. This should work.
match my_enum {
A => {},
B => {},
C => {},
D => {},
E => {},
F => {},
G => {},
}
}
// lib.rs
pub mod long;
// long.rs
pub enum Enumeration {
A,
B,
C,
D,
E,
F,
G,
}
I was trying to de-glob libsyntax (#11983) but this is a real nuisance there. The enums are much much bigger than this.
I hope this is clear. Let me know if it isn't.
Metadata
Metadata
Assignees
Labels
No labels