2012-12-11 01:32:48 +00:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2012-07-11 01:24:41 +00:00
|
|
|
mod bar {
|
2012-09-22 01:10:45 +00:00
|
|
|
#[legacy_exports];
|
2012-07-11 01:24:41 +00:00
|
|
|
enum foo {
|
|
|
|
alpha,
|
|
|
|
beta,
|
|
|
|
charlie
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-09-08 01:08:21 +00:00
|
|
|
use bar::{alpha, charlie};
|
2012-08-06 19:34:08 +00:00
|
|
|
match alpha {
|
2012-08-06 14:20:23 +00:00
|
|
|
alpha | beta => {} //~ ERROR variable `beta` from pattern #2 is not bound in pattern #1
|
2012-08-04 02:59:04 +00:00
|
|
|
charlie => {}
|
2012-07-11 01:24:41 +00:00
|
|
|
}
|
|
|
|
}
|