Skip to content

Commit 7d47d7c

Browse files
Add regression test for #107677
1 parent 0541a0c commit 7d47d7c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/107677>.
2+
3+
#![feature(no_core)]
4+
#![no_core]
5+
6+
pub mod nested {
7+
// @set foo_struct = "$.index[*][?(@.docs == 'Foo the struct')].id"
8+
9+
/// Foo the struct
10+
pub struct Foo {}
11+
12+
// @set foo_fn = "$.index[*][?(@.docs == 'Foo the function')].id"
13+
14+
#[allow(non_snake_case)]
15+
/// Foo the function
16+
pub fn Foo() {}
17+
}
18+
19+
// @ismany "$.index[*][?(@.inner.name == 'Foo' && @.kind == 'import')].inner.id" $foo_fn $foo_struct
20+
// @ismany "$.index[*][?(@.inner.name == 'Bar' && @.kind == 'import')].inner.id" $foo_fn $foo_struct
21+
22+
// @count "$.index[*][?(@.inner.name == 'Foo' && @.kind == 'import')]" 2
23+
pub use nested::Foo;
24+
// @count "$.index[*][?(@.inner.name == 'Bar' && @.kind == 'import')]" 2
25+
pub use Foo as Bar;

0 commit comments

Comments
 (0)