File: issue-79636-1.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (58 lines) | stat: -rw-r--r-- 2,264 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
error[E0107]: missing generics for associated type `Monad::Wrapped`
  --> $DIR/issue-79636-1.rs:14:34
   |
LL |     MInner: Monad<Unwrapped = A, Wrapped = MOuter::Wrapped<A>>,
   |                                  ^^^^^^^ expected 1 generic argument
   |
note: associated type defined here, with 1 generic parameter: `B`
  --> $DIR/issue-79636-1.rs:3:10
   |
LL |     type Wrapped<B>;
   |          ^^^^^^^ -
help: add missing generic argument
   |
LL |     MInner: Monad<Unwrapped = A, Wrapped<B> = MOuter::Wrapped<A>>,
   |                                         +++

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<B, F>(self, f: F) -> Self::Wrapped<B> {
   |                   ^^^^ 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<B, F>(self, f: F) -> Self::Wrapped<B> where Self: Sized {
   |                                                   +++++++++++++++++
help: function arguments must have a statically known size, borrowed types always have a known size
   |
LL |     fn bind<B, F>(&self, f: F) -> Self::Wrapped<B> {
   |                   +

error[E0277]: the trait bound `Option<Option<bool>>: 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<Option<bool>>`
   |                |
   |                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<MOuter, MInner, A>(outer: MOuter) -> MOuter::Wrapped<A>
   |    ---- required by a bound in this function
LL | where
LL |     MOuter: Monad<Unwrapped = MInner>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ 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`.