From 3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:43 +0200 Subject: Merging upstream version 1.69.0+dfsg1. Signed-off-by: Daniel Baumann --- .../reexport/same_name_different_types.rs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/rustdoc-json/reexport/same_name_different_types.rs (limited to 'tests/rustdoc-json/reexport') diff --git a/tests/rustdoc-json/reexport/same_name_different_types.rs b/tests/rustdoc-json/reexport/same_name_different_types.rs new file mode 100644 index 000000000..2314a4eb9 --- /dev/null +++ b/tests/rustdoc-json/reexport/same_name_different_types.rs @@ -0,0 +1,25 @@ +// Regression test for . + +#![feature(no_core)] +#![no_core] + +pub mod nested { + // @set foo_struct = "$.index[*][?(@.docs == 'Foo the struct')].id" + + /// Foo the struct + pub struct Foo {} + + // @set foo_fn = "$.index[*][?(@.docs == 'Foo the function')].id" + + #[allow(non_snake_case)] + /// Foo the function + pub fn Foo() {} +} + +// @ismany "$.index[*][?(@.inner.name == 'Foo' && @.kind == 'import')].inner.id" $foo_fn $foo_struct +// @ismany "$.index[*][?(@.inner.name == 'Bar' && @.kind == 'import')].inner.id" $foo_fn $foo_struct + +// @count "$.index[*][?(@.inner.name == 'Foo' && @.kind == 'import')]" 2 +pub use nested::Foo; +// @count "$.index[*][?(@.inner.name == 'Bar' && @.kind == 'import')]" 2 +pub use Foo as Bar; -- cgit v1.2.3