mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-13 07:24:00 +00:00
Rollup merge of #127418 - GuillaumeGomez:wrap-too-long-type-name, r=notriddle
Wrap too long type name Fixes https://github.com/rust-lang/rust/issues/120595. Takeover of #126209. cc `@BradMarr` r? `@notriddle`
This commit is contained in:
commit
7c1bf86417
@ -2174,6 +2174,14 @@ in src-script.js and main.js
|
||||
padding: 2px 4px;
|
||||
box-shadow: 0 0 4px var(--main-background-color);
|
||||
}
|
||||
|
||||
.item-table > li > .item-name {
|
||||
width: 33%;
|
||||
}
|
||||
.item-table > li > div {
|
||||
padding-bottom: 5px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
@ -117,6 +117,7 @@ pub mod too_long {
|
||||
pub type ReallyLongTypeNameLongLongLong =
|
||||
Option<unsafe extern "C" fn(a: *const u8, b: *const u8) -> *const u8>;
|
||||
|
||||
/// Short doc.
|
||||
pub const ReallyLongTypeNameLongLongLongConstBecauseWhyNotAConstRightGigaGigaSupraLong: u32 = 0;
|
||||
|
||||
/// This also has a really long doccomment. Lorem ipsum dolor sit amet,
|
||||
|
@ -16,7 +16,11 @@ assert-property: ("pre.item-decl", {"scrollWidth": "1324"})
|
||||
|
||||
// In the table-ish view on the module index, the name should not be wrapped more than necessary.
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/too_long/index.html"
|
||||
assert-property: (".item-table .struct", {"offsetWidth": "684"})
|
||||
|
||||
// We'll ensure that items with short documentation have the same width.
|
||||
store-property: ("//*[@class='item-table']//*[@class='struct']/..", {"offsetWidth": offset_width})
|
||||
assert: |offset_width| == "277"
|
||||
assert-property: ("//*[@class='item-table']//*[@class='constant']/..", {"offsetWidth": |offset_width|})
|
||||
|
||||
// We now make the same check on type declaration...
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/too_long/type.ReallyLongTypeNameLongLongLong.html"
|
||||
|
Loading…
Reference in New Issue
Block a user