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