You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading from 0.16 to 0.18 I'm seeing the following compiler error:
error[E0716]: temporary value dropped while borrowed
--> src/externs/interface.rs:1024:17
|
1021 | #[pyfunction]
| -------------
| | |
| | temporary value is freed at the end of this statement
| borrow later used here
...
1024 | py_scheduler: &'py PyScheduler,
| ^ creates a temporary value which is freed while still in use
|
= note: consider using a `let` binding to create a longer lived value
3142: Do not store return values in locals so that holders benefit from lifetime extension for temporaries. r=davidhewitt a=adamreichold
Closes#3138
Co-authored-by: Adam Reichold <adam.reichold@t-online.de>
Bug Description
👋 Love PyO3!
Upgrading from
0.16
to0.18
I'm seeing the following compiler error:The code in question looks like:
Steps to Reproduce
(Try and compile the code)
Backtrace
No response
Your operating system and version
Ubuntu 20
Your Python version (
python --version
)3.8
Your Rust version (
rustc --version
)rustc 1.69.0 (84c898d65 2023-04-16)
Your PyO3 version
0.18.3
How did you install python? Did you use a virtualenv?
apt
and no venvAdditional Info
No response
The text was updated successfully, but these errors were encountered: