diff --git a/tests/ui/abi3_nativetype_inheritance.stderr b/tests/ui/abi3_nativetype_inheritance.stderr index 14ca541c..4b4954e8 100644 --- a/tests/ui/abi3_nativetype_inheritance.stderr +++ b/tests/ui/abi3_nativetype_inheritance.stderr @@ -1,17 +1,17 @@ error[E0277]: the trait bound `PyDict: PyClass` is not satisfied - --> tests/ui/abi3_nativetype_inheritance.rs:5:1 - | -5 | #[pyclass(extends=PyDict)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PyClass` is not implemented for `PyDict` - | - = help: the trait `PyClass` is implemented for `TestClass` - = note: required because of the requirements on the impl of `PyClassBaseType` for `PyDict` + --> tests/ui/abi3_nativetype_inheritance.rs:5:1 + | +5 | #[pyclass(extends=PyDict)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PyClass` is not implemented for `PyDict` + | + = help: the trait `PyClass` is implemented for `TestClass` + = note: required for `PyDict` to implement `PyClassBaseType` note: required by a bound in `ThreadCheckerInherited` - --> src/impl_/pyclass.rs - | - | pub struct ThreadCheckerInherited( - | ^^^^^^^^^^^^^^^ required by this bound in `ThreadCheckerInherited` - = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info) + --> src/impl_/pyclass.rs + | + | pub struct ThreadCheckerInherited( + | ^^^^^^^^^^^^^^^ required by this bound in `ThreadCheckerInherited` + = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `PyDict: PyClass` is not satisfied --> tests/ui/abi3_nativetype_inheritance.rs:5:1 @@ -20,5 +20,5 @@ error[E0277]: the trait bound `PyDict: PyClass` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PyClass` is not implemented for `PyDict` | = help: the trait `PyClass` is implemented for `TestClass` - = note: required because of the requirements on the impl of `PyClassBaseType` for `PyDict` + = note: required for `PyDict` to implement `PyClassBaseType` = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/invalid_frozen_pyclass_borrow.stderr b/tests/ui/invalid_frozen_pyclass_borrow.stderr index dccfc4fd..dfd9f350 100644 --- a/tests/ui/invalid_frozen_pyclass_borrow.stderr +++ b/tests/ui/invalid_frozen_pyclass_borrow.stderr @@ -1,23 +1,27 @@ error[E0271]: type mismatch resolving `::Frozen == False` - --> tests/ui/invalid_frozen_pyclass_borrow.rs:10:33 - | -10 | let borrow = foo.as_ref(py).borrow_mut(); - | ^^^^^^^^^^ expected struct `False`, found struct `True` - | + --> tests/ui/invalid_frozen_pyclass_borrow.rs:10:18 + | +10 | let borrow = foo.as_ref(py).borrow_mut(); + | ^^^^^^^^^^^^^^ ---------- required by a bound introduced by this call + | | + | expected struct `False`, found struct `True` + | note: required by a bound in `PyCell::::borrow_mut` - --> src/pycell.rs - | - | T: PyClass, - | ^^^^^^^^^^^^^^ required by this bound in `PyCell::::borrow_mut` + --> src/pycell.rs + | + | T: PyClass, + | ^^^^^^^^^^^^^^ required by this bound in `PyCell::::borrow_mut` error[E0271]: type mismatch resolving `::Frozen == False` - --> tests/ui/invalid_frozen_pyclass_borrow.rs:20:35 - | -20 | let borrow = child.as_ref(py).borrow_mut(); - | ^^^^^^^^^^ expected struct `False`, found struct `True` - | + --> tests/ui/invalid_frozen_pyclass_borrow.rs:20:18 + | +20 | let borrow = child.as_ref(py).borrow_mut(); + | ^^^^^^^^^^^^^^^^ ---------- required by a bound introduced by this call + | | + | expected struct `False`, found struct `True` + | note: required by a bound in `PyCell::::borrow_mut` - --> src/pycell.rs - | - | T: PyClass, - | ^^^^^^^^^^^^^^ required by this bound in `PyCell::::borrow_mut` + --> src/pycell.rs + | + | T: PyClass, + | ^^^^^^^^^^^^^^ required by this bound in `PyCell::::borrow_mut` diff --git a/tests/ui/invalid_pymethod_receiver.stderr b/tests/ui/invalid_pymethod_receiver.stderr index 04d2a032..d480a5c8 100644 --- a/tests/ui/invalid_pymethod_receiver.stderr +++ b/tests/ui/invalid_pymethod_receiver.stderr @@ -13,6 +13,6 @@ error[E0277]: the trait bound `i32: From<&PyCell>` is not satisfied > > > - and 67 others - = note: required because of the requirements on the impl of `Into` for `&PyCell` - = note: required because of the requirements on the impl of `TryFrom<&PyCell>` for `i32` + and $N others + = note: required for `&PyCell` to implement `Into` + = note: required for `i32` to implement `TryFrom<&PyCell>` diff --git a/tests/ui/invalid_result_conversion.stderr b/tests/ui/invalid_result_conversion.stderr index 30dce88c..eb0f8881 100644 --- a/tests/ui/invalid_result_conversion.stderr +++ b/tests/ui/invalid_result_conversion.stderr @@ -14,5 +14,5 @@ error[E0277]: the trait bound `PyErr: From` is not satisfied > > and $N others - = note: required because of the requirements on the impl of `Into` for `MyError` + = note: required for `MyError` to implement `Into` = note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/missing_intopy.stderr b/tests/ui/missing_intopy.stderr index 4f2fe3db..69430705 100644 --- a/tests/ui/missing_intopy.stderr +++ b/tests/ui/missing_intopy.stderr @@ -14,5 +14,5 @@ error[E0277]: the trait bound `Blah: IntoPy>` is not satisfied <&'a str as IntoPy>> <&'a str as IntoPy>> and $N others - = note: required because of the requirements on the impl of `OkWrap` for `Blah` + = note: required for `Blah` to implement `OkWrap` = note: this error originates in the attribute macro `pyo3::pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/not_send.stderr b/tests/ui/not_send.stderr index 6f7c41d3..f2a6f833 100644 --- a/tests/ui/not_send.stderr +++ b/tests/ui/not_send.stderr @@ -1,24 +1,26 @@ error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safely - --> tests/ui/not_send.rs:4:8 - | -4 | py.allow_threads(|| { drop(py); }); - | ^^^^^^^^^^^^^ `*mut pyo3::Python<'static>` cannot be shared between threads safely - | - = help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>` - = note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>` - = note: required because it appears within the type `impl_::not_send::NotSend` - = note: required because it appears within the type `(&GILGuard, impl_::not_send::NotSend)` - = note: required because it appears within the type `PhantomData<(&GILGuard, impl_::not_send::NotSend)>` - = note: required because it appears within the type `pyo3::Python<'_>` - = note: required because of the requirements on the impl of `Send` for `&pyo3::Python<'_>` + --> tests/ui/not_send.rs:4:22 + | +4 | py.allow_threads(|| { drop(py); }); + | ------------- ^^^^^^^^^^^^^^^^ `*mut pyo3::Python<'static>` cannot be shared between threads safely + | | + | required by a bound introduced by this call + | + = help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>` + = note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>` + = note: required because it appears within the type `impl_::not_send::NotSend` + = note: required because it appears within the type `(&GILGuard, impl_::not_send::NotSend)` + = note: required because it appears within the type `PhantomData<(&GILGuard, impl_::not_send::NotSend)>` + = note: required because it appears within the type `pyo3::Python<'_>` + = note: required for `&pyo3::Python<'_>` to implement `Send` note: required because it's used within this closure - --> tests/ui/not_send.rs:4:22 - | -4 | py.allow_threads(|| { drop(py); }); - | ^^ - = note: required because of the requirements on the impl of `Ungil` for `[closure@$DIR/tests/ui/not_send.rs:4:22: 4:24]` + --> tests/ui/not_send.rs:4:22 + | +4 | py.allow_threads(|| { drop(py); }); + | ^^ + = note: required for `[closure@$DIR/tests/ui/not_send.rs:4:22: 4:24]` to implement `Ungil` note: required by a bound in `pyo3::Python::<'py>::allow_threads` - --> src/marker.rs - | - | F: Ungil + FnOnce() -> T, - | ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads` + --> src/marker.rs + | + | F: Ungil + FnOnce() -> T, + | ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads` diff --git a/tests/ui/not_send2.stderr b/tests/ui/not_send2.stderr index 7d229d51..42fe69c2 100644 --- a/tests/ui/not_send2.stderr +++ b/tests/ui/not_send2.stderr @@ -1,22 +1,27 @@ error[E0277]: `UnsafeCell` cannot be shared between threads safely - --> tests/ui/not_send2.rs:8:12 - | -8 | py.allow_threads(|| { - | ^^^^^^^^^^^^^ `UnsafeCell` cannot be shared between threads safely - | - = help: within `&PyString`, the trait `Sync` is not implemented for `UnsafeCell` - = note: required because it appears within the type `PyAny` - = note: required because it appears within the type `PyString` - = note: required because it appears within the type `&PyString` - = note: required because of the requirements on the impl of `Send` for `&&PyString` + --> tests/ui/not_send2.rs:8:26 + | +8 | py.allow_threads(|| { + | ____________-------------_^ + | | | + | | required by a bound introduced by this call +9 | | println!("{:?}", string); +10 | | }); + | |_________^ `UnsafeCell` cannot be shared between threads safely + | + = help: within `&PyString`, the trait `Sync` is not implemented for `UnsafeCell` + = note: required because it appears within the type `PyAny` + = note: required because it appears within the type `PyString` + = note: required because it appears within the type `&PyString` + = note: required for `&&PyString` to implement `Send` note: required because it's used within this closure - --> tests/ui/not_send2.rs:8:26 - | -8 | py.allow_threads(|| { - | ^^ - = note: required because of the requirements on the impl of `Ungil` for `[closure@$DIR/tests/ui/not_send2.rs:8:26: 8:28]` + --> tests/ui/not_send2.rs:8:26 + | +8 | py.allow_threads(|| { + | ^^ + = note: required for `[closure@$DIR/tests/ui/not_send2.rs:8:26: 8:28]` to implement `Ungil` note: required by a bound in `pyo3::Python::<'py>::allow_threads` - --> src/marker.rs - | - | F: Ungil + FnOnce() -> T, - | ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads` + --> src/marker.rs + | + | F: Ungil + FnOnce() -> T, + | ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads` diff --git a/tests/ui/not_send3.stderr b/tests/ui/not_send3.stderr index 0cd88e51..b9289de9 100644 --- a/tests/ui/not_send3.stderr +++ b/tests/ui/not_send3.stderr @@ -1,19 +1,24 @@ error[E0277]: `Rc` cannot be shared between threads safely - --> tests/ui/not_send3.rs:8:12 - | -8 | py.allow_threads(|| { - | ^^^^^^^^^^^^^ `Rc` cannot be shared between threads safely - | - = help: the trait `Sync` is not implemented for `Rc` - = note: required because of the requirements on the impl of `Send` for `&Rc` + --> tests/ui/not_send3.rs:8:26 + | +8 | py.allow_threads(|| { + | ____________-------------_^ + | | | + | | required by a bound introduced by this call +9 | | println!("{:?}", rc); +10 | | }); + | |_________^ `Rc` cannot be shared between threads safely + | + = help: the trait `Sync` is not implemented for `Rc` + = note: required for `&Rc` to implement `Send` note: required because it's used within this closure - --> tests/ui/not_send3.rs:8:26 - | -8 | py.allow_threads(|| { - | ^^ - = note: required because of the requirements on the impl of `Ungil` for `[closure@$DIR/tests/ui/not_send3.rs:8:26: 8:28]` + --> tests/ui/not_send3.rs:8:26 + | +8 | py.allow_threads(|| { + | ^^ + = note: required for `[closure@$DIR/tests/ui/not_send3.rs:8:26: 8:28]` to implement `Ungil` note: required by a bound in `pyo3::Python::<'py>::allow_threads` - --> src/marker.rs - | - | F: Ungil + FnOnce() -> T, - | ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads` + --> src/marker.rs + | + | F: Ungil + FnOnce() -> T, + | ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`