2022-01-01 16:25:03 +00:00
|
|
|
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'py in function call due to conflicting requirements
|
2021-10-12 00:52:24 +00:00
|
|
|
--> tests/ui/static_ref.rs:4:1
|
2020-04-12 07:31:35 +00:00
|
|
|
|
|
2020-05-31 15:15:33 +00:00
|
|
|
4 | #[pyfunction]
|
|
|
|
| ^^^^^^^^^^^^^
|
2020-04-12 07:31:35 +00:00
|
|
|
|
|
2021-12-03 23:29:02 +00:00
|
|
|
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined here...
|
2021-10-12 00:52:24 +00:00
|
|
|
--> tests/ui/static_ref.rs:4:1
|
2021-03-01 11:42:19 +00:00
|
|
|
|
|
|
|
|
4 | #[pyfunction]
|
|
|
|
| ^^^^^^^^^^^^^
|
2022-01-01 16:25:03 +00:00
|
|
|
note: ...so that the expression is assignable
|
2021-10-12 00:52:24 +00:00
|
|
|
--> tests/ui/static_ref.rs:4:1
|
2021-03-01 11:42:19 +00:00
|
|
|
|
|
|
|
|
4 | #[pyfunction]
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
= note: expected `pyo3::Python<'_>`
|
|
|
|
found `pyo3::Python<'_>`
|
|
|
|
= note: but, the lifetime must be valid for the static lifetime...
|
|
|
|
note: ...so that reference does not outlive borrowed content
|
2021-10-12 00:52:24 +00:00
|
|
|
--> tests/ui/static_ref.rs:4:1
|
2021-03-01 11:42:19 +00:00
|
|
|
|
|
|
|
|
4 | #[pyfunction]
|
|
|
|
| ^^^^^^^^^^^^^
|
2021-07-30 22:30:56 +00:00
|
|
|
= note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)
|