2022-08-09 15:52:18 +01:00
|
|
|
// https://github.com/rust-lang/rust/issues/100252
|
|
|
|
|
|
|
|
mod bar {
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ set baz = "$.index[*][?(@.name == 'Baz')].id"
|
2022-08-09 15:52:18 +01:00
|
|
|
pub struct Baz;
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ set impl = "$.index[*][?(@.docs == 'impl')].id"
|
2023-11-07 16:56:03 +00:00
|
|
|
/// impl
|
2022-08-09 15:52:18 +01:00
|
|
|
impl Baz {
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ set doit = "$.index[*][?(@.name == 'doit')].id"
|
2022-08-09 15:52:18 +01:00
|
|
|
pub fn doit() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-05 00:44:35 +01:00
|
|
|
//@ set import = "$.index[*][?(@.inner.use)].id"
|
2022-08-09 15:52:18 +01:00
|
|
|
pub use bar::Baz;
|
|
|
|
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ is "$.index[*].inner.module.items[*]" $import
|
2024-08-05 00:44:35 +01:00
|
|
|
//@ is "$.index[*].inner.use.id" $baz
|
2024-07-19 16:50:47 +02:00
|
|
|
//@ has "$.index[*][?(@.name == 'Baz')].inner.struct.impls[*]" $impl
|
|
|
|
//@ is "$.index[*][?(@.docs=='impl')].inner.impl.items[*]" $doit
|