]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/cross-crate-fields.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / hygiene / cross-crate-fields.rs
1 // Test that fields on a struct defined in another crate are resolved correctly
2 // their names differ only in `SyntaxContext`.
3
4 // run-pass
5 // aux-build:fields.rs
6
7 extern crate fields;
8
9 use fields::*;
10
11 fn main() {
12     check_fields_local();
13
14     test_fields!(check_fields);
15     test_fields2!(check_fields);
16
17     let s1 = test_fields!(construct);
18     check_fields(s1);
19     test_fields!(check_fields_of s1);
20
21     let s2 = test_fields2!(construct);
22     check_fields(s2);
23     test_fields2!(check_fields_of s2);
24 }