From c7cb8224e2020d30df6bceb8ea2e16e7a2594585 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 2 Jan 2025 11:58:15 -0700 Subject: rustdoc: treat `allowed_through_unstable_modules` as deprecation This ensures `std::intrinsics::transmute` is deemphasized in the search engine and other UI, by cleaning it into a deprecation without propagating it through reexports when the parent module is stable. --- tests/rustdoc-js-std/core-transmute.js | 11 +++++++++++ tests/rustdoc-js-std/transmute-fail.js | 3 ++- tests/rustdoc-js-std/transmute.js | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tests/rustdoc-js-std/core-transmute.js (limited to 'tests/rustdoc-js-std') diff --git a/tests/rustdoc-js-std/core-transmute.js b/tests/rustdoc-js-std/core-transmute.js new file mode 100644 index 00000000000..8c9910a32d7 --- /dev/null +++ b/tests/rustdoc-js-std/core-transmute.js @@ -0,0 +1,11 @@ +const FILTER_CRATE = "core"; +const EXPECTED = [ + { + 'query': 'generic:T -> generic:U', + 'others': [ + { 'path': 'core::intrinsics::simd', 'name': 'simd_as' }, + { 'path': 'core::intrinsics::simd', 'name': 'simd_cast' }, + { 'path': 'core::mem', 'name': 'transmute' }, + ], + }, +]; diff --git a/tests/rustdoc-js-std/transmute-fail.js b/tests/rustdoc-js-std/transmute-fail.js index c4dddf3cf3c..ddfb2761948 100644 --- a/tests/rustdoc-js-std/transmute-fail.js +++ b/tests/rustdoc-js-std/transmute-fail.js @@ -1,4 +1,5 @@ // should-fail +const FILTER_CRATE = "std"; const EXPECTED = [ { // Keep this test case identical to `transmute`, except the @@ -7,7 +8,7 @@ const EXPECTED = [ 'others': [ { 'path': 'std::intrinsics::simd', 'name': 'simd_as' }, { 'path': 'std::intrinsics::simd', 'name': 'simd_cast' }, - { 'path': 'std::intrinsics', 'name': 'transmute' }, + { 'path': 'std::mem', 'name': 'transmute' }, ], }, ]; diff --git a/tests/rustdoc-js-std/transmute.js b/tests/rustdoc-js-std/transmute.js index 0e52e21e0de..f52e0ab1436 100644 --- a/tests/rustdoc-js-std/transmute.js +++ b/tests/rustdoc-js-std/transmute.js @@ -1,3 +1,4 @@ +const FILTER_CRATE = "std"; const EXPECTED = [ { // Keep this test case identical to `transmute-fail`, except the @@ -6,7 +7,7 @@ const EXPECTED = [ 'others': [ { 'path': 'std::intrinsics::simd', 'name': 'simd_as' }, { 'path': 'std::intrinsics::simd', 'name': 'simd_cast' }, - { 'path': 'std::intrinsics', 'name': 'transmute' }, + { 'path': 'std::mem', 'name': 'transmute' }, ], }, ]; -- cgit 1.4.1-3-g733a5