error[E0623]: lifetime mismatch --> $DIR/issue-63388-1.rs:14:9 | LL | &'a self, foo: &dyn Foo | -------- this parameter and the return type are declared with different lifetimes... LL | ) -> &dyn Foo | -------- LL | { LL | foo | ^^^ ...but data from `foo` is returned here error: aborting due to previous error For more information about this error, try `rustc --explain E0623`.