about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-01-23 14:31:35 -0700
committerMichael Howell <michael@notriddle.com>2023-01-23 14:31:35 -0700
commit57ca36861d35dd1f75d8b51dd975c884bb2c6872 (patch)
treea7157e12a158859ff920c7f419f9bf54db70c721 /src/librustdoc/html
parentc8e6a9e8b6251bbc8276cb78cabe1998deecbed7 (diff)
downloadrust-57ca36861d35dd1f75d8b51dd975c884bb2c6872.tar.gz
rust-57ca36861d35dd1f75d8b51dd975c884bb2c6872.zip
rustdoc: make item links consistently use `title="{shortty} {path}"`
The ordering in item tables was flipped in 3030cbea957adbd560bf2eaa34c1b8a56daee16a, making it
inconsistent with the ordering in method signatures.

Compare these:

https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/render/print_item.rs#L455-L459

https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/format.rs#L903-L908
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render/print_item.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index f824c9e3ad2..a09f309502a 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -452,7 +452,7 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
                     stab = stab.unwrap_or_default(),
                     unsafety_flag = unsafety_flag,
                     href = item_path(myitem.type_(), myitem.name.unwrap().as_str()),
-                    title = [full_path(cx, myitem), myitem.type_().to_string()]
+                    title = [myitem.type_().to_string(), full_path(cx, myitem)]
                         .iter()
                         .filter_map(|s| if !s.is_empty() { Some(s.as_str()) } else { None })
                         .collect::<Vec<_>>()