Skip to content

Commit 40adb9a

Browse files
Add test to ensure the attributes position when js is disabled
1 parent 09cb840 commit 40adb9a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/test/rustdoc-gui/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ pub fn foo() {}
2727
/// Just a normal struct.
2828
pub struct Foo;
2929

30+
impl Foo {
31+
#[must_use]
32+
pub fn must_use(&self) -> bool { true }
33+
}
34+
3035
/// Just a normal enum.
3136
pub enum WhoLetTheDogOut {
3237
/// Woof!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Check that the attributes are well positioned when javascript is disabled (since
2+
// there is no toggle to display)
3+
javascript: false
4+
goto: file://|DOC_PATH|/struct.Foo.html
5+
assert: (".attributes", {"margin-left": "0px"})

0 commit comments

Comments
 (0)