warning: method `foo` is never used
  --> $DIR/method-return-trait-object-14399.rs:13:14
   |
LL | trait A { fn foo(&self) {} }
   |       -      ^^^
   |       |
   |       method in this trait
   |
   = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

warning: 1 warning emitted

