ci: ui tests for 1.63
This commit is contained in:
parent
db177a07ad
commit
987858f5fa
|
@ -52,6 +52,7 @@ fn _test_compile_errors() {
|
|||
tests_rust_1_58(&t);
|
||||
tests_rust_1_60(&t);
|
||||
tests_rust_1_62(&t);
|
||||
tests_rust_1_63(&t);
|
||||
|
||||
#[rustversion::since(1.49)]
|
||||
fn tests_rust_1_49(t: &trybuild::TestCases) {
|
||||
|
@ -85,9 +86,6 @@ fn _test_compile_errors() {
|
|||
fn tests_rust_1_58(t: &trybuild::TestCases) {
|
||||
t.compile_fail("tests/ui/invalid_pyfunctions.rs");
|
||||
t.compile_fail("tests/ui/invalid_pymethods.rs");
|
||||
t.compile_fail("tests/ui/not_send.rs");
|
||||
t.compile_fail("tests/ui/not_send2.rs");
|
||||
t.compile_fail("tests/ui/not_send3.rs");
|
||||
#[cfg(Py_LIMITED_API)]
|
||||
t.compile_fail("tests/ui/abi3_nativetype_inheritance.rs");
|
||||
}
|
||||
|
@ -107,12 +105,22 @@ fn _test_compile_errors() {
|
|||
#[rustversion::since(1.62)]
|
||||
fn tests_rust_1_62(t: &trybuild::TestCases) {
|
||||
t.compile_fail("tests/ui/invalid_pymethod_receiver.rs");
|
||||
t.compile_fail("tests/ui/invalid_result_conversion.rs");
|
||||
t.compile_fail("tests/ui/missing_intopy.rs");
|
||||
}
|
||||
|
||||
#[rustversion::before(1.62)]
|
||||
fn tests_rust_1_62(_t: &trybuild::TestCases) {}
|
||||
|
||||
#[rustversion::since(1.63)]
|
||||
fn tests_rust_1_63(t: &trybuild::TestCases) {
|
||||
t.compile_fail("tests/ui/invalid_result_conversion.rs");
|
||||
t.compile_fail("tests/ui/not_send.rs");
|
||||
t.compile_fail("tests/ui/not_send2.rs");
|
||||
t.compile_fail("tests/ui/not_send3.rs");
|
||||
}
|
||||
|
||||
#[rustversion::before(1.63)]
|
||||
fn tests_rust_1_63(_t: &trybuild::TestCases) {}
|
||||
}
|
||||
|
||||
#[cfg(feature = "nightly")]
|
||||
|
|
|
@ -4,7 +4,16 @@ error[E0599]: no method named `assert_into_py_result` found for enum `Result` in
|
|||
21 | #[pyfunction]
|
||||
| ^^^^^^^^^^^^^ method not found in `Result<(), MyError>`
|
||||
|
|
||||
note: the method `assert_into_py_result` exists on the type `()`
|
||||
--> src/impl_/ghost.rs
|
||||
|
|
||||
| fn assert_into_py_result(&mut self) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: use the `?` operator to extract the `()` value, propagating a `Result::Err` value to the caller
|
||||
|
|
||||
21 | #[pyfunction]?
|
||||
| +
|
||||
|
||||
error[E0277]: the trait bound `Result<(), MyError>: IntoPyCallbackOutput<_>` is not satisfied
|
||||
--> tests/ui/invalid_result_conversion.rs:21:1
|
||||
|
|
|
@ -11,7 +11,11 @@ error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safe
|
|||
= 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<'_>`
|
||||
= note: required because it appears within the type `[closure@$DIR/tests/ui/not_send.rs:4:22: 4:38]`
|
||||
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:38]`
|
||||
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
|
||||
--> src/marker.rs
|
||||
|
|
|
@ -9,7 +9,14 @@ error[E0277]: `UnsafeCell<PyObject>` cannot be shared between threads safely
|
|||
= 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`
|
||||
= note: required because it appears within the type `[closure@$DIR/tests/ui/not_send2.rs:8:26: 10:10]`
|
||||
note: required because it's used within this closure
|
||||
--> tests/ui/not_send2.rs:8:26
|
||||
|
|
||||
8 | py.allow_threads(|| {
|
||||
| __________________________^
|
||||
9 | | println!("{:?}", string);
|
||||
10 | | });
|
||||
| |_________^
|
||||
= note: required because of the requirements on the impl of `Ungil` for `[closure@$DIR/tests/ui/not_send2.rs:8:26: 10:10]`
|
||||
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
|
||||
--> src/marker.rs
|
||||
|
|
|
@ -6,7 +6,14 @@ error[E0277]: `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>`
|
||||
= note: required because it appears within the type `[closure@$DIR/tests/ui/not_send3.rs:8:26: 10:10]`
|
||||
note: required because it's used within this closure
|
||||
--> tests/ui/not_send3.rs:8:26
|
||||
|
|
||||
8 | py.allow_threads(|| {
|
||||
| __________________________^
|
||||
9 | | println!("{:?}", rc);
|
||||
10 | | });
|
||||
| |_________^
|
||||
= note: required because of the requirements on the impl of `Ungil` for `[closure@$DIR/tests/ui/not_send3.rs:8:26: 10:10]`
|
||||
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
|
||||
--> src/marker.rs
|
||||
|
|
Loading…
Reference in a new issue