blob: 5d487cf6a56e8d6d279e9c92b8d36824427bde6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
//@ compile-flags: --document-private-items
//@ set exported_id = "$.index[?(@.name=='exported')].id"
//@ is "$.index[?(@.name=='exported')].attrs" '["macro_export"]'
//@ is "$.index[?(@.name=='exported')].visibility" '"public"'
#[macro_export]
macro_rules! exported {
() => {};
}
//@ set not_exported_id = "$.index[?(@.name=='not_exported')].id"
//@ is "$.index[?(@.name=='not_exported')].attrs" []
//@ is "$.index[?(@.name=='not_exported')].visibility" '"crate"'
macro_rules! not_exported {
() => {};
}
//@ set module_id = "$.index[?(@.name=='module')].id"
pub mod module {
//@ set exported_from_mod_id = "$.index[?(@.name=='exported_from_mod')].id"
//@ is "$.index[?(@.name=='exported_from_mod')].attrs" '["macro_export"]'
//@ is "$.index[?(@.name=='exported_from_mod')].visibility" '"public"'
#[macro_export]
macro_rules! exported_from_mod {
() => {};
}
//@ set not_exported_from_mod_id = "$.index[?(@.name=='not_exported_from_mod')].id"
//@ is "$.index[?(@.name=='not_exported_from_mod')].attrs" []
//@ is "$.index[?(@.name=='not_exported_from_mod')].visibility" '"crate"'
macro_rules! not_exported_from_mod {
() => {};
}
}
// The non-exported macro's are left in place, but the #[macro_export]'d ones
// are moved to the crate root.
//@ is "$.index[?(@.name=='module')].inner.module.items[*]" $not_exported_from_mod_id
//@ ismany "$.index[?(@.name=='macro_export')].inner.module.items[*]" $exported_id $not_exported_id $module_id $exported_from_mod_id
|