error[E0760]: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope --> src/util.rs:70:6 | 70 | ) -> Result, sqlx::Error> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> src/util.rs:72:5 | 72 | c.acquire().await?.begin().await | ^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `sqlx::Acquire<'static>` found type `sqlx::Acquire<'a>` note: the lifetime `'a` as defined on the function body at 68:36... --> src/util.rs:68:36 | 68 | pub async fn sql_start_transaction<'a, T: Acquire<'a>>( | ^^ = note: ...does not necessarily outlive the static lifetime