Skip to content

Commit

Permalink
expose new downcast errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Dec 20, 2023
1 parent 715b2d7 commit a852026
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@
pub use crate::class::*;
pub use crate::conversion::{AsPyPointer, FromPyObject, FromPyPointer, IntoPy, ToPyObject};
pub use crate::conversion::{PyTryFrom, PyTryInto};
pub use crate::err::{PyDowncastError, PyErr, PyErrArguments, PyResult};
pub use crate::err::{
PyDowncastError, PyDowncastError2, PyDowncastIntoError, PyErr, PyErrArguments, PyResult,
};
pub use crate::gil::GILPool;
#[cfg(not(PyPy))]
pub use crate::gil::{prepare_freethreaded_python, with_embedded_python_interpreter};
Expand Down
14 changes: 3 additions & 11 deletions tests/ui/invalid_result_conversion.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@ error[E0277]: the trait bound `PyErr: From<MyError>` is not satisfied
| ^^^^^^^^^^^^^ the trait `From<MyError>` is not implemented for `PyErr`
|
= help: the following other types implement trait `From<T>`:
<PyErr as From<std::io::Error>>
<PyErr as From<PyBorrowError>>
<PyErr as From<PyBorrowMutError>>
<PyErr as From<std::io::Error>>
<<<<<<< HEAD
<PyErr as From<PyDowncastError<'a>>>
<PyErr as From<pyo3::err::PyDowncastError2<'_, '_>>>
<PyErr as From<pyo3::err::PyDowncastIntoError<'_>>>
<PyErr as From<NulError>>
<PyErr as From<IntoStringError>>
=======
<PyErr as From<PyDowncastError<'_>>>
<PyErr as From<pyo3::err::PyDowncastIntoError<'_>>>
<PyErr as From<PyDowncastError2<'_, '_>>>
<PyErr as From<PyDowncastIntoError<'_>>>
<PyErr as From<NulError>>
<PyErr as From<IntoStringError>>
<PyErr as From<FromUtf8Error>>
>>>>>>> b2f51c93b (fixup benchmarks)
and $N others
= note: required for `MyError` to implement `Into<PyErr>`
= note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)

0 comments on commit a852026

Please sign in to comment.