File tree Expand file tree Collapse file tree 5 files changed +92
-0
lines changed
src/test/rustdoc-json/reexport Expand file tree Collapse file tree 5 files changed +92
-0
lines changed Original file line number Diff line number Diff line change
1
+ // edition:2018
2
+
3
+ #![ no_core]
4
+ #![ feature( no_core) ]
5
+
6
+ // @!has glob_extern.json "$.index[*][?(@.name=='mod1')]"
7
+ mod mod1 {
8
+ extern "C" {
9
+ // @set public_fn_id = - "$.index[*][?(@.name=='public_fn')].id"
10
+ pub fn public_fn ( ) ;
11
+ // @!has - "$.index[*][?(@.name=='private_fn')]"
12
+ fn private_fn ( ) ;
13
+ }
14
+ }
15
+
16
+ // @has - "$.index[*][?(@.name=='glob_extern')].inner.items[*]" $public_fn_id
17
+ pub use mod1:: * ;
Original file line number Diff line number Diff line change
1
+ // edition:2018
2
+
3
+ #![ no_core]
4
+ #![ feature( no_core) ]
5
+
6
+ // @!has glob_private.json "$.index[*][?(@.name=='mod1')]"
7
+ mod mod1 {
8
+ // @!has - "$.index[*][?(@.name=='mod2')]"
9
+ mod mod2 {
10
+ // @set m2pub_id = - "$.index[*][?(@.name=='Mod2Public')].id"
11
+ pub struct Mod2Public ;
12
+
13
+ // @!has - "$.index[*][?(@.name=='Mod2Private')]"
14
+ struct Mod2Private ;
15
+ }
16
+ pub use self :: mod2:: * ;
17
+
18
+ // @set m1pub_id = - "$.index[*][?(@.name=='Mod1Public')].id"
19
+ pub struct Mod1Public ;
20
+
21
+ // @!has - "$.index[*][?(@.name=='Mod1Private')]"
22
+ struct Mod1Private ;
23
+ }
24
+ pub use mod1:: * ;
25
+
26
+ // @has - "$.index[*][?(@.name=='glob_private')].inner.items[*]" $m2pub_id
27
+ // @has - "$.index[*][?(@.name=='glob_private')].inner.items[*]" $m1pub_id
Original file line number Diff line number Diff line change
1
+ // edition:2018
2
+
3
+ #![ no_core]
4
+ #![ feature( no_core) ]
5
+
6
+ // @set inner_id = rename_public.json "$.index[*][?(@.name=='inner')].id"
7
+ // @has - "$.index[*][?(@.name=='rename_public')].inner.items[*]" $inner_id
8
+ pub mod inner {
9
+ // @set public_id = - "$.index[*][?(@.name=='Public')].id"
10
+ // @has - "$.index[*][?(@.name=='inner')].inner.items[*]" $public_id
11
+ pub struct Public ;
12
+ }
13
+ // @set import_id = - "$.index[*][?(@.inner.name=='NewName')].id"
14
+ // @!has - "$.index[*][?(@.inner.name=='Public')]"
15
+ // @has - "$.index[*][?(@.name=='rename_public')].inner.items[*]" $import_id
16
+ // @is - "$.index[*][?(@.inner.name=='NewName')].inner.span" \"inner::Public\"
17
+ pub use inner:: Public as NewName ;
Original file line number Diff line number Diff line change
1
+ // edition:2018
2
+
3
+ #![ no_core]
4
+ #![ feature( no_core) ]
5
+
6
+ // @!has simple_private.json "$.index[*][?(@.name=='inner')]"
7
+ mod inner {
8
+ // @set pub_id = - "$.index[*][?(@.name=='Public')].id"
9
+ pub struct Public ;
10
+ }
11
+
12
+ // @has - "$.index[*][?(@.name=='simple_private')].inner.items[*]" $pub_id
13
+ pub use inner:: Public ;
Original file line number Diff line number Diff line change
1
+ // edition:2018
2
+
3
+ #![ no_core]
4
+ #![ feature( no_core) ]
5
+
6
+ // @set inner_id = simple_public.json "$.index[*][?(@.name=='inner')].id"
7
+ // @has - "$.index[*][?(@.name=='simple_public')].inner.items[*]" $inner_id
8
+ pub mod inner {
9
+
10
+ // @set public_id = - "$.index[*][?(@.name=='Public')].id"
11
+ // @has - "$.index[*][?(@.name=='inner')].inner.items[*]" $public_id
12
+ pub struct Public ;
13
+ }
14
+
15
+ // @set import_id = - "$.index[*][?(@.inner.name=='Public')].id"
16
+ // @has - "$.index[*][?(@.name=='simple_public')].inner.items[*]" $import_id
17
+ // @is - "$.index[*][?(@.inner.name=='Public')].inner.span" \"inner::Public\"
18
+ pub use inner:: Public ;
You can’t perform that action at this time.
0 commit comments