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