-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
Issue by mdinger
Friday Aug 22, 2014 at 18:16 GMT
For earlier discussion, see rust-lang/rust#16681
This issue was labelled with: in the Rust repository
// 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 (rust-lang/rust#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.
burdges, Boscop, Richiban, Timmmm, shonfeder and 2 moreticki and petrochenkov
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.