mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-20 08:30:40 +00:00
Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
25 lines
353 B
Rust
25 lines
353 B
Rust
//@ 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);
|
|
}
|