-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
72 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,47 @@ | ||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
--> tests/ui/traverse.rs:10:26 | ||
| | ||
10 | fn __traverse__(slf: PyRef<Self>, visit: PyVisit) -> Result<(), PyTraverseError> { | ||
| ^^^^^ | ||
|
||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
--> tests/ui/traverse.rs:20:26 | ||
| | ||
20 | fn __traverse__(slf: PyRefMut<Self>, visit: PyVisit) -> Result<(), PyTraverseError> { | ||
| ^^^^^^^^ | ||
|
||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
--> tests/ui/traverse.rs:30:26 | ||
| | ||
30 | fn __traverse__(slf: Bound<'_, Self>, visit: PyVisit) -> Result<(), PyTraverseError> { | ||
| ^^^^^ | ||
|
||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
error: __traverse__ may not take a receiver other than `&self`. Usually, an implementation of `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
--> tests/ui/traverse.rs:40:21 | ||
| | ||
40 | fn __traverse__(&mut self, visit: PyVisit) -> Result<(), PyTraverseError> { | ||
| ^ | ||
|
||
error: __traverse__ may not take `Python`. Usually, an implementation of `__traverse__` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
--> tests/ui/traverse.rs:60:32 | ||
error: `__traverse__` has to have the following signature: `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` | ||
--> tests/ui/traverse.rs:60:8 | ||
| | ||
60 | fn __traverse__(&self, py: Python<'_>, visit: PyVisit<'_>) -> Result<(), PyTraverseError> { | ||
60 | fn __traverse__(&self) -> Result<(), PyTraverseError> { | ||
| ^^^^^^^^^^^^ | ||
|
||
error: `__traverse__` has to have the following signature: `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` | ||
--> tests/ui/traverse.rs:70:8 | ||
| | ||
70 | fn __traverse__(&self, arg: &Bound<'_, PyAny>) -> Result<(), PyTraverseError> { | ||
| ^^^^^^^^^^^^ | ||
|
||
error: `__traverse__` has to have the following signature: `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` | ||
--> tests/ui/traverse.rs:80:8 | ||
| | ||
80 | fn __traverse__(&self, visit: PyVisit, arg: &Bound<'_, PyAny>) -> Result<(), PyTraverseError> { | ||
| ^^^^^^^^^^^^ | ||
|
||
error: __traverse__ may not take `Python`. Usually, an implementation of `__traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>` should do nothing but calls to `visit.call`. Most importantly, safe access to the GIL is prohibited inside implementations of `__traverse__`, i.e. `Python::with_gil` will panic. | ||
--> tests/ui/traverse.rs:90:32 | ||
| | ||
90 | fn __traverse__(&self, py: Python<'_>, visit: PyVisit<'_>) -> Result<(), PyTraverseError> { | ||
| ^^^^^^^^^^ |