error[E0435]: attempt to use a non-constant value in a constant --> tests/ui/invalid_intern_arg.rs:5:61 | 5 | Python::with_gil(|py| py.import_bound(pyo3::intern!(py, _foo)).unwrap()); | ------------------^^^^- | | | | | non-constant value | help: consider using `let` instead of `static`: `let INTERNED` error: lifetime may not live long enough --> tests/ui/invalid_intern_arg.rs:5:27 | 5 | Python::with_gil(|py| py.import_bound(pyo3::intern!(py, _foo)).unwrap()); | --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` | | | | | return type of closure is pyo3::Bound<'2, PyModule> | has type `Python<'1>`