rust/tests/ui/hygiene/cross-crate-variants.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
339 B
Rust
Raw Normal View History

2021-10-28 20:48:39 +00:00
// Test that variants of an enum defined in another crate are resolved
// correctly when their names differ only in `SyntaxContext`.
2021-10-23 11:06:58 +00:00
// run-pass
// aux-build:variants.rs
extern crate variants;
use variants::*;
fn main() {
check_variants();
test_variants!();
test_variants2!();
assert_eq!(MyEnum::Variant as u8, 1);
}