Merge pull request #2721 from messense/clippy-1.65
Update ui tests for Rust 1.65.0
This commit is contained in:
commit
2ea8fbfbce
|
@ -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<T: PyClass + Send, U: PyClassBaseType>(
|
||||
| ^^^^^^^^^^^^^^^ 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<T: PyClass + Send, U: PyClassBaseType>(
|
||||
| ^^^^^^^^^^^^^^^ 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)
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
error[E0271]: type mismatch resolving `<Foo as PyClass>::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::<T>::borrow_mut`
|
||||
--> src/pycell.rs
|
||||
|
|
||||
| T: PyClass<Frozen = False>,
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
||||
--> src/pycell.rs
|
||||
|
|
||||
| T: PyClass<Frozen = False>,
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
||||
|
||||
error[E0271]: type mismatch resolving `<ImmutableChild as PyClass>::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::<T>::borrow_mut`
|
||||
--> src/pycell.rs
|
||||
|
|
||||
| T: PyClass<Frozen = False>,
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
||||
--> src/pycell.rs
|
||||
|
|
||||
| T: PyClass<Frozen = False>,
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
||||
|
|
|
@ -13,6 +13,6 @@ error[E0277]: the trait bound `i32: From<&PyCell<MyClass>>` is not satisfied
|
|||
<f64 as From<i16>>
|
||||
<f64 as From<i32>>
|
||||
<f64 as From<i8>>
|
||||
and 67 others
|
||||
= note: required because of the requirements on the impl of `Into<i32>` for `&PyCell<MyClass>`
|
||||
= note: required because of the requirements on the impl of `TryFrom<&PyCell<MyClass>>` for `i32`
|
||||
and $N others
|
||||
= note: required for `&PyCell<MyClass>` to implement `Into<i32>`
|
||||
= note: required for `i32` to implement `TryFrom<&PyCell<MyClass>>`
|
||||
|
|
|
@ -14,5 +14,5 @@ error[E0277]: the trait bound `PyErr: From<MyError>` is not satisfied
|
|||
<PyErr as From<&PyAssertionError>>
|
||||
<PyErr as From<&PyAttributeError>>
|
||||
and $N others
|
||||
= note: required because of the requirements on the impl of `Into<PyErr>` for `MyError`
|
||||
= 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)
|
||||
|
|
|
@ -14,5 +14,5 @@ error[E0277]: the trait bound `Blah: IntoPy<Py<PyAny>>` is not satisfied
|
|||
<&'a str as IntoPy<Py<PyAny>>>
|
||||
<&'a str as IntoPy<Py<PyString>>>
|
||||
and $N others
|
||||
= note: required because of the requirements on the impl of `OkWrap<Blah>` for `Blah`
|
||||
= note: required for `Blah` to implement `OkWrap<Blah>`
|
||||
= note: this error originates in the attribute macro `pyo3::pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -1,22 +1,27 @@
|
|||
error[E0277]: `UnsafeCell<PyObject>` cannot be shared between threads safely
|
||||
--> tests/ui/not_send2.rs:8:12
|
||||
|
|
||||
8 | py.allow_threads(|| {
|
||||
| ^^^^^^^^^^^^^ `UnsafeCell<PyObject>` cannot be shared between threads safely
|
||||
|
|
||||
= help: within `&PyString`, the trait `Sync` is not implemented for `UnsafeCell<PyObject>`
|
||||
= 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<PyObject>` cannot be shared between threads safely
|
||||
|
|
||||
= help: within `&PyString`, the trait `Sync` is not implemented for `UnsafeCell<PyObject>`
|
||||
= 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`
|
||||
|
|
|
@ -1,19 +1,24 @@
|
|||
error[E0277]: `Rc<i32>` cannot be shared between threads safely
|
||||
--> tests/ui/not_send3.rs:8:12
|
||||
|
|
||||
8 | py.allow_threads(|| {
|
||||
| ^^^^^^^^^^^^^ `Rc<i32>` cannot be shared between threads safely
|
||||
|
|
||||
= help: the trait `Sync` is not implemented for `Rc<i32>`
|
||||
= note: required because of the requirements on the impl of `Send` for `&Rc<i32>`
|
||||
--> tests/ui/not_send3.rs:8:26
|
||||
|
|
||||
8 | py.allow_threads(|| {
|
||||
| ____________-------------_^
|
||||
| | |
|
||||
| | required by a bound introduced by this call
|
||||
9 | | println!("{:?}", rc);
|
||||
10 | | });
|
||||
| |_________^ `Rc<i32>` cannot be shared between threads safely
|
||||
|
|
||||
= help: the trait `Sync` is not implemented for `Rc<i32>`
|
||||
= note: required for `&Rc<i32>` 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`
|
||||
|
|
Loading…
Reference in a new issue