Open
Description
I expect the following code (Playpen) to emit a warning on the last line of main
that the result of s.the_must_use_fn()
must be used.
fn main () {
let s = Struct;
s.the_must_use_fn();
}
trait Trait {
fn the_must_use_fn(&self) -> String;
}
struct Struct;
impl Trait for Struct {
#[must_use]
fn the_must_use_fn(&self) -> String { "".to_string() }
}
Ref #43302 as the tracking issue for this feature.