error[E0308]: mismatched types --> $DIR/issue-19109.rs:14:5 | 13 | fn function(t: &mut Trait) { | - help: try adding a return type: `-> *mut Trait` 14 | t as *mut Trait | ^^^^^^^^^^^^^^^ expected (), found *-ptr | = note: expected type `()` found type `*mut Trait` error: aborting due to previous error