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