about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2025-06-20 11:09:45 -0500
committerbinarycat <binarycat@envs.net>2025-06-20 11:11:51 -0500
commit8d18f3d609e9e31da8a3c2bb1613499d5ba0fe9a (patch)
tree8773f4a92ff92000ca400f79fc4b62ebd9e9e43a
parent255aa220821c05c3eac7605fce4ea1c9ab2cbdb4 (diff)
downloadrust-8d18f3d609e9e31da8a3c2bb1613499d5ba0fe9a.tar.gz
rust-8d18f3d609e9e31da8a3c2bb1613499d5ba0fe9a.zip
add doc(alias("AsciiChar")) to core::ascii::Char
Added it to the reexported, which is intended
rustdoc behavior, but is apparently untested,
so I also added a test for it.
-rw-r--r--library/core/src/ascii.rs1
-rw-r--r--tests/rustdoc-js-std/doc-alias-use.js12
2 files changed, 13 insertions, 0 deletions
diff --git a/library/core/src/ascii.rs b/library/core/src/ascii.rs
index d3c6c046e71..f5e62803043 100644
--- a/library/core/src/ascii.rs
+++ b/library/core/src/ascii.rs
@@ -15,6 +15,7 @@ use crate::iter::FusedIterator;
 use crate::num::NonZero;
 
 mod ascii_char;
+#[doc(alias("AsciiChar"))]
 #[unstable(feature = "ascii_char", issue = "110998")]
 pub use ascii_char::AsciiChar as Char;
 
diff --git a/tests/rustdoc-js-std/doc-alias-use.js b/tests/rustdoc-js-std/doc-alias-use.js
new file mode 100644
index 00000000000..e08d94533a9
--- /dev/null
+++ b/tests/rustdoc-js-std/doc-alias-use.js
@@ -0,0 +1,12 @@
+// AsciiChar has a doc alias on its reexport and we
+// want to make sure that actually works correctly,
+// since apperently there are no other tests for this.
+
+const EXPECTED = [
+    {
+        'query': 'AsciiChar',
+        'others': [
+            { 'path': 'core::ascii', 'name': 'Char' },
+        ],
+    },
+];