about summary refs log tree commit diff
path: root/tests/ui/methods/filter-relevant-fn-bounds.stderr
blob: 82103e62ddfebe781af292eda7c68179dfd6e50b (plain)
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
59
60
61
62
error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
  --> $DIR/filter-relevant-fn-bounds.rs:8:5
   |
LL | /     fn do_something_wrapper<O, F>(self, _: F)
LL | |
LL | |     where
LL | |         F: for<'a> FnOnce(<F as Output<'a>>::Type),
   | |___________________________________________________^ the trait `for<'a> Output<'a>` is not implemented for `F`
   |
help: consider further restricting type parameter `F` with trait `Output`
   |
LL |         F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
   |                                                    ++++++++++++++++++++

error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
  --> $DIR/filter-relevant-fn-bounds.rs:11:12
   |
LL |         F: for<'a> FnOnce(<F as Output<'a>>::Type),
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F`
   |
help: consider further restricting type parameter `F` with trait `Output`
   |
LL |         F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
   |                                                    ++++++++++++++++++++

error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
  --> $DIR/filter-relevant-fn-bounds.rs:11:20
   |
LL |         F: for<'a> FnOnce(<F as Output<'a>>::Type),
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F`
   |
help: consider further restricting type parameter `F` with trait `Output`
   |
LL |         F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
   |                                                    ++++++++++++++++++++

error[E0277]: expected a `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41}`
  --> $DIR/filter-relevant-fn-bounds.rs:20:34
   |
LL |     wrapper.do_something_wrapper(|value| ());
   |             -------------------- ^^^^^^^^^^ expected an `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41}`
   |             |
   |             required by a bound introduced by this call
   |
   = help: the trait `for<'a> Output<'a>` is not implemented for closure `{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41}`
help: this trait has no implementations, consider adding one
  --> $DIR/filter-relevant-fn-bounds.rs:1:1
   |
LL | trait Output<'a> {
   | ^^^^^^^^^^^^^^^^
note: required by a bound in `Wrapper::do_something_wrapper`
  --> $DIR/filter-relevant-fn-bounds.rs:11:12
   |
LL |     fn do_something_wrapper<O, F>(self, _: F)
   |        -------------------- required by a bound in this associated function
...
LL |         F: for<'a> FnOnce(<F as Output<'a>>::Type),
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Wrapper::do_something_wrapper`

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0277`.