rust/tests/rustdoc-json/reexport/glob_collision.rs
Alona Enraght-Moony f784fa7bd9 tests/rustdoc-json: Remove some needless uses of #![no_core].
Done by removing all uses of `#![no_core]`, and the reverting the ones
that failed. More involved ones are in a later commit.
2023-11-07 16:36:55 +00:00

28 lines
1.0 KiB
Rust

// Regression test for https://github.com/rust-lang/rust/issues/100973
// @set m1 = "$.index[*][?(@.name == 'm1' && @.inner.module)].id"
// @is "$.index[*][?(@.name == 'm1')].inner.module.items" []
// @is "$.index[*][?(@.name == 'm1')].inner.module.is_stripped" true
mod m1 {
pub fn f() {}
}
// @set m2 = "$.index[*][?(@.name == 'm2' && @.inner.module)].id"
// @is "$.index[*][?(@.name == 'm2')].inner.module.items" []
// @is "$.index[*][?(@.name == 'm2')].inner.module.is_stripped" true
mod m2 {
pub fn f(_: u8) {}
}
// @set m1_use = "$.index[*][?(@.docs=='m1 re-export')].id"
// @is "$.index[*].inner.import[?(@.name=='m1')].id" $m1
// @is "$.index[*].inner.import[?(@.name=='m1')].glob" true
/// m1 re-export
pub use m1::*;
// @set m2_use = "$.index[*][?(@.docs=='m2 re-export')].id"
// @is "$.index[*].inner.import[?(@.name=='m2')].id" $m2
// @is "$.index[*].inner.import[?(@.name=='m2')].glob" true
/// m2 re-export
pub use m2::*;
// @ismany "$.index[*].inner.module[?(@.is_crate==true)].items[*]" $m1_use $m2_use