From c267acee8ca271935bc68c4f4822394623da7b4b Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Wed, 13 Jul 2022 08:06:14 +0100 Subject: [PATCH] ci: fix nightly UI tests --- tests/ui/not_send_auto_trait.stderr | 8 ++++---- tests/ui/not_send_auto_trait2.stderr | 20 +++++++------------- tests/ui/send_wrapper.stderr | 22 +++++++--------------- 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/tests/ui/not_send_auto_trait.stderr b/tests/ui/not_send_auto_trait.stderr index b98186725e4..a769d7e8c46 100644 --- a/tests/ui/not_send_auto_trait.stderr +++ b/tests/ui/not_send_auto_trait.stderr @@ -1,17 +1,17 @@ -error[E0277]: the trait bound `pyo3::Python<'_>: Ungil` is not satisfied in `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:38]` +error[E0277]: the trait bound `pyo3::Python<'_>: Ungil` is not satisfied in `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:24]` --> tests/ui/not_send_auto_trait.rs:4:8 | 4 | py.allow_threads(|| { drop(py); }); - | ^^^^^^^^^^^^^ ---------------- within this `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:38]` + | ^^^^^^^^^^^^^ -- within this `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:24]` | | - | within `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:38]`, the trait `Ungil` is not implemented for `pyo3::Python<'_>` + | within `[closure@$DIR/tests/ui/not_send_auto_trait.rs:4:22: 4:24]`, the trait `Ungil` is not implemented for `pyo3::Python<'_>` | = note: required because it appears within the type `&pyo3::Python<'_>` note: required because it's used within this closure --> tests/ui/not_send_auto_trait.rs:4:22 | 4 | py.allow_threads(|| { drop(py); }); - | ^^^^^^^^^^^^^^^^ + | ^^ note: required by a bound in `pyo3::Python::<'py>::allow_threads` --> src/marker.rs | diff --git a/tests/ui/not_send_auto_trait2.stderr b/tests/ui/not_send_auto_trait2.stderr index 1b721350dff..3aedb37c603 100644 --- a/tests/ui/not_send_auto_trait2.stderr +++ b/tests/ui/not_send_auto_trait2.stderr @@ -1,13 +1,10 @@ -error[E0277]: the trait bound `PyAny: Ungil` is not satisfied in `[closure@$DIR/tests/ui/not_send_auto_trait2.rs:8:26: 10:10]` +error[E0277]: the trait bound `PyAny: Ungil` is not satisfied in `[closure@$DIR/tests/ui/not_send_auto_trait2.rs:8:26: 8:28]` --> tests/ui/not_send_auto_trait2.rs:8:12 | -8 | py.allow_threads(|| { - | ____________^^^^^^^^^^^^^_- - | | | - | | within `[closure@$DIR/tests/ui/not_send_auto_trait2.rs:8:26: 10:10]`, the trait `Ungil` is not implemented for `PyAny` -9 | | println!("{:?}", string); -10 | | }); - | |_________- within this `[closure@$DIR/tests/ui/not_send_auto_trait2.rs:8:26: 10:10]` +8 | py.allow_threads(|| { + | ^^^^^^^^^^^^^ -- within this `[closure@$DIR/tests/ui/not_send_auto_trait2.rs:8:26: 8:28]` + | | + | within `[closure@$DIR/tests/ui/not_send_auto_trait2.rs:8:26: 8:28]`, the trait `Ungil` is not implemented for `PyAny` | = note: required because it appears within the type `PyString` = note: required because it appears within the type `&PyString` @@ -15,11 +12,8 @@ error[E0277]: the trait bound `PyAny: Ungil` is not satisfied in `[closure@$DIR/ note: required because it's used within this closure --> tests/ui/not_send_auto_trait2.rs:8:26 | -8 | py.allow_threads(|| { - | __________________________^ -9 | | println!("{:?}", string); -10 | | }); - | |_________^ +8 | py.allow_threads(|| { + | ^^ note: required by a bound in `pyo3::Python::<'py>::allow_threads` --> src/marker.rs | diff --git a/tests/ui/send_wrapper.stderr b/tests/ui/send_wrapper.stderr index 23dceb2a495..b24fb106e62 100644 --- a/tests/ui/send_wrapper.stderr +++ b/tests/ui/send_wrapper.stderr @@ -1,14 +1,10 @@ -error[E0277]: the trait bound `PyAny: Ungil` is not satisfied in `[closure@$DIR/tests/ui/send_wrapper.rs:11:26: 14:10]` +error[E0277]: the trait bound `PyAny: Ungil` is not satisfied in `[closure@$DIR/tests/ui/send_wrapper.rs:11:26: 11:28]` --> tests/ui/send_wrapper.rs:11:12 | -11 | py.allow_threads(|| { - | ____________^^^^^^^^^^^^^_- - | | | - | | within `[closure@$DIR/tests/ui/send_wrapper.rs:11:26: 14:10]`, the trait `Ungil` is not implemented for `PyAny` -12 | | let smuggled: &PyString = *wrapped; -13 | | println!("{:?}", smuggled); -14 | | }); - | |_________- within this `[closure@$DIR/tests/ui/send_wrapper.rs:11:26: 14:10]` +11 | py.allow_threads(|| { + | ^^^^^^^^^^^^^ -- within this `[closure@$DIR/tests/ui/send_wrapper.rs:11:26: 11:28]` + | | + | within `[closure@$DIR/tests/ui/send_wrapper.rs:11:26: 11:28]`, the trait `Ungil` is not implemented for `PyAny` | = note: required because it appears within the type `PyString` = note: required because it appears within the type `&PyString` @@ -18,12 +14,8 @@ error[E0277]: the trait bound `PyAny: Ungil` is not satisfied in `[closure@$DIR/ note: required because it's used within this closure --> tests/ui/send_wrapper.rs:11:26 | -11 | py.allow_threads(|| { - | __________________________^ -12 | | let smuggled: &PyString = *wrapped; -13 | | println!("{:?}", smuggled); -14 | | }); - | |_________^ +11 | py.allow_threads(|| { + | ^^ note: required by a bound in `pyo3::Python::<'py>::allow_threads` --> src/marker.rs |