//@ run-pass use std::collections::HashMap; trait Graph { fn f(&self, _: Edge); //~ WARN methods `f` and `g` are never used fn g(&self, _: Node); } impl Graph for HashMap { fn f(&self, _e: E) { panic!(); } fn g(&self, _e: isize) { panic!(); } } pub fn main() { let g : Box> = Box::new(HashMap::new()); let _g2 : Box> = g as Box>; }