rust/tests/rustdoc-json/reexport/glob_extern.rs

24 lines
779 B
Rust
Raw Normal View History

2021-02-26 16:55:08 -06:00
// edition:2018
#![no_core]
#![feature(no_core)]
2022-08-17 05:55:09 -05:00
// @is "$.index[*][?(@.name=='mod1')].kind" \"module\"
// @is "$.index[*][?(@.name=='mod1')].inner.is_stripped" "true"
2021-02-26 16:55:08 -06:00
mod mod1 {
extern "C" {
2022-08-17 05:55:09 -05:00
// @set public_fn_id = "$.index[*][?(@.name=='public_fn')].id"
2021-02-26 16:55:08 -06:00
pub fn public_fn();
2022-08-17 05:55:09 -05:00
// @!has "$.index[*][?(@.name=='private_fn')]"
2021-02-26 16:55:08 -06:00
fn private_fn();
}
2022-08-17 05:55:09 -05:00
// @ismany "$.index[*][?(@.name=='mod1')].inner.items[*]" $public_fn_id
// @set mod1_id = "$.index[*][?(@.name=='mod1')].id"
2021-02-26 16:55:08 -06:00
}
2022-08-17 05:55:09 -05:00
// @is "$.index[*][?(@.kind=='import')].inner.glob" true
// @is "$.index[*][?(@.kind=='import')].inner.id" $mod1_id
// @set use_id = "$.index[*][?(@.kind=='import')].id"
// @ismany "$.index[*][?(@.name=='glob_extern')].inner.items[*]" $use_id
2021-02-26 16:55:08 -06:00
pub use mod1::*;