Skip to content

Commit 02cf1d2

Browse files
authored
Merge pull request #144 from madsmtm/ci-fixes
CI fixes
2 parents 1c9c9d3 + 713cfad commit 02cf1d2

File tree

7 files changed

+45
-11
lines changed

7 files changed

+45
-11
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches: [master]
66
pull_request:
7+
schedule:
8+
- cron: '0 9 * * MON'
79

810
env:
911
CARGO_TERM_COLOR: always

block2/src/global.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ const GLOBAL_DESCRIPTOR: ffi::Block_descriptor_header = ffi::Block_descriptor_he
1818
/// An Objective-C block that does not capture it's environment.
1919
///
2020
/// This is effectively just a glorified function pointer, and can created and
21-
/// stored in static memory using the [`global_block`][`global_block!`] macro.
21+
/// stored in static memory using the [`global_block!`] macro.
2222
///
2323
/// If [`ConcreteBlock`] is the [`Fn`]-block equivalent, this is likewise the
2424
/// [`fn`]-block equivalent.
2525
///
2626
/// [`ConcreteBlock`]: crate::ConcreteBlock
27+
/// [`global_block!`]: crate::global_block
2728
#[repr(C)]
2829
pub struct GlobalBlock<A, R = ()> {
2930
layout: ffi::Block_layout,
@@ -88,9 +89,9 @@ where
8889

8990
/// Construct a static [`GlobalBlock`].
9091
///
91-
/// The syntax is similar to a static closure. Note that the block cannot
92-
/// capture it's environment, and it's argument types and return type must be
93-
/// [`Encode`].
92+
/// The syntax is similar to a static closure (except that all types have to
93+
/// be specified). Note that the block cannot capture it's environment, and
94+
/// it's argument types and return type must be [`Encode`].
9495
///
9596
/// # Examples
9697
///

objc2/src/message/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ macro_rules! message_args_impl {
287287
($($a:ident : $t:ident),*) => (
288288
unsafe impl<$($t: Encode),*> MessageArguments for ($($t,)*) {
289289
#[inline]
290-
#[doc(hidden)]
291290
unsafe fn __invoke<R: Encode>(imp: Imp, obj: *mut Object, sel: Sel, ($($a,)*): Self) -> R {
292291
// The imp must be cast to the appropriate function pointer
293292
// type before being called; the msgSend functions are not

tests/ui/global_block_not_encode.stderr

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ error[E0277]: the trait bound `Box<i32>: objc2_encode::encode::Encode` is not sa
66
5 | | }
77
| |_^ the trait `objc2_encode::encode::Encode` is not implemented for `Box<i32>`
88
|
9+
= help: the following other types implement trait `objc2_encode::encode::Encode`:
10+
&'a T
11+
&'a mut T
12+
()
13+
*const T
14+
*const c_void
15+
*mut T
16+
*mut c_void
17+
ManuallyDrop<T>
18+
and 140 others
919
= note: required because of the requirements on the impl of `objc2_encode::encode::EncodeArguments` for `(Box<i32>,)`
1020
= note: required because of the requirements on the impl of `Sync` for `GlobalBlock<(Box<i32>,)>`
1121
= note: shared static variables must have a type that implements `Sync`

tests/ui/msg_send_not_encode.stderr

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ error[E0277]: the trait bound `Vec<u8>: Encode` is not satisfied
44
7 | let _: Vec<u8> = msg_send![cls, new];
55
| ^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `Vec<u8>`
66
|
7+
= help: the following other types implement trait `Encode`:
8+
&'a T
9+
&'a mut T
10+
()
11+
*const T
12+
*const c_void
13+
*mut T
14+
*mut c_void
15+
ManuallyDrop<T>
16+
and 142 others
717
note: required by a bound in `send_message`
818
--> $WORKSPACE/objc2/src/message/mod.rs
919
|

tests/ui/msg_send_only_message.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ error[E0277]: the trait bound `{integer}: MessageReceiver` is not satisfied
44
5 | unsafe { msg_send![1, new] };
55
| ^^^^^^^^^^^^^^^^^ the trait `MessageReceiver` is not implemented for `{integer}`
66
|
7+
= help: the following other types implement trait `MessageReceiver`:
8+
&'a T
9+
&'a mut T
10+
*const T
11+
*mut T
12+
Id<T, O>
13+
ManuallyDrop<T>
14+
NonNull<T>
715
= note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/ui/nsvalue_f32_not_eq.stderr

+10-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ error[E0277]: the trait bound `f32: Eq` is not satisfied
44
11 | needs_eq::<NSValue<f32>>();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `f32`
66
|
7-
= help: the following implementations were found:
8-
<i128 as Eq>
9-
<i16 as Eq>
10-
<i32 as Eq>
11-
<i64 as Eq>
12-
and 8 others
7+
= help: the following other types implement trait `Eq`:
8+
i128
9+
i16
10+
i32
11+
i64
12+
i8
13+
isize
14+
u128
15+
u16
16+
and 4 others
1317
= note: required because of the requirements on the impl of `Eq` for `NSValue<f32>`
1418
note: required by a bound in `needs_eq`
1519
--> ui/nsvalue_f32_not_eq.rs:5:16

0 commit comments

Comments
 (0)