error[E0107]: missing generics for associated type `Monad::Wrapped` --> $DIR/issue-79636-1.rs:14:34 | LL | MInner: Monad>, | ^^^^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `B` --> $DIR/issue-79636-1.rs:3:10 | LL | type Wrapped; | ^^^^^^^ - help: add missing generic argument | LL | MInner: Monad = MOuter::Wrapped>, | +++ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/issue-79636-1.rs:5:19 | LL | fn bind(self, f: F) -> Self::Wrapped { | ^^^^ doesn't have a size known at compile-time | = help: unsized fn params are gated as an unstable feature help: consider further restricting `Self` | LL | fn bind(self, f: F) -> Self::Wrapped where Self: Sized { | +++++++++++++++++ help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn bind(&self, f: F) -> Self::Wrapped { | + error[E0277]: the trait bound `Option>: Monad` is not satisfied --> $DIR/issue-79636-1.rs:21:21 | LL | assert_eq!(join(Some(Some(true))), Some(true)); | ---- ^^^^^^^^^^^^^^^^ the trait `Monad` is not implemented for `Option>` | | | required by a bound introduced by this call | help: this trait has no implementations, consider adding one --> $DIR/issue-79636-1.rs:1:1 | LL | trait Monad { | ^^^^^^^^^^^ note: required by a bound in `join` --> $DIR/issue-79636-1.rs:13:13 | LL | fn join(outer: MOuter) -> MOuter::Wrapped | ---- required by a bound in this function LL | where LL | MOuter: Monad, | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `join` error: aborting due to 3 previous errors Some errors have detailed explanations: E0107, E0277. For more information about an error, try `rustc --explain E0107`.