// run-pass // Tests that unary structs can be mutably borrowed. struct Empty; trait T { fn next(&mut self) -> Option; } impl T for Empty { fn next(&mut self) -> Option { None } } fn do_something_with(a : &mut dyn T) { println!("{:?}", a.next()) } pub fn main() { do_something_with(&mut Empty); }