]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/cross-crate-variants.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[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 }