7 fn what(&self) -> Self;
8 // There should be no warning here! (returns a reference)
9 fn what2(&self) -> &Self;
13 // There should be no warning here! (note taking a self argument)
14 pub fn not_new() -> Self {
17 pub fn foo(&self) -> Self {
20 pub fn bar(self) -> Self {
23 // There should be no warning here! (private method)
24 fn foo2(&self) -> Self {
27 // There should be no warning here! (returns a reference)
28 pub fn foo3(&self) -> &Self {
31 // There should be no warning here! (already a `must_use` attribute)
33 pub fn foo4(&self) -> Self {
38 impl Whatever for Bar {
39 // There should be no warning here! (comes from the trait)
40 fn what(&self) -> Self {
43 // There should be no warning here! (comes from the trait)
44 fn what2(&self) -> &Self {
53 // There should be no warning here! (`Foo` already implements `#[must_use]`)
54 fn foo(&self) -> Self {