Skip to content

Commit 74c78af

Browse files
committed
Update nightly to 2023-05-25
1 parent 3f869ec commit 74c78af

23 files changed

+553
-103
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ env:
4444
--package=objc2-encode
4545
--package=objc2-proc-macros
4646
# The current nightly Rust version that our CI uses
47-
CURRENT_NIGHTLY: nightly-2023-04-12
47+
CURRENT_NIGHTLY: nightly-2023-05-25
4848
# Various features that we'd usually want to test with
4949
#
5050
# Note: The `exception` feature is not enabled here, since it requires

crates/test-ui/ui/add_method_no_bool.stderr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ error[E0277]: the trait bound `bool: Encode` is not satisfied
2020
note: required by a bound in `ClassBuilder::add_method`
2121
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
2222
|
23+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
24+
| ---------- required by a bound in this associated function
25+
...
2326
| F: MethodImplementation<Callee = T>,
2427
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
2528

@@ -46,5 +49,8 @@ error[E0277]: the trait bound `bool: Encode` is not satisfied
4649
note: required by a bound in `ClassBuilder::add_method`
4750
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
4851
|
52+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
53+
| ---------- required by a bound in this associated function
54+
...
4955
| F: MethodImplementation<Callee = T>,
5056
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`

crates/test-ui/ui/autoreleasepool_not_send_sync.stderr

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,22 @@ error[E0277]: `*mut c_void` cannot be shared between threads safely
55
| ^^^^^^^^^^^^^^^^^^^ `*mut c_void` cannot be shared between threads safely
66
|
77
= help: within `AutoreleasePool<'_>`, the trait `Sync` is not implemented for `*mut c_void`
8-
= note: required because it appears within the type `Pool`
8+
note: required because it appears within the type `Pool`
9+
--> $WORKSPACE/crates/objc2/src/rc/autorelease.rs
10+
|
11+
| struct Pool {
12+
| ^^^^
913
= note: required because it appears within the type `&Pool`
10-
= note: required because it appears within the type `Option<&Pool>`
11-
= note: required because it appears within the type `AutoreleasePool<'_>`
14+
note: required because it appears within the type `Option<&Pool>`
15+
--> $RUST/core/src/option.rs
16+
|
17+
| pub enum Option<T> {
18+
| ^^^^^^
19+
note: required because it appears within the type `AutoreleasePool<'_>`
20+
--> $WORKSPACE/crates/objc2/src/rc/autorelease.rs
21+
|
22+
| pub struct AutoreleasePool<'pool> {
23+
| ^^^^^^^^^^^^^^^
1224
note: required by a bound in `needs_sync`
1325
--> ui/autoreleasepool_not_send_sync.rs
1426
|
@@ -22,10 +34,22 @@ error[E0277]: `*mut c_void` cannot be shared between threads safely
2234
| ^^^^^^^^^^^^^^^^^^^ `*mut c_void` cannot be shared between threads safely
2335
|
2436
= help: within `objc2::rc::autorelease::Pool`, the trait `Sync` is not implemented for `*mut c_void`
25-
= note: required because it appears within the type `Pool`
37+
note: required because it appears within the type `Pool`
38+
--> $WORKSPACE/crates/objc2/src/rc/autorelease.rs
39+
|
40+
| struct Pool {
41+
| ^^^^
2642
= note: required for `&objc2::rc::autorelease::Pool` to implement `Send`
27-
= note: required because it appears within the type `Option<&Pool>`
28-
= note: required because it appears within the type `AutoreleasePool<'_>`
43+
note: required because it appears within the type `Option<&Pool>`
44+
--> $RUST/core/src/option.rs
45+
|
46+
| pub enum Option<T> {
47+
| ^^^^^^
48+
note: required because it appears within the type `AutoreleasePool<'_>`
49+
--> $WORKSPACE/crates/objc2/src/rc/autorelease.rs
50+
|
51+
| pub struct AutoreleasePool<'pool> {
52+
| ^^^^^^^^^^^^^^^
2953
note: required by a bound in `needs_send`
3054
--> ui/autoreleasepool_not_send_sync.rs
3155
|

crates/test-ui/ui/declare_add_bad_method.stderr

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ error[E0277]: the trait bound `fn(_, _): MethodImplementation` is not satisfied
1919
note: required by a bound in `ClassBuilder::add_method`
2020
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
2121
|
22+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
23+
| ---------- required by a bound in this associated function
24+
...
2225
| F: MethodImplementation<Callee = T>,
2326
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
2427

@@ -43,6 +46,9 @@ error[E0277]: the trait bound `fn(_, _): MethodImplementation` is not satisfied
4346
note: required by a bound in `ClassBuilder::add_method`
4447
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
4548
|
49+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
50+
| ---------- required by a bound in this associated function
51+
...
4652
| F: MethodImplementation<Callee = T>,
4753
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
4854

@@ -67,6 +73,9 @@ error[E0277]: the trait bound `fn(_, _) -> _: MethodImplementation` is not satis
6773
note: required by a bound in `ClassBuilder::add_method`
6874
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
6975
|
76+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
77+
| ---------- required by a bound in this associated function
78+
...
7079
| F: MethodImplementation<Callee = T>,
7180
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
7281

@@ -91,6 +100,9 @@ error[E0277]: the trait bound `fn(_, _) -> _: MethodImplementation` is not satis
91100
note: required by a bound in `ClassBuilder::add_method`
92101
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
93102
|
103+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
104+
| ---------- required by a bound in this associated function
105+
...
94106
| F: MethodImplementation<Callee = T>,
95107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
96108

@@ -115,5 +127,8 @@ error[E0277]: the trait bound `fn(_, _, _): MethodImplementation` is not satisfi
115127
note: required by a bound in `ClassBuilder::add_method`
116128
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
117129
|
130+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
131+
| ---------- required by a bound in this associated function
132+
...
118133
| F: MethodImplementation<Callee = T>,
119134
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`

crates/test-ui/ui/declare_class_invalid_receiver.stderr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ error[E0277]: the trait bound `extern "C" fn(Box<CustomObject>, objc2::runtime::
2626
note: required by a bound in `ClassBuilder::add_method`
2727
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
2828
|
29+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
30+
| ---------- required by a bound in this associated function
31+
...
2932
| F: MethodImplementation<Callee = T>,
3033
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
3134
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -58,6 +61,9 @@ error[E0277]: the trait bound `extern "C" fn(Id<CustomObject>, objc2::runtime::S
5861
note: required by a bound in `ClassBuilder::add_method`
5962
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
6063
|
64+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
65+
| ---------- required by a bound in this associated function
66+
...
6167
| F: MethodImplementation<Callee = T>,
6268
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
6369
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -90,6 +96,9 @@ error[E0277]: the trait bound `extern "C" fn(CustomObject, objc2::runtime::Sel):
9096
note: required by a bound in `ClassBuilder::add_method`
9197
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
9298
|
99+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
100+
| ---------- required by a bound in this associated function
101+
...
93102
| F: MethodImplementation<Callee = T>,
94103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
95104
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -122,6 +131,9 @@ error[E0277]: the trait bound `extern "C" fn(Box<CustomObject>, objc2::runtime::
122131
note: required by a bound in `ClassBuilder::add_method`
123132
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
124133
|
134+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
135+
| ---------- required by a bound in this associated function
136+
...
125137
| F: MethodImplementation<Callee = T>,
126138
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
127139
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -154,6 +166,9 @@ error[E0277]: the trait bound `extern "C" fn(Id<CustomObject>, objc2::runtime::S
154166
note: required by a bound in `ClassBuilder::add_method`
155167
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
156168
|
169+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
170+
| ---------- required by a bound in this associated function
171+
...
157172
| F: MethodImplementation<Callee = T>,
158173
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
159174
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -186,6 +201,9 @@ error[E0277]: the trait bound `extern "C" fn(CustomObject, objc2::runtime::Sel)
186201
note: required by a bound in `ClassBuilder::add_method`
187202
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
188203
|
204+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
205+
| ---------- required by a bound in this associated function
206+
...
189207
| F: MethodImplementation<Callee = T>,
190208
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
191209
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)

crates/test-ui/ui/declare_class_mut_self_not_mutable.stderr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ error[E0277]: the trait bound `InteriorMutable: mutability::private::MutabilityI
2121
note: required by a bound in `ClassBuilder::add_method`
2222
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
2323
|
24+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
25+
| ---------- required by a bound in this associated function
26+
...
2427
| F: MethodImplementation<Callee = T>,
2528
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
2629
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -48,6 +51,9 @@ error[E0277]: the trait bound `InteriorMutable: mutability::private::MutabilityI
4851
note: required by a bound in `ClassBuilder::add_method`
4952
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
5053
|
54+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
55+
| ---------- required by a bound in this associated function
56+
...
5157
| F: MethodImplementation<Callee = T>,
5258
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
5359
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -75,6 +81,9 @@ error[E0277]: the trait bound `InteriorMutable: mutability::private::MutabilityI
7581
note: required by a bound in `ClassBuilder::add_method`
7682
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
7783
|
84+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
85+
| ---------- required by a bound in this associated function
86+
...
7887
| F: MethodImplementation<Callee = T>,
7988
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`
8089
= note: this error originates in the macro `$crate::__declare_class_register_out` which comes from the expansion of the macro `declare_class` (in Nightly builds, run with -Z macro-backtrace for more info)

crates/test-ui/ui/extern_class_wrong_mutability.stderr

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ error[E0277]: the trait bound `MainThreadOnly: ValidSubclassMutability<InteriorM
1414
note: required by a bound in `assert_mutability_matches_superclass_mutability`
1515
--> $WORKSPACE/crates/objc2/src/__macro_helpers/declare_class.rs
1616
|
17+
| pub fn assert_mutability_matches_superclass_mutability<T>()
18+
| ----------------------------------------------- required by a bound in this function
19+
...
1720
| <T::Super as ClassType>::Mutability: ValidSubclassMutability<T::Mutability>,
1821
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_mutability_matches_superclass_mutability`
1922
= note: this error originates in the macro `$crate::__inner_extern_class` which comes from the expansion of the macro `extern_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -36,6 +39,9 @@ error[E0271]: type mismatch resolving `<NSObject as ClassType>::Mutability == Im
3639
note: required by a bound in `assert_mutability_matches_superclass_mutability`
3740
--> $WORKSPACE/crates/objc2/src/__macro_helpers/declare_class.rs
3841
|
42+
| pub fn assert_mutability_matches_superclass_mutability<T>()
43+
| ----------------------------------------------- required by a bound in this function
44+
...
3945
| <T::Super as ClassType>::Mutability: ValidSubclassMutability<T::Mutability>,
4046
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_mutability_matches_superclass_mutability`
4147
= note: this error originates in the macro `$crate::__inner_extern_class` which comes from the expansion of the macro `extern_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -58,6 +64,9 @@ error[E0271]: type mismatch resolving `<NSObject as ClassType>::Mutability == Im
5864
note: required by a bound in `assert_mutability_matches_superclass_mutability`
5965
--> $WORKSPACE/crates/objc2/src/__macro_helpers/declare_class.rs
6066
|
67+
| pub fn assert_mutability_matches_superclass_mutability<T>()
68+
| ----------------------------------------------- required by a bound in this function
69+
...
6170
| <T::Super as ClassType>::Mutability: ValidSubclassMutability<T::Mutability>,
6271
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_mutability_matches_superclass_mutability`
6372
= note: this error originates in the macro `$crate::__inner_extern_class` which comes from the expansion of the macro `extern_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -80,6 +89,9 @@ error[E0271]: type mismatch resolving `<NSObject as ClassType>::Mutability == Mu
8089
note: required by a bound in `assert_mutability_matches_superclass_mutability`
8190
--> $WORKSPACE/crates/objc2/src/__macro_helpers/declare_class.rs
8291
|
92+
| pub fn assert_mutability_matches_superclass_mutability<T>()
93+
| ----------------------------------------------- required by a bound in this function
94+
...
8395
| <T::Super as ClassType>::Mutability: ValidSubclassMutability<T::Mutability>,
8496
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_mutability_matches_superclass_mutability`
8597
= note: this error originates in the macro `$crate::__inner_extern_class` which comes from the expansion of the macro `extern_class` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -102,6 +114,9 @@ error[E0271]: type mismatch resolving `<NSObject as ClassType>::Mutability == Mu
102114
note: required by a bound in `assert_mutability_matches_superclass_mutability`
103115
--> $WORKSPACE/crates/objc2/src/__macro_helpers/declare_class.rs
104116
|
117+
| pub fn assert_mutability_matches_superclass_mutability<T>()
118+
| ----------------------------------------------- required by a bound in this function
119+
...
105120
| <T::Super as ClassType>::Mutability: ValidSubclassMutability<T::Mutability>,
106121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_mutability_matches_superclass_mutability`
107122
= note: this error originates in the macro `$crate::__inner_extern_class` which comes from the expansion of the macro `extern_class` (in Nightly builds, run with -Z macro-backtrace for more info)

crates/test-ui/ui/extern_methods_invalid_type.stderr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ error[E0277]: the trait bound `Id<MyObject>: Encode` is not satisfied
2424
note: required by a bound in `send_message`
2525
--> $WORKSPACE/crates/objc2/src/message/mod.rs
2626
|
27+
| unsafe fn send_message<A, R>(self, sel: Sel, args: A) -> R
28+
| ------------ required by a bound in this associated function
29+
...
2730
| R: EncodeConvertReturn,
2831
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `MessageReceiver::send_message`
2932
= note: this error originates in the macro `$crate::__msg_send_helper` which comes from the expansion of the macro `extern_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -100,6 +103,9 @@ error[E0277]: the trait bound `Result<(), Id<NSObject>>: Encode` is not satisfie
100103
note: required by a bound in `send_message`
101104
--> $WORKSPACE/crates/objc2/src/message/mod.rs
102105
|
106+
| unsafe fn send_message<A, R>(self, sel: Sel, args: A) -> R
107+
| ------------ required by a bound in this associated function
108+
...
103109
| R: EncodeConvertReturn,
104110
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `MessageReceiver::send_message`
105111
= note: this error originates in the macro `$crate::__msg_send_helper` which comes from the expansion of the macro `extern_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

crates/test-ui/ui/fn_ptr_reference_method.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ error[E0277]: the trait bound `for<'a> extern "C" fn(_, _, &'a objc2::runtime::O
1919
note: required by a bound in `ClassBuilder::add_method`
2020
--> $WORKSPACE/crates/objc2/src/declare/mod.rs
2121
|
22+
| pub unsafe fn add_method<T, F>(&mut self, sel: Sel, func: F)
23+
| ---------- required by a bound in this associated function
24+
...
2225
| F: MethodImplementation<Callee = T>,
2326
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClassBuilder::add_method`

0 commit comments

Comments
 (0)