From b8588fb49542377ac69569ed03a7fa1adf70f3dc Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 26 Aug 2016 16:14:44 -0400 Subject: [PATCH] Add a `Sized` bound to the `Comonoid` trait Otherwise the type `(Self, Self)` is not well-formed, as tuples may not have unsized members. See rust-lang/rust#33242 for details. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 060f276..6cfedc7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ /// implementation of [`Drop`](http://doc.rust-lang.org/std/ops/trait.Drop.html) /// and [`Clone`](http://doc.rust-lang.org/std/clone/trait.Clone.html), /// respectively. -pub trait Comonoid { +pub trait Comonoid: Sized { /// The dual to the monoidal unit. fn counit(self) -> (); /// The dual to the monoidal multiplication.