Skip to content

Commit 1176413

Browse files
authored
Rollup merge of #142788 - lolbinarycat:core-AsciiChar-alias, r=tgross35
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.
2 parents 24f797e + 8d18f3d commit 1176413

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

library/core/src/ascii.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use crate::iter::FusedIterator;
1515
use crate::num::NonZero;
1616

1717
mod ascii_char;
18+
#[doc(alias("AsciiChar"))]
1819
#[unstable(feature = "ascii_char", issue = "110998")]
1920
pub use ascii_char::AsciiChar as Char;
2021

tests/rustdoc-js-std/doc-alias-use.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// AsciiChar has a doc alias on its reexport and we
2+
// want to make sure that actually works correctly,
3+
// since apperently there are no other tests for this.
4+
5+
const EXPECTED = [
6+
{
7+
'query': 'AsciiChar',
8+
'others': [
9+
{ 'path': 'core::ascii', 'name': 'Char' },
10+
],
11+
},
12+
];

0 commit comments

Comments
 (0)