9 fn handle(value: T) -> Self;
12 // Blanket impl. (If you comment this out, compiler figures out that it
13 // is passing an `&mut` to a method that must be expecting an `&mut`,
14 // and injects an auto-reborrow.)
15 impl<T, U> Trait<U> for T where T: From<U> {
16 fn handle(_: U) -> Self { unimplemented!() }
19 impl<'a, R> Trait<&'a mut Events<R>> for Other {
20 fn handle(_: &'a mut Events<R>) -> Self { unimplemented!() }
23 fn this_compiles<'a, R>(value: &'a mut Events<R>) {
25 Other::handle(&mut *value);
29 fn this_does_not<'a, R>(value: &'a mut Events<R>) {
31 Other::handle(value); //~ ERROR use of moved value: `value`