pyo3/tests/ui/wrong_aspyref_lifetimes.stderr
Icxolu c359f5ca1d
deprecate PyDict::new constructor (#3823)
* deprecate `PyDict::new`

* update benchmarks

* convert `test_frompyobject`
2024-02-11 23:55:56 +00:00

9 lines
560 B
Plaintext

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