diff --git a/tests/ui/not_send_auto_trait.stderr b/tests/ui/not_send_auto_trait.stderr index b9818672..a769d7e8 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 1b721350..3aedb37c 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 23dceb2a..b24fb106 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 |