rustdoc: make struct fields display: block
This commit is contained in:
parent
e221616639
commit
1c80a5655f
3 changed files with 12 additions and 0 deletions
|
@ -701,6 +701,8 @@ a {
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-section-header {
|
.small-section-header {
|
||||||
|
/* fields use <span> tags, but should get their own lines */
|
||||||
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -408,6 +408,11 @@ pub struct WithGenerics<T: TraitWithNoDocblocks, S = String, E = WhoLetTheDogOut
|
||||||
p: P,
|
p: P,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct StructWithPublicUndocumentedFields {
|
||||||
|
pub first: u32,
|
||||||
|
pub second: u32,
|
||||||
|
}
|
||||||
|
|
||||||
pub const CONST: u8 = 0;
|
pub const CONST: u8 = 0;
|
||||||
|
|
||||||
pub trait TraitWithoutGenerics {
|
pub trait TraitWithoutGenerics {
|
||||||
|
|
5
src/test/rustdoc-gui/struct-fields.goml
Normal file
5
src/test/rustdoc-gui/struct-fields.goml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.StructWithPublicUndocumentedFields.html"
|
||||||
|
|
||||||
|
// Both fields must be on their own line. In other words, they have display: block.
|
||||||
|
store-property: (first_top, "//*[@id='structfield.first']", "offsetTop")
|
||||||
|
assert-property-false: ("//*[@id='structfield.second']", { "offsetTop": |first_top| })
|
Loading…
Add table
Add a link
Reference in a new issue