diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f8dba124..6aa5e9dc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,8 @@ on: push: branches: [master] pull_request: + schedule: + - cron: '0 9 * * MON' env: CARGO_TERM_COLOR: always diff --git a/block2/src/global.rs b/block2/src/global.rs index de81064a2..f56f80371 100644 --- a/block2/src/global.rs +++ b/block2/src/global.rs @@ -18,12 +18,13 @@ const GLOBAL_DESCRIPTOR: ffi::Block_descriptor_header = ffi::Block_descriptor_he /// An Objective-C block that does not capture it's environment. /// /// This is effectively just a glorified function pointer, and can created and -/// stored in static memory using the [`global_block`][`global_block!`] macro. +/// stored in static memory using the [`global_block!`] macro. /// /// If [`ConcreteBlock`] is the [`Fn`]-block equivalent, this is likewise the /// [`fn`]-block equivalent. /// /// [`ConcreteBlock`]: crate::ConcreteBlock +/// [`global_block!`]: crate::global_block #[repr(C)] pub struct GlobalBlock { layout: ffi::Block_layout, @@ -88,9 +89,9 @@ where /// Construct a static [`GlobalBlock`]. /// -/// The syntax is similar to a static closure. Note that the block cannot -/// capture it's environment, and it's argument types and return type must be -/// [`Encode`]. +/// The syntax is similar to a static closure (except that all types have to +/// be specified). Note that the block cannot capture it's environment, and +/// it's argument types and return type must be [`Encode`]. /// /// # Examples /// diff --git a/objc2/src/message/mod.rs b/objc2/src/message/mod.rs index e765b7ff2..801e26952 100644 --- a/objc2/src/message/mod.rs +++ b/objc2/src/message/mod.rs @@ -287,7 +287,6 @@ macro_rules! message_args_impl { ($($a:ident : $t:ident),*) => ( unsafe impl<$($t: Encode),*> MessageArguments for ($($t,)*) { #[inline] - #[doc(hidden)] unsafe fn __invoke(imp: Imp, obj: *mut Object, sel: Sel, ($($a,)*): Self) -> R { // The imp must be cast to the appropriate function pointer // type before being called; the msgSend functions are not diff --git a/tests/ui/global_block_not_encode.stderr b/tests/ui/global_block_not_encode.stderr index 3e4c8d795..1c35bcf29 100644 --- a/tests/ui/global_block_not_encode.stderr +++ b/tests/ui/global_block_not_encode.stderr @@ -6,6 +6,16 @@ error[E0277]: the trait bound `Box: objc2_encode::encode::Encode` is not sa 5 | | } | |_^ the trait `objc2_encode::encode::Encode` is not implemented for `Box` | + = help: the following other types implement trait `objc2_encode::encode::Encode`: + &'a T + &'a mut T + () + *const T + *const c_void + *mut T + *mut c_void + ManuallyDrop + and 140 others = note: required because of the requirements on the impl of `objc2_encode::encode::EncodeArguments` for `(Box,)` = note: required because of the requirements on the impl of `Sync` for `GlobalBlock<(Box,)>` = note: shared static variables must have a type that implements `Sync` diff --git a/tests/ui/msg_send_not_encode.stderr b/tests/ui/msg_send_not_encode.stderr index b9f4ba99f..7bc8d38d5 100644 --- a/tests/ui/msg_send_not_encode.stderr +++ b/tests/ui/msg_send_not_encode.stderr @@ -4,6 +4,16 @@ error[E0277]: the trait bound `Vec: Encode` is not satisfied 7 | let _: Vec = msg_send![cls, new]; | ^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `Vec` | + = help: the following other types implement trait `Encode`: + &'a T + &'a mut T + () + *const T + *const c_void + *mut T + *mut c_void + ManuallyDrop + and 142 others note: required by a bound in `send_message` --> $WORKSPACE/objc2/src/message/mod.rs | diff --git a/tests/ui/msg_send_only_message.stderr b/tests/ui/msg_send_only_message.stderr index 6dc7ef14a..9dddfbff9 100644 --- a/tests/ui/msg_send_only_message.stderr +++ b/tests/ui/msg_send_only_message.stderr @@ -4,4 +4,12 @@ error[E0277]: the trait bound `{integer}: MessageReceiver` is not satisfied 5 | unsafe { msg_send![1, new] }; | ^^^^^^^^^^^^^^^^^ the trait `MessageReceiver` is not implemented for `{integer}` | + = help: the following other types implement trait `MessageReceiver`: + &'a T + &'a mut T + *const T + *mut T + Id + ManuallyDrop + NonNull = note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/nsvalue_f32_not_eq.stderr b/tests/ui/nsvalue_f32_not_eq.stderr index a3620d668..d604a4cbe 100644 --- a/tests/ui/nsvalue_f32_not_eq.stderr +++ b/tests/ui/nsvalue_f32_not_eq.stderr @@ -4,12 +4,16 @@ error[E0277]: the trait bound `f32: Eq` is not satisfied 11 | needs_eq::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `f32` | - = help: the following implementations were found: - - - - - and 8 others + = help: the following other types implement trait `Eq`: + i128 + i16 + i32 + i64 + i8 + isize + u128 + u16 + and 4 others = note: required because of the requirements on the impl of `Eq` for `NSValue` note: required by a bound in `needs_eq` --> ui/nsvalue_f32_not_eq.rs:5:16