Skip to content

Commit 6c7e782

Browse files
test: ui fix indentation
1 parent d3fcc97 commit 6c7e782

2 files changed

Lines changed: 66 additions & 66 deletions

File tree

tests/ui/not_send.stderr

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safely
22
--> tests/ui/not_send.rs:4:15
3-
|
4-
4 | py.detach(|| { drop(py); });
5-
| ------ ^^^^^^^^^^^^^^^^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
6-
| |
7-
| required by a bound introduced by this call
8-
|
9-
= help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
3+
|
4+
4 | py.detach(|| { drop(py); });
5+
| ------ ^^^^^^^^^^^^^^^^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
6+
| |
7+
| required by a bound introduced by this call
8+
|
9+
= help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
1010
note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
1111
--> $RUST/core/src/marker.rs
12-
|
13-
| pub struct PhantomData<T: PointeeSized>;
14-
| ^^^^^^^^^^^
12+
|
13+
| pub struct PhantomData<T: PointeeSized>;
14+
| ^^^^^^^^^^^
1515
note: required because it appears within the type `pyo3::marker::NotSend`
1616
--> src/marker.rs
17-
|
18-
| struct NotSend(PhantomData<*mut Python<'static>>);
19-
| ^^^^^^^
17+
|
18+
| struct NotSend(PhantomData<*mut Python<'static>>);
19+
| ^^^^^^^
2020
note: required because it appears within the type `PhantomData<pyo3::marker::NotSend>`
2121
--> $RUST/core/src/marker.rs
22-
|
23-
| pub struct PhantomData<T: PointeeSized>;
24-
| ^^^^^^^^^^^
22+
|
23+
| pub struct PhantomData<T: PointeeSized>;
24+
| ^^^^^^^^^^^
2525
note: required because it appears within the type `pyo3::Python<'_>`
2626
--> src/marker.rs
27-
|
28-
| pub struct Python<'py>(PhantomData<&'py AttachGuard>, PhantomData<NotSend>);
29-
| ^^^^^^
30-
= note: required for `&pyo3::Python<'_>` to implement `Send`
27+
|
28+
| pub struct Python<'py>(PhantomData<&'py AttachGuard>, PhantomData<NotSend>);
29+
| ^^^^^^
30+
= note: required for `&pyo3::Python<'_>` to implement `Send`
3131
note: required because it's used within this closure
3232
--> tests/ui/not_send.rs:4:15
33-
|
34-
4 | py.detach(|| { drop(py); });
35-
| ^^
36-
= note: required for `{closure@$DIR/tests/ui/not_send.rs:4:15: 4:17}` to implement `Ungil`
33+
|
34+
4 | py.detach(|| { drop(py); });
35+
| ^^
36+
= note: required for `{closure@$DIR/tests/ui/not_send.rs:4:15: 4:17}` to implement `Ungil`
3737
note: required by a bound in `pyo3::Python::<'py>::detach`
3838
--> src/marker.rs
39-
|
40-
| pub fn detach<T, F>(self, f: F) -> T
41-
| ------ required by a bound in this associated function
42-
| where
43-
| F: Ungil + FnOnce() -> T,
44-
| ^^^^^ required by this bound in `Python::<'py>::detach`
39+
|
40+
| pub fn detach<T, F>(self, f: F) -> T
41+
| ------ required by a bound in this associated function
42+
| where
43+
| F: Ungil + FnOnce() -> T,
44+
| ^^^^^ required by this bound in `Python::<'py>::detach`

tests/ui/not_send2.stderr

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safely
22
--> tests/ui/not_send2.rs:8:19
3-
|
4-
8 | py.detach(|| {
5-
| ____________------_^
6-
| | |
7-
| | required by a bound introduced by this call
8-
9 | | println!("{:?}", string);
9-
10 | | });
10-
| |_________^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
11-
|
12-
= help: within `pyo3::Bound<'_, PyString>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
3+
|
4+
8 | py.detach(|| {
5+
| ____________------_^
6+
| | |
7+
| | required by a bound introduced by this call
8+
9 | | println!("{:?}", string);
9+
10 | | });
10+
| |_________^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
11+
|
12+
= help: within `pyo3::Bound<'_, PyString>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
1313
note: required because it appears within the type `PhantomData<*mut pyo3::Python<'static>>`
1414
--> $RUST/core/src/marker.rs
15-
|
16-
| pub struct PhantomData<T: PointeeSized>;
17-
| ^^^^^^^^^^^
15+
|
16+
| pub struct PhantomData<T: PointeeSized>;
17+
| ^^^^^^^^^^^
1818
note: required because it appears within the type `pyo3::marker::NotSend`
1919
--> src/marker.rs
20-
|
21-
| struct NotSend(PhantomData<*mut Python<'static>>);
22-
| ^^^^^^^
20+
|
21+
| struct NotSend(PhantomData<*mut Python<'static>>);
22+
| ^^^^^^^
2323
note: required because it appears within the type `PhantomData<pyo3::marker::NotSend>`
2424
--> $RUST/core/src/marker.rs
25-
|
26-
| pub struct PhantomData<T: PointeeSized>;
27-
| ^^^^^^^^^^^
25+
|
26+
| pub struct PhantomData<T: PointeeSized>;
27+
| ^^^^^^^^^^^
2828
note: required because it appears within the type `pyo3::Python<'_>`
2929
--> src/marker.rs
30-
|
31-
| pub struct Python<'py>(PhantomData<&'py AttachGuard>, PhantomData<NotSend>);
32-
| ^^^^^^
30+
|
31+
| pub struct Python<'py>(PhantomData<&'py AttachGuard>, PhantomData<NotSend>);
32+
| ^^^^^^
3333
note: required because it appears within the type `pyo3::Bound<'_, PyString>`
3434
--> src/instance.rs
35-
|
36-
| pub struct Bound<'py, T>(Python<'py>, ManuallyDrop<Py<T>>);
37-
| ^^^^^
38-
= note: required for `&pyo3::Bound<'_, PyString>` to implement `Send`
35+
|
36+
| pub struct Bound<'py, T>(Python<'py>, ManuallyDrop<Py<T>>);
37+
| ^^^^^
38+
= note: required for `&pyo3::Bound<'_, PyString>` to implement `Send`
3939
note: required because it's used within this closure
4040
--> tests/ui/not_send2.rs:8:19
41-
|
42-
8 | py.detach(|| {
43-
| ^^
44-
= note: required for `{closure@$DIR/tests/ui/not_send2.rs:8:19: 8:21}` to implement `Ungil`
41+
|
42+
8 | py.detach(|| {
43+
| ^^
44+
= note: required for `{closure@$DIR/tests/ui/not_send2.rs:8:19: 8:21}` to implement `Ungil`
4545
note: required by a bound in `pyo3::Python::<'py>::detach`
4646
--> src/marker.rs
47-
|
48-
| pub fn detach<T, F>(self, f: F) -> T
49-
| ------ required by a bound in this associated function
50-
| where
51-
| F: Ungil + FnOnce() -> T,
52-
| ^^^^^ required by this bound in `Python::<'py>::detach`
47+
|
48+
| pub fn detach<T, F>(self, f: F) -> T
49+
| ------ required by a bound in this associated function
50+
| where
51+
| F: Ungil + FnOnce() -> T,
52+
| ^^^^^ required by this bound in `Python::<'py>::detach`

0 commit comments

Comments
 (0)