From e013cf8afcf74a5f27feb7ebb0dca248e5c489fe Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 11 Apr 2025 11:35:10 -0700 Subject: rustdoc-search: add unbox flag to Result aliases Fixes #139665 --- tests/rustdoc-js-std/unbox-type-result.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/rustdoc-js-std/unbox-type-result.js (limited to 'tests/rustdoc-js-std') diff --git a/tests/rustdoc-js-std/unbox-type-result.js b/tests/rustdoc-js-std/unbox-type-result.js new file mode 100644 index 00000000000..1f5cba58adf --- /dev/null +++ b/tests/rustdoc-js-std/unbox-type-result.js @@ -0,0 +1,20 @@ +// exact-check + +// Test case for https://github.com/rust-lang/rust/issues/139665 +// make sure that std::io::Result and std::thread::Result get unboxed + +const EXPECTED = [ + { + query: "File -> Metadata", + others: [ + { path: "std::fs::File", name: "metadata" }, + { path: "std::fs::File", name: "metadata_at" }, + ] + }, + { + query: "JoinHandle -> T", + others: [ + { path: "std::thread::JoinHandle", name: "join" }, + ] + }, +]; -- cgit 1.4.1-3-g733a5