Skip to content

Commit 890edc1

Browse files
authored
Merge pull request #449 from madsmtm/update-nightly-and-dependencies
Update nightly Rust and update dependencies
2 parents 3f869ec + 5f687c8 commit 890edc1

27 files changed

+595
-139
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 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
@@ -200,6 +200,7 @@ jobs:
200200
toolchain: ${{ env.CURRENT_NIGHTLY }}
201201
profile: minimal
202202
override: true
203+
components: rust-src
203204

204205
- name: Cache Cargo
205206
uses: actions/cache@v3

Cargo.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/header-translator/src/data/macros.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,11 @@ macro_rules! __data_methods {
160160

161161
$($rest:tt)*
162162
) => {
163+
#[allow(unused_mut)]
163164
let mut method_data = $data.methods.entry("init".to_string()).or_default();
164165
method_data.unsafe_ = false;
165166

167+
#[allow(unused_mut)]
166168
let mut method_data = $data.methods.entry("new".to_string()).or_default();
167169
method_data.unsafe_ = false;
168170

@@ -195,6 +197,7 @@ macro_rules! __data_methods {
195197

196198
$($rest:tt)*
197199
) => {
200+
#[allow(unused_mut)]
198201
let mut method_data = $data.methods.entry(stringify!($name).to_string()).or_default();
199202

200203
method_data.unsafe_ = false;
@@ -228,6 +231,7 @@ macro_rules! __data_methods {
228231

229232
$($rest:tt)*
230233
) => {
234+
#[allow(unused_mut)]
231235
let mut method_data = $data.methods.entry(stringify!($name).to_string()).or_default();
232236

233237
method_data.mutating = Some(true);
@@ -261,6 +265,7 @@ macro_rules! __data_methods {
261265

262266
$($rest:tt)*
263267
) => {
268+
#[allow(unused_mut)]
264269
let mut method_data = $data.methods.entry(stringify!($name).to_string()).or_default();
265270

266271
method_data.unsafe_ = false;

crates/objc2/src/macros/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ macro_rules! __sel_inner {
635635

636636
#[doc(hidden)]
637637
#[macro_export]
638-
#[cfg(all(feature = "unstable-static-sel-inlined"))]
638+
#[cfg(feature = "unstable-static-sel-inlined")]
639639
macro_rules! __sel_inner {
640640
($data:expr, $hash:expr) => {{
641641
$crate::__inner_statics!(@image_info $hash);
@@ -670,7 +670,7 @@ macro_rules! __class_inner {
670670

671671
#[doc(hidden)]
672672
#[macro_export]
673-
#[cfg(all(feature = "unstable-static-class-inlined"))]
673+
#[cfg(feature = "unstable-static-class-inlined")]
674674
macro_rules! __class_inner {
675675
($name:expr, $hash:expr,) => {{
676676
$crate::__inner_statics!(@image_info $hash);

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)

0 commit comments

Comments
 (0)