2012-12-10 19:32:48 -06: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-10 20:24:41 -05:00
|
|
|
mod bar {
|
2013-01-30 16:30:22 -06:00
|
|
|
pub enum foo {
|
2012-07-10 20:24:41 -05:00
|
|
|
alpha,
|
|
|
|
beta,
|
|
|
|
charlie
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2014-11-06 02:05:53 -06:00
|
|
|
use bar::foo::{alpha, charlie};
|
2012-08-06 14:34:08 -05:00
|
|
|
match alpha {
|
2012-08-06 09:20:23 -05:00
|
|
|
alpha | beta => {} //~ ERROR variable `beta` from pattern #2 is not bound in pattern #1
|
2012-08-03 21:59:04 -05:00
|
|
|
charlie => {}
|
2012-07-10 20:24:41 -05:00
|
|
|
}
|
|
|
|
}
|