-
Notifications
You must be signed in to change notification settings - Fork 678
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1455 from PyO3/generate-less-code
Generate less code
- Loading branch information
Showing
5 changed files
with
69 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
error[E0597]: `pool` does not live long enough | ||
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'p` due to conflicting requirements | ||
--> $DIR/static_ref.rs:4:1 | ||
| | ||
4 | #[pyfunction] | ||
| ^^^^^^^^^^^^^ | ||
| | | ||
| borrowed value does not live long enough | ||
| `pool` dropped here while still borrowed | ||
| cast requires that `pool` is borrowed for `'static` | ||
| | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the body at 4:1... | ||
--> $DIR/static_ref.rs:4:1 | ||
| | ||
4 | #[pyfunction] | ||
| ^^^^^^^^^^^^^ | ||
note: ...so that the types are compatible | ||
--> $DIR/static_ref.rs:4:1 | ||
| | ||
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 | ||
--> $DIR/static_ref.rs:4:1 | ||
| | ||
4 | #[pyfunction] | ||
| ^^^^^^^^^^^^^ | ||
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) |