2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2014-07-21 11:47:24 -05:00
|
|
|
#![deny(warnings)]
|
|
|
|
#![allow(unused_imports)]
|
|
|
|
|
2015-03-11 16:44:56 -05:00
|
|
|
pub enum Foo { A }
|
2014-07-21 11:47:24 -05:00
|
|
|
mod bar {
|
|
|
|
pub fn normal(x: ::Foo) {
|
2014-11-06 02:05:53 -06:00
|
|
|
use Foo::A;
|
2014-07-21 11:47:24 -05:00
|
|
|
match x {
|
|
|
|
A => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pub fn wrong(x: ::Foo) {
|
|
|
|
match x {
|
2014-11-06 02:05:53 -06:00
|
|
|
::Foo::A => {}
|
2014-07-21 11:47:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
2014-11-06 02:05:53 -06:00
|
|
|
bar::normal(Foo::A);
|
|
|
|
bar::wrong(Foo::A);
|
2014-07-21 11:47:24 -05:00
|
|
|
}
|