]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/cross-crate-variants.rs
Merge commit '7b73b60faca71d01d900e49831fcb84553e93019' into sync-rustfmt
[rust.git] / src / test / ui / hygiene / cross-crate-variants.rs
1 // Test that variants of an enum defined in another crate are resolved
2 // correctly when their names differ only in `SyntaxContext`.
3
4 // run-pass
5 // aux-build:variants.rs
6
7 extern crate variants;
8
9 use variants::*;
10
11 fn main() {
12     check_variants();
13
14     test_variants!();
15     test_variants2!();
16
17     assert_eq!(MyEnum::Variant as u8, 1);
18 }