warning: method `foo` is never used --> $DIR/issue-17351.rs:4:16 | LL | trait Str { fn foo(&self) {} } | --- ^^^ | | | method in this trait | = note: `#[warn(dead_code)]` on by default warning: 1 warning emitted