error: lifetime may not live long enough --> tests/ui/wrong_aspyref_lifetimes.rs:7:47 | 7 | let dict: &PyDict = Python::with_gil(|py| dict.as_ref(py)); | --- ^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` | | | | | return type of closure is &'2 PyDict | has type `pyo3::Python<'1>`