]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/trait-attributes.rs
Auto merge of #61339 - jridgewell:pointer-alignment, r=BurntSushi
[rust.git] / src / test / rustdoc / trait-attributes.rs
1 #![crate_name = "foo"]
2
3 // ignore-tidy-linelength
4
5 pub trait Foo {
6     // @has foo/trait.Foo.html '//h3[@id="tymethod.foo"]//span[@class="docblock attributes"]' '#[must_use]'
7     #[must_use]
8     fn foo();
9 }
10
11 #[must_use]
12 pub struct Bar;
13
14 impl Bar {
15     // @has foo/struct.Bar.html '//h4[@id="method.bar"]//span[@class="docblock attributes"]' '#[must_use]'
16     #[must_use]
17     pub fn bar() {}
18
19     // @has foo/struct.Bar.html '//h4[@id="method.bar2"]//span[@class="docblock attributes"]' '#[must_use]'
20     #[must_use]
21     pub fn bar2() {}
22 }