Skip to content

Commit 5fd52e8

Browse files
committed
Fix nightly warnings related to lifetimes
The following warnings appear: ``` src/lib.rs:73:5: 73:68 warning: the trait `core::marker::Sized` is not implemented for the type `Self` [E0277] src/lib.rs:73 unsafe fn call_block<R>(self, block: *mut Block<Self, R>) -> R; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lib.rs:73:5: 73:68 help: run `rustc --explain E0277` to see a detailed explanation src/lib.rs:73:5: 73:68 note: `Self` does not have a constant size known at compile-time src/lib.rs:73 unsafe fn call_block<R>(self, block: *mut Block<Self, R>) -> R; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lib.rs:73:5: 73:68 note: this warning results from recent bug fixes and clarifications; it will become a HARD ERROR in the next release. See RFC 1214 for details. src/lib.rs:73 unsafe fn call_block<R>(self, block: *mut Block<Self, R>) -> R; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lib.rs:73:5: 73:68 note: required by `Block` src/lib.rs:73 unsafe fn call_block<R>(self, block: *mut Block<Self, R>) -> R; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lib.rs:187:5: 187:71 warning: the trait `core::marker::Sized` is not implemented for the type `Self` [E0277] src/lib.rs:187 fn into_concrete_block(self) -> ConcreteBlock<A, Self::Ret, Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lib.rs:187:5: 187:71 help: run `rustc --explain E0277` to see a detailed explanation src/lib.rs:187:5: 187:71 note: `Self` does not have a constant size known at compile-time src/lib.rs:187 fn into_concrete_block(self) -> ConcreteBlock<A, Self::Ret, Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lib.rs:187:5: 187:71 note: this warning results from recent bug fixes and clarifications; it will become a HARD ERROR in the next release. See RFC 1214 for details. src/lib.rs:187 fn into_concrete_block(self) -> ConcreteBlock<A, Self::Ret, Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lib.rs:187:5: 187:71 note: required by `ConcreteBlock` src/lib.rs:187 fn into_concrete_block(self) -> ConcreteBlock<A, Self::Ret, Self>; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` ...because of: rust-lang/rfcs#1214
1 parent a4cba0b commit 5fd52e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extern {
6565
}
6666

6767
/// Types that may be used as the arguments to an Objective-C block.
68-
pub trait BlockArguments {
68+
pub trait BlockArguments: Sized {
6969
/// Calls the given `Block` with self as the arguments.
7070
///
7171
/// Unsafe because `block` must point to a valid `Block` and this invokes
@@ -179,7 +179,7 @@ impl<A, R> Drop for RcBlock<A, R> {
179179
}
180180

181181
/// Types that may be converted into a `ConcreteBlock`.
182-
pub trait IntoConcreteBlock<A> where A: BlockArguments {
182+
pub trait IntoConcreteBlock<A>: Sized where A: BlockArguments {
183183
/// The return type of the resulting `ConcreteBlock`.
184184
type Ret;
185185

0 commit comments

Comments
 (0)