Skip to content

Commit 42631d8

Browse files
committed
tests/rustdoc-json: replace $.paths[*][? with $.paths[?
This fixes all 3 of these tests. Done automatically in VSCode.
1 parent 7ab71c4 commit 42631d8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/rustdoc-json/path_name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub type U2 = InPubMod2;
3838
pub type U3 = InPubMod3;
3939

4040
// Check we only have paths for structs at their original path
41-
//@ ismany "$.paths[*][?(@.crate_id==0 && @.kind=='struct')].path" '["path_name", "priv_mod", "InPrivMod"]' '["path_name", "pub_mod", "InPubMod"]'
41+
//@ ismany "$.paths[?(@.crate_id==0 && @.kind=='struct')].path" '["path_name", "priv_mod", "InPrivMod"]' '["path_name", "pub_mod", "InPubMod"]'
4242

4343
pub use defines_and_reexports::{InPrivMod as XPrivMod, InPubMod as XPubMod};
4444
use defines_and_reexports::{InPrivMod as XPrivMod2, InPubMod as XPubMod2};

tests/rustdoc-json/reexport/simple_private.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub use inner::Public;
1414
//@ ismany "$.index[?(@.name=='simple_private')].inner.module.items[*]" $use_id
1515

1616
// Test for https://github.com/rust-lang/rust/issues/135309
17-
//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_private"]'
17+
//@ has "$.paths[?(@.kind=='module')].path" '["simple_private"]'
1818
//@ !has "$.paths[*].path" '["simple_private", "inner"]'
19-
//@ has "$.paths[*][?(@.kind=='struct')].path" '["simple_private", "inner", "Public"]'
19+
//@ has "$.paths[?(@.kind=='struct')].path" '["simple_private", "inner", "Public"]'
2020
//@ !has "$.paths[*].path" '["simple_private", "Public"]'

tests/rustdoc-json/reexport/simple_public.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub use inner::Public;
1515

1616
//@ ismany "$.index[?(@.name=='simple_public')].inner.module.items[*]" $import_id $inner_id
1717

18-
//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_public"]'
19-
//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_public", "inner"]'
20-
//@ has "$.paths[*][?(@.kind=='struct')].path" '["simple_public", "inner", "Public"]'
18+
//@ has "$.paths[?(@.kind=='module')].path" '["simple_public"]'
19+
//@ has "$.paths[?(@.kind=='module')].path" '["simple_public", "inner"]'
20+
//@ has "$.paths[?(@.kind=='struct')].path" '["simple_public", "inner", "Public"]'
2121
//@ !has "$.paths[*].path" '["simple_public", "Public"]'

0 commit comments

Comments
 (0)