Skip to content

Commit d20a973

Browse files
authored
Merge pull request #247 from madsmtm/fix-nightly-2022-08-27
Fix nightly UI tests
2 parents 3cbef36 + 79e0f35 commit d20a973

10 files changed

+49
-31
lines changed

test-ui/ui/autoreleasepool_not_send_sync.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0277]: `*mut c_void` cannot be shared between threads safely
22
--> ui/autoreleasepool_not_send_sync.rs
33
|
44
| needs_sync::<AutoreleasePool>();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut c_void` cannot be shared between threads safely
5+
| ^^^^^^^^^^^^^^^ `*mut c_void` cannot be shared between threads safely
66
|
77
= help: within `AutoreleasePool`, the trait `Sync` is not implemented for `*mut c_void`
88
= note: required because it appears within the type `AutoreleasePool`
@@ -16,7 +16,7 @@ error[E0277]: `*mut UnsafeCell<c_void>` cannot be shared between threads safely
1616
--> ui/autoreleasepool_not_send_sync.rs
1717
|
1818
| needs_sync::<AutoreleasePool>();
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut UnsafeCell<c_void>` cannot be shared between threads safely
19+
| ^^^^^^^^^^^^^^^ `*mut UnsafeCell<c_void>` cannot be shared between threads safely
2020
|
2121
= help: within `AutoreleasePool`, the trait `Sync` is not implemented for `*mut UnsafeCell<c_void>`
2222
= note: required because it appears within the type `PhantomData<*mut UnsafeCell<c_void>>`
@@ -31,7 +31,7 @@ error[E0277]: `*mut c_void` cannot be sent between threads safely
3131
--> ui/autoreleasepool_not_send_sync.rs
3232
|
3333
| needs_send::<AutoreleasePool>();
34-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
34+
| ^^^^^^^^^^^^^^^ `*mut c_void` cannot be sent between threads safely
3535
|
3636
= help: within `AutoreleasePool`, the trait `Send` is not implemented for `*mut c_void`
3737
= note: required because it appears within the type `AutoreleasePool`
@@ -45,7 +45,7 @@ error[E0277]: `*mut UnsafeCell<c_void>` cannot be sent between threads safely
4545
--> ui/autoreleasepool_not_send_sync.rs
4646
|
4747
| needs_send::<AutoreleasePool>();
48-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut UnsafeCell<c_void>` cannot be sent between threads safely
48+
| ^^^^^^^^^^^^^^^ `*mut UnsafeCell<c_void>` cannot be sent between threads safely
4949
|
5050
= help: within `AutoreleasePool`, the trait `Send` is not implemented for `*mut UnsafeCell<c_void>`
5151
= note: required because it appears within the type `PhantomData<*mut UnsafeCell<c_void>>`

test-ui/ui/mainthreadmarker_not_send_sync.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0277]: `*mut ()` cannot be shared between threads safely
22
--> ui/mainthreadmarker_not_send_sync.rs
33
|
44
| needs_sync::<MainThreadMarker>();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
5+
| ^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
66
|
77
= help: within `MainThreadMarker`, the trait `Sync` is not implemented for `*mut ()`
88
= note: required because it appears within the type `PhantomData<*mut ()>`
@@ -17,7 +17,7 @@ error[E0277]: `*mut ()` cannot be sent between threads safely
1717
--> ui/mainthreadmarker_not_send_sync.rs
1818
|
1919
| needs_send::<MainThreadMarker>();
20-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be sent between threads safely
20+
| ^^^^^^^^^^^^^^^^ `*mut ()` cannot be sent between threads safely
2121
|
2222
= help: within `MainThreadMarker`, the trait `Send` is not implemented for `*mut ()`
2323
= note: required because it appears within the type `PhantomData<*mut ()>`

test-ui/ui/msg_send_id_invalid_receiver.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,12 @@ error[E0277]: the trait bound `Id<objc2::runtime::Object, Shared>: MessageReceiv
104104
--> ui/msg_send_id_invalid_receiver.rs
105105
|
106106
| let _: Id<Object, Shared> = unsafe { msg_send_id![obj, copy] };
107-
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `MessageReceiver` is not implemented for `Id<objc2::runtime::Object, Shared>`
107+
| -------------^^^-------
108+
| | |
109+
| | the trait `MessageReceiver` is not implemented for `Id<objc2::runtime::Object, Shared>`
110+
| required by a bound introduced by this call
108111
|
109112
= help: the following other types implement trait `MessageReceiver`:
110113
&'a Id<T, O>
111114
&'a mut Id<T, objc2::rc::Owned>
112115
= note: required for `RetainSemantics<false, false, false, true>` to implement `MsgSendId<Id<objc2::runtime::Object, Shared>, _, _>`
113-
= note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info)

test-ui/ui/msg_send_id_invalid_return.stderr

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ error[E0277]: the trait bound `objc2::runtime::Class: Message` is not satisfied
1818
--> ui/msg_send_id_invalid_return.rs
1919
|
2020
| let _: Id<Class, Shared> = unsafe { msg_send_id![cls, new] };
21-
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Message` is not implemented for `objc2::runtime::Class`
21+
| -------------^^^------
22+
| | |
23+
| | the trait `Message` is not implemented for `objc2::runtime::Class`
24+
| required by a bound introduced by this call
2225
|
2326
= help: the following other types implement trait `Message`:
2427
Exception
@@ -31,13 +34,15 @@ error[E0277]: the trait bound `objc2::runtime::Class: Message` is not satisfied
3134
NSMutableArray<T, O>
3235
and 11 others
3336
= note: required for `RetainSemantics<true, false, false, false>` to implement `MsgSendId<&objc2::runtime::Class, objc2::runtime::Class, Shared>`
34-
= note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info)
3537

3638
error[E0277]: the trait bound `objc2::runtime::Class: Message` is not satisfied
3739
--> ui/msg_send_id_invalid_return.rs
3840
|
3941
| let _: Option<Id<Class, Shared>> = unsafe { msg_send_id![cls, new] };
40-
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Message` is not implemented for `objc2::runtime::Class`
42+
| -------------^^^------
43+
| | |
44+
| | the trait `Message` is not implemented for `objc2::runtime::Class`
45+
| required by a bound introduced by this call
4146
|
4247
= help: the following other types implement trait `Message`:
4348
Exception
@@ -50,7 +55,6 @@ error[E0277]: the trait bound `objc2::runtime::Class: Message` is not satisfied
5055
NSMutableArray<T, O>
5156
and 11 others
5257
= note: required for `RetainSemantics<true, false, false, false>` to implement `MsgSendId<&objc2::runtime::Class, objc2::runtime::Class, Shared>`
53-
= note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info)
5458

5559
error[E0277]: the trait bound `&objc2::runtime::Object: MaybeUnwrap<Allocated<_>, _>` is not satisfied
5660
--> ui/msg_send_id_invalid_return.rs
@@ -72,7 +76,10 @@ error[E0277]: the trait bound `objc2::runtime::Class: Message` is not satisfied
7276
--> ui/msg_send_id_invalid_return.rs
7377
|
7478
| let _: Id<Allocated<Class>, Shared> = unsafe { msg_send_id![cls, alloc] };
75-
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Message` is not implemented for `objc2::runtime::Class`
79+
| -------------^^^--------
80+
| | |
81+
| | the trait `Message` is not implemented for `objc2::runtime::Class`
82+
| required by a bound introduced by this call
7683
|
7784
= help: the following other types implement trait `Message`:
7885
Exception
@@ -85,7 +92,6 @@ error[E0277]: the trait bound `objc2::runtime::Class: Message` is not satisfied
8592
NSMutableArray<T, O>
8693
and 11 others
8794
= note: required for `RetainSemantics<false, true, false, false>` to implement `MsgSendId<&objc2::runtime::Class, Allocated<objc2::runtime::Class>, Shared>`
88-
= note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info)
8995

9096
error[E0277]: the trait bound `Id<objc2::runtime::Object, Shared>: MaybeUnwrap<Allocated<_>, _>` is not satisfied
9197
--> ui/msg_send_id_invalid_return.rs

test-ui/ui/msg_send_not_encode.stderr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ error[E0277]: the trait bound `Vec<u8>: Encode` is not satisfied
2525
--> ui/msg_send_not_encode.rs
2626
|
2727
| let _: () = msg_send![cls, newWith: x];
28-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `Vec<u8>`
28+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
29+
| |
30+
| the trait `Encode` is not implemented for `Vec<u8>`
31+
| required by a bound introduced by this call
2932
|
3033
= help: the following other types implement trait `Encode`:
3134
&'a T

test-ui/ui/msg_send_only_message.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ error[E0277]: the trait bound `{integer}: MessageReceiver` is not satisfied
22
--> ui/msg_send_only_message.rs
33
|
44
| unsafe { msg_send![1, new] };
5-
| ^^^^^^^^^^^^^^^^^ the trait `MessageReceiver` is not implemented for `{integer}`
5+
| ----------^------
6+
| | |
7+
| | the trait `MessageReceiver` is not implemented for `{integer}`
8+
| required by a bound introduced by this call
69
|
710
= help: the following other types implement trait `MessageReceiver`:
811
&'a Id<T, O>
@@ -14,4 +17,3 @@ error[E0277]: the trait bound `{integer}: MessageReceiver` is not satisfied
1417
*const objc2::runtime::Class
1518
*mut T
1619
and 2 others
17-
= note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info)

test-ui/ui/msg_send_super_not_classtype.stderr

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ error[E0277]: the trait bound `objc2::runtime::Object: ClassType` is not satisfi
22
--> ui/msg_send_super_not_classtype.rs
33
|
44
| let _: () = unsafe { msg_send![super(obj), method] };
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ClassType` is not implemented for `objc2::runtime::Object`
5+
| ----------------^^^----------
6+
| | |
7+
| | the trait `ClassType` is not implemented for `objc2::runtime::Object`
8+
| required by a bound introduced by this call
69
|
710
= help: the following other types implement trait `ClassType`:
811
NSArray<T, O>
@@ -19,13 +22,15 @@ note: required by a bound in `__send_super_message_static`
1922
|
2023
| Self::__Inner: ClassType,
2124
| ^^^^^^^^^ required by this bound in `__send_super_message_static`
22-
= note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info)
2325

2426
error[E0277]: the trait bound `objc2::runtime::Object: ClassType` is not satisfied
2527
--> ui/msg_send_super_not_classtype.rs
2628
|
2729
| let _: () = unsafe { msg_send![super(obj), method] };
28-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ClassType` is not implemented for `objc2::runtime::Object`
30+
| ----------------^^^----------
31+
| | |
32+
| | the trait `ClassType` is not implemented for `objc2::runtime::Object`
33+
| required by a bound introduced by this call
2934
|
3035
= help: the following other types implement trait `ClassType`:
3136
NSArray<T, O>
@@ -42,4 +47,3 @@ note: required by a bound in `__send_super_message_static`
4247
|
4348
| <Self::__Inner as ClassType>::Super: ClassType,
4449
| ^^^^^^^^^ required by this bound in `__send_super_message_static`
45-
= note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info)

test-ui/ui/ns_string_output_not_const.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ error[E0015]: cannot call non-const fn `CFConstString::as_nsstring` in statics
55
| ^^^^^^^^^^^^^^^^^
66
|
77
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
8+
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
89
= note: this error originates in the macro `$crate::__ns_string_inner` which comes from the expansion of the macro `ns_string` (in Nightly builds, run with -Z macro-backtrace for more info)

test-ui/ui/nsarray_bound_not_send_sync.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0277]: `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
22
--> ui/nsarray_bound_not_send_sync.rs
33
|
44
| needs_sync::<NSArray<Object, Shared>>();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
5+
| ^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
66
|
77
= help: within `objc2::runtime::Object`, the trait `Sync` is not implemented for `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
88
= note: required because it appears within the type `objc_object`
@@ -18,7 +18,7 @@ error[E0277]: `*const UnsafeCell<()>` cannot be sent between threads safely
1818
--> ui/nsarray_bound_not_send_sync.rs
1919
|
2020
| needs_sync::<NSArray<Object, Shared>>();
21-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
21+
| ^^^^^^^^^^^^^^^^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
2222
|
2323
= help: within `objc2::runtime::Object`, the trait `Send` is not implemented for `*const UnsafeCell<()>`
2424
= note: required because it appears within the type `(*const UnsafeCell<()>, PhantomPinned)`
@@ -37,7 +37,7 @@ error[E0277]: `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
3737
--> ui/nsarray_bound_not_send_sync.rs
3838
|
3939
| needs_send::<NSArray<Object, Shared>>();
40-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
40+
| ^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
4141
|
4242
= help: within `objc2::runtime::Object`, the trait `Sync` is not implemented for `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
4343
= note: required because it appears within the type `objc_object`
@@ -53,7 +53,7 @@ error[E0277]: `*const UnsafeCell<()>` cannot be sent between threads safely
5353
--> ui/nsarray_bound_not_send_sync.rs
5454
|
5555
| needs_send::<NSArray<Object, Shared>>();
56-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
56+
| ^^^^^^^^^^^^^^^^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
5757
|
5858
= help: within `objc2::runtime::Object`, the trait `Send` is not implemented for `*const UnsafeCell<()>`
5959
= note: required because it appears within the type `(*const UnsafeCell<()>, PhantomPinned)`

test-ui/ui/object_not_send_sync.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0277]: `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
22
--> ui/object_not_send_sync.rs
33
|
44
| needs_sync::<Object>();
5-
| ^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
5+
| ^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
66
|
77
= help: within `objc2::runtime::Object`, the trait `Sync` is not implemented for `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
88
= note: required because it appears within the type `objc_object`
@@ -17,7 +17,7 @@ error[E0277]: `*const UnsafeCell<()>` cannot be sent between threads safely
1717
--> ui/object_not_send_sync.rs
1818
|
1919
| needs_send::<Object>();
20-
| ^^^^^^^^^^^^^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
20+
| ^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
2121
|
2222
= help: within `objc2::runtime::Object`, the trait `Send` is not implemented for `*const UnsafeCell<()>`
2323
= note: required because it appears within the type `(*const UnsafeCell<()>, PhantomPinned)`
@@ -35,7 +35,7 @@ error[E0277]: `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
3535
--> ui/object_not_send_sync.rs
3636
|
3737
| needs_sync::<NSObject>();
38-
| ^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
38+
| ^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
3939
|
4040
= help: within `NSObject`, the trait `Sync` is not implemented for `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
4141
= note: required because it appears within the type `objc_object`
@@ -51,7 +51,7 @@ error[E0277]: `*const UnsafeCell<()>` cannot be sent between threads safely
5151
--> ui/object_not_send_sync.rs
5252
|
5353
| needs_send::<NSObject>();
54-
| ^^^^^^^^^^^^^^^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
54+
| ^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
5555
|
5656
= help: within `NSObject`, the trait `Send` is not implemented for `*const UnsafeCell<()>`
5757
= note: required because it appears within the type `(*const UnsafeCell<()>, PhantomPinned)`
@@ -70,7 +70,7 @@ error[E0277]: `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
7070
--> ui/object_not_send_sync.rs
7171
|
7272
| needs_sync::<NSValue>();
73-
| ^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
73+
| ^^^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
7474
|
7575
= help: within `NSValue`, the trait `Sync` is not implemented for `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
7676
= note: required because it appears within the type `objc_object`
@@ -87,7 +87,7 @@ error[E0277]: `*const UnsafeCell<()>` cannot be sent between threads safely
8787
--> ui/object_not_send_sync.rs
8888
|
8989
| needs_send::<NSValue>();
90-
| ^^^^^^^^^^^^^^^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
90+
| ^^^^^^^ `*const UnsafeCell<()>` cannot be sent between threads safely
9191
|
9292
= help: within `NSValue`, the trait `Send` is not implemented for `*const UnsafeCell<()>`
9393
= note: required because it appears within the type `(*const UnsafeCell<()>, PhantomPinned)`

0 commit comments

Comments
 (0)