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
|
error[E0277]: the trait bound `PyDict: PyClass` is not satisfied
|
||||||
--> tests/ui/abi3_nativetype_inheritance.rs:5:1
|
--> tests/ui/abi3_nativetype_inheritance.rs:5:1
|
||||||
|
|
|
|
||||||
5 | #[pyclass(extends=PyDict)]
|
5 | #[pyclass(extends=PyDict)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PyClass` is not implemented for `PyDict`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PyClass` is not implemented for `PyDict`
|
||||||
|
|
|
|
||||||
= help: the trait `PyClass` is implemented for `TestClass`
|
= 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: required by a bound in `ThreadCheckerInherited`
|
note: required by a bound in `ThreadCheckerInherited`
|
||||||
--> src/impl_/pyclass.rs
|
--> src/impl_/pyclass.rs
|
||||||
|
|
|
|
||||||
| pub struct ThreadCheckerInherited<T: PyClass + Send, U: PyClassBaseType>(
|
| pub struct ThreadCheckerInherited<T: PyClass + Send, U: PyClassBaseType>(
|
||||||
| ^^^^^^^^^^^^^^^ required by this bound in `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)
|
= 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
|
error[E0277]: the trait bound `PyDict: PyClass` is not satisfied
|
||||||
--> tests/ui/abi3_nativetype_inheritance.rs:5:1
|
--> 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`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PyClass` is not implemented for `PyDict`
|
||||||
|
|
|
|
||||||
= help: the trait `PyClass` is implemented for `TestClass`
|
= 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)
|
= 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`
|
error[E0271]: type mismatch resolving `<Foo as PyClass>::Frozen == False`
|
||||||
--> tests/ui/invalid_frozen_pyclass_borrow.rs:10:33
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:10:18
|
||||||
|
|
|
|
||||||
10 | let borrow = foo.as_ref(py).borrow_mut();
|
10 | let borrow = foo.as_ref(py).borrow_mut();
|
||||||
| ^^^^^^^^^^ expected struct `False`, found struct `True`
|
| ^^^^^^^^^^^^^^ ---------- required by a bound introduced by this call
|
||||||
|
|
| |
|
||||||
|
| expected struct `False`, found struct `True`
|
||||||
|
|
|
||||||
note: required by a bound in `PyCell::<T>::borrow_mut`
|
note: required by a bound in `PyCell::<T>::borrow_mut`
|
||||||
--> src/pycell.rs
|
--> src/pycell.rs
|
||||||
|
|
|
|
||||||
| T: PyClass<Frozen = False>,
|
| T: PyClass<Frozen = False>,
|
||||||
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
||||||
|
|
||||||
error[E0271]: type mismatch resolving `<ImmutableChild as PyClass>::Frozen == False`
|
error[E0271]: type mismatch resolving `<ImmutableChild as PyClass>::Frozen == False`
|
||||||
--> tests/ui/invalid_frozen_pyclass_borrow.rs:20:35
|
--> tests/ui/invalid_frozen_pyclass_borrow.rs:20:18
|
||||||
|
|
|
|
||||||
20 | let borrow = child.as_ref(py).borrow_mut();
|
20 | let borrow = child.as_ref(py).borrow_mut();
|
||||||
| ^^^^^^^^^^ expected struct `False`, found struct `True`
|
| ^^^^^^^^^^^^^^^^ ---------- required by a bound introduced by this call
|
||||||
|
|
| |
|
||||||
|
| expected struct `False`, found struct `True`
|
||||||
|
|
|
||||||
note: required by a bound in `PyCell::<T>::borrow_mut`
|
note: required by a bound in `PyCell::<T>::borrow_mut`
|
||||||
--> src/pycell.rs
|
--> src/pycell.rs
|
||||||
|
|
|
|
||||||
| T: PyClass<Frozen = False>,
|
| T: PyClass<Frozen = False>,
|
||||||
| ^^^^^^^^^^^^^^ required by this bound in `PyCell::<T>::borrow_mut`
|
| ^^^^^^^^^^^^^^ 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<i16>>
|
||||||
<f64 as From<i32>>
|
<f64 as From<i32>>
|
||||||
<f64 as From<i8>>
|
<f64 as From<i8>>
|
||||||
and 67 others
|
and $N others
|
||||||
= note: required because of the requirements on the impl of `Into<i32>` for `&PyCell<MyClass>`
|
= note: required for `&PyCell<MyClass>` to implement `Into<i32>`
|
||||||
= note: required because of the requirements on the impl of `TryFrom<&PyCell<MyClass>>` for `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<&PyAssertionError>>
|
||||||
<PyErr as From<&PyAttributeError>>
|
<PyErr as From<&PyAttributeError>>
|
||||||
and $N others
|
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)
|
= 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<PyAny>>>
|
||||||
<&'a str as IntoPy<Py<PyString>>>
|
<&'a str as IntoPy<Py<PyString>>>
|
||||||
and $N others
|
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)
|
= 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
|
error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safely
|
||||||
--> tests/ui/not_send.rs:4:8
|
--> tests/ui/not_send.rs:4:22
|
||||||
|
|
|
|
||||||
4 | py.allow_threads(|| { drop(py); });
|
4 | py.allow_threads(|| { drop(py); });
|
||||||
| ^^^^^^^^^^^^^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
|
| ------------- ^^^^^^^^^^^^^^^^ `*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>`
|
| required by a bound introduced by this call
|
||||||
= 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`
|
= help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
|
||||||
= note: required because it appears within the type `(&GILGuard, impl_::not_send::NotSend)`
|
= note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
|
||||||
= note: required because it appears within the type `PhantomData<(&GILGuard, impl_::not_send::NotSend)>`
|
= note: required because it appears within the type `impl_::not_send::NotSend`
|
||||||
= note: required because it appears within the type `pyo3::Python<'_>`
|
= note: required because it appears within the type `(&GILGuard, impl_::not_send::NotSend)`
|
||||||
= note: required because of the requirements on the impl of `Send` for `&pyo3::Python<'_>`
|
= 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
|
note: required because it's used within this closure
|
||||||
--> tests/ui/not_send.rs:4:22
|
--> tests/ui/not_send.rs:4:22
|
||||||
|
|
|
|
||||||
4 | py.allow_threads(|| { drop(py); });
|
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]`
|
= 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`
|
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
|
||||||
--> src/marker.rs
|
--> src/marker.rs
|
||||||
|
|
|
|
||||||
| F: Ungil + FnOnce() -> T,
|
| F: Ungil + FnOnce() -> T,
|
||||||
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`
|
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`
|
||||||
|
|
|
@ -1,22 +1,27 @@
|
||||||
error[E0277]: `UnsafeCell<PyObject>` cannot be shared between threads safely
|
error[E0277]: `UnsafeCell<PyObject>` cannot be shared between threads safely
|
||||||
--> tests/ui/not_send2.rs:8:12
|
--> tests/ui/not_send2.rs:8:26
|
||||||
|
|
|
|
||||||
8 | py.allow_threads(|| {
|
8 | py.allow_threads(|| {
|
||||||
| ^^^^^^^^^^^^^ `UnsafeCell<PyObject>` cannot be shared between threads safely
|
| ____________-------------_^
|
||||||
|
|
| | |
|
||||||
= help: within `&PyString`, the trait `Sync` is not implemented for `UnsafeCell<PyObject>`
|
| | required by a bound introduced by this call
|
||||||
= note: required because it appears within the type `PyAny`
|
9 | | println!("{:?}", string);
|
||||||
= note: required because it appears within the type `PyString`
|
10 | | });
|
||||||
= note: required because it appears within the type `&PyString`
|
| |_________^ `UnsafeCell<PyObject>` cannot be shared between threads safely
|
||||||
= note: required because of the requirements on the impl of `Send` for `&&PyString`
|
|
|
||||||
|
= 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
|
note: required because it's used within this closure
|
||||||
--> tests/ui/not_send2.rs:8:26
|
--> tests/ui/not_send2.rs:8:26
|
||||||
|
|
|
|
||||||
8 | py.allow_threads(|| {
|
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]`
|
= 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`
|
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
|
||||||
--> src/marker.rs
|
--> src/marker.rs
|
||||||
|
|
|
|
||||||
| F: Ungil + FnOnce() -> T,
|
| F: Ungil + FnOnce() -> T,
|
||||||
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`
|
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`
|
||||||
|
|
|
@ -1,19 +1,24 @@
|
||||||
error[E0277]: `Rc<i32>` cannot be shared between threads safely
|
error[E0277]: `Rc<i32>` cannot be shared between threads safely
|
||||||
--> tests/ui/not_send3.rs:8:12
|
--> tests/ui/not_send3.rs:8:26
|
||||||
|
|
|
|
||||||
8 | py.allow_threads(|| {
|
8 | py.allow_threads(|| {
|
||||||
| ^^^^^^^^^^^^^ `Rc<i32>` cannot be shared between threads safely
|
| ____________-------------_^
|
||||||
|
|
| | |
|
||||||
= help: the trait `Sync` is not implemented for `Rc<i32>`
|
| | required by a bound introduced by this call
|
||||||
= note: required because of the requirements on the impl of `Send` for `&Rc<i32>`
|
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
|
note: required because it's used within this closure
|
||||||
--> tests/ui/not_send3.rs:8:26
|
--> tests/ui/not_send3.rs:8:26
|
||||||
|
|
|
|
||||||
8 | py.allow_threads(|| {
|
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]`
|
= 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`
|
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
|
||||||
--> src/marker.rs
|
--> src/marker.rs
|
||||||
|
|
|
|
||||||
| F: Ungil + FnOnce() -> T,
|
| F: Ungil + FnOnce() -> T,
|
||||||
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`
|
| ^^^^^ required by this bound in `pyo3::Python::<'py>::allow_threads`
|
||||||
|
|
Loading…
Reference in a new issue