diff --git a/src/test/rustdoc-gui/lib.rs b/src/test/rustdoc-gui/lib.rs index 3c996f5b65c..15d8dcc6e84 100644 --- a/src/test/rustdoc-gui/lib.rs +++ b/src/test/rustdoc-gui/lib.rs @@ -27,6 +27,11 @@ pub fn foo() {} /// Just a normal struct. pub struct Foo; +impl Foo { + #[must_use] + pub fn must_use(&self) -> bool { true } +} + /// Just a normal enum. pub enum WhoLetTheDogOut { /// Woof! diff --git a/src/test/rustdoc-gui/nojs-attr-pos.goml b/src/test/rustdoc-gui/nojs-attr-pos.goml new file mode 100644 index 00000000000..35daa4cb9e3 --- /dev/null +++ b/src/test/rustdoc-gui/nojs-attr-pos.goml @@ -0,0 +1,5 @@ +// Check that the attributes are well positioned when javascript is disabled (since +// there is no toggle to display) +javascript: false +goto: file://|DOC_PATH|/struct.Foo.html +assert: (".attributes", {"margin-left": "0px"})