mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 05:34:45 +00:00
28 lines
443 B
Rust
28 lines
443 B
Rust
//! Regression test for https://github.com/rust-lang/rust/issues/15774
|
|
|
|
//@ edition: 2015
|
|
//@ run-pass
|
|
|
|
#![deny(warnings)]
|
|
#![allow(unused_imports)]
|
|
|
|
pub enum Foo { A }
|
|
mod bar {
|
|
pub fn normal(x: ::Foo) {
|
|
use Foo::A;
|
|
match x {
|
|
A => {}
|
|
}
|
|
}
|
|
pub fn wrong(x: ::Foo) {
|
|
match x {
|
|
::Foo::A => {}
|
|
}
|
|
}
|
|
}
|
|
|
|
pub fn main() {
|
|
bar::normal(Foo::A);
|
|
bar::wrong(Foo::A);
|
|
}
|