2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 20:13:15 +00:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2014-10-19 06:46:08 +00:00
|
|
|
pub use Foo::*;
|
|
|
|
use nest::{Bar, D, E, F};
|
|
|
|
|
|
|
|
pub enum Foo {
|
|
|
|
A,
|
2015-03-26 00:06:52 +00:00
|
|
|
B(isize),
|
|
|
|
C { a: isize },
|
2014-10-19 06:46:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn _f(f: Foo) {
|
|
|
|
match f {
|
|
|
|
A | B(_) | C { .. } => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod nest {
|
|
|
|
pub use self::Bar::*;
|
|
|
|
|
|
|
|
pub enum Bar {
|
|
|
|
D,
|
2015-03-26 00:06:52 +00:00
|
|
|
E(isize),
|
|
|
|
F { a: isize },
|
2014-10-19 06:46:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Bar {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn _f2(f: Bar) {
|
|
|
|
match f {
|
|
|
|
D | E(_) | F { .. } => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|