diff options
| author | Alona Enraght-Moony <code@alona.page> | 2025-03-20 23:02:39 +0000 |
|---|---|---|
| committer | Alona Enraght-Moony <code@alona.page> | 2025-03-21 00:48:09 +0000 |
| commit | 42631d80272a27957dcbcb6cb56327038aaa9784 (patch) | |
| tree | 6722f464793c3e646939ef602df21739bd457329 | |
| parent | 7ab71c417b90695ea5186003745699e05164e746 (diff) | |
| download | rust-42631d80272a27957dcbcb6cb56327038aaa9784.tar.gz rust-42631d80272a27957dcbcb6cb56327038aaa9784.zip | |
tests/rustdoc-json: replace `$.paths[*][?` with `$.paths[?`
This fixes all 3 of these tests. Done automatically in VSCode.
| -rw-r--r-- | tests/rustdoc-json/path_name.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/simple_private.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-json/reexport/simple_public.rs | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/rustdoc-json/path_name.rs b/tests/rustdoc-json/path_name.rs index 116b2bee508..dcfaa0607c4 100644 --- a/tests/rustdoc-json/path_name.rs +++ b/tests/rustdoc-json/path_name.rs @@ -38,7 +38,7 @@ pub type U2 = InPubMod2; pub type U3 = InPubMod3; // Check we only have paths for structs at their original path -//@ ismany "$.paths[*][?(@.crate_id==0 && @.kind=='struct')].path" '["path_name", "priv_mod", "InPrivMod"]' '["path_name", "pub_mod", "InPubMod"]' +//@ ismany "$.paths[?(@.crate_id==0 && @.kind=='struct')].path" '["path_name", "priv_mod", "InPrivMod"]' '["path_name", "pub_mod", "InPubMod"]' pub use defines_and_reexports::{InPrivMod as XPrivMod, InPubMod as XPubMod}; use defines_and_reexports::{InPrivMod as XPrivMod2, InPubMod as XPubMod2}; diff --git a/tests/rustdoc-json/reexport/simple_private.rs b/tests/rustdoc-json/reexport/simple_private.rs index 85da90cf48c..40be1708dc6 100644 --- a/tests/rustdoc-json/reexport/simple_private.rs +++ b/tests/rustdoc-json/reexport/simple_private.rs @@ -14,7 +14,7 @@ pub use inner::Public; //@ ismany "$.index[?(@.name=='simple_private')].inner.module.items[*]" $use_id // Test for https://github.com/rust-lang/rust/issues/135309 -//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_private"]' +//@ has "$.paths[?(@.kind=='module')].path" '["simple_private"]' //@ !has "$.paths[*].path" '["simple_private", "inner"]' -//@ has "$.paths[*][?(@.kind=='struct')].path" '["simple_private", "inner", "Public"]' +//@ has "$.paths[?(@.kind=='struct')].path" '["simple_private", "inner", "Public"]' //@ !has "$.paths[*].path" '["simple_private", "Public"]' diff --git a/tests/rustdoc-json/reexport/simple_public.rs b/tests/rustdoc-json/reexport/simple_public.rs index 3dcfe900d73..cdb6c0dc88a 100644 --- a/tests/rustdoc-json/reexport/simple_public.rs +++ b/tests/rustdoc-json/reexport/simple_public.rs @@ -15,7 +15,7 @@ pub use inner::Public; //@ ismany "$.index[?(@.name=='simple_public')].inner.module.items[*]" $import_id $inner_id -//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_public"]' -//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_public", "inner"]' -//@ has "$.paths[*][?(@.kind=='struct')].path" '["simple_public", "inner", "Public"]' +//@ has "$.paths[?(@.kind=='module')].path" '["simple_public"]' +//@ has "$.paths[?(@.kind=='module')].path" '["simple_public", "inner"]' +//@ has "$.paths[?(@.kind=='struct')].path" '["simple_public", "inner", "Public"]' //@ !has "$.paths[*].path" '["simple_public", "Public"]' |
