Skip to content

Commit b0aaa38

Browse files
committed
rustdoc: Fix mismatched capitalization in sidebar
Previously, the main content used "Aliased Type", while the sidebar said "Aliased type". Now, they both say "Aliased Type", which is the more common capitalization in Rustdoc. See the following link for an example. https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
1 parent b76036c commit b0aaa38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustdoc/html/render/sidebar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ fn sidebar_type_alias<'a>(
357357
deref_id_map: &'a DefIdMap<String>,
358358
) {
359359
if let Some(inner_type) = &t.inner_type {
360-
items.push(LinkBlock::forced(Link::new("aliased-type", "Aliased type"), "type"));
360+
items.push(LinkBlock::forced(Link::new("aliased-type", "Aliased Type"), "type"));
361361
match inner_type {
362362
clean::TypeAliasInnerType::Enum { variants, is_non_exhaustive: _ } => {
363363
let mut variants = variants

tests/rustdoc/type-alias/deref-32077.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ impl<T> Foo for GenericStruct<T> {}
1919
impl Bar for GenericStruct<u32> {}
2020

2121
//@ has 'foo/type.TypedefStruct.html'
22-
// We check that "Aliased type" is also present as a title in the sidebar.
23-
//@ has - '//*[@class="sidebar-elems"]//h3/a[@href="#aliased-type"]' 'Aliased type'
22+
// We check that "Aliased Type" is also present as a title in the sidebar.
23+
//@ has - '//*[@class="sidebar-elems"]//h3/a[@href="#aliased-type"]' 'Aliased Type'
2424
// We check that we have the implementation of the type alias itself.
2525
//@ has - '//*[@id="impl-GenericStruct%3Cu8%3E"]/h3' 'impl TypedefStruct'
2626
//@ has - '//*[@id="method.on_alias"]/h4' 'pub fn on_alias()'

0 commit comments

Comments
 (0)