|
1 |
| -error: implementation of `FnOnce` is not general enough |
2 |
| - --> $DIR/issue-30786-1.rs:115:15 |
3 |
| - | |
4 |
| -LL | let map = source.mapx(|x: &_| x); |
5 |
| - | ^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough |
6 |
| - | |
7 |
| - = note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... |
8 |
| - = note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` |
9 |
| - |
10 |
| -error: implementation of `FnOnce` is not general enough |
11 |
| - --> $DIR/issue-30786-1.rs:117:18 |
12 |
| - | |
13 |
| -LL | let filter = map.filterx(|x: &_| true); |
14 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough |
15 |
| - | |
16 |
| - = note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... |
17 |
| - = note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` |
18 |
| - |
19 |
| -error: implementation of `FnOnce` is not general enough |
20 |
| - --> $DIR/issue-30786-1.rs:117:18 |
| 1 | +error[E0599]: the method `filterx` exists for struct `Map<Repeat, { [email protected]:115:27}>`, but its trait bounds were not satisfied |
| 2 | + --> $DIR/issue-30786-1.rs:116:22 |
21 | 3 | |
|
| 4 | +LL | pub struct Map<S, F> { |
| 5 | + | -------------------- method `filterx` not found for this struct because it doesn't satisfy `_: StreamExt` |
| 6 | +... |
22 | 7 | LL | let filter = map.filterx(|x: &_| true);
|
23 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough |
| 8 | + | ^^^^^^^ method cannot be called on `Map<Repeat, {[email protected]:115:27}>` due to unsatisfied trait bounds |
24 | 9 | |
|
25 |
| - = note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... |
26 |
| - = note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` |
27 |
| - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
28 |
| - |
29 |
| -error: implementation of `FnOnce` is not general enough |
30 |
| - --> $DIR/issue-30786-1.rs:117:18 |
31 |
| - | |
32 |
| -LL | let filter = map.filterx(|x: &_| true); |
33 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough |
34 |
| - | |
35 |
| - = note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... |
36 |
| - = note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` |
37 |
| - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
38 |
| - |
39 |
| -error: implementation of `FnOnce` is not general enough |
40 |
| - --> $DIR/issue-30786-1.rs:117:18 |
41 |
| - | |
42 |
| -LL | let filter = map.filterx(|x: &_| true); |
43 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough |
| 10 | +note: the following trait bounds were not satisfied: |
| 11 | + `&'a mut &Map<Repeat, {closure@$DIR/issue-30786-1.rs:115:27: 115:34}>: Stream` |
| 12 | + `&'a mut &mut Map<Repeat, {closure@$DIR/issue-30786-1.rs:115:27: 115:34}>: Stream` |
| 13 | + `&'a mut Map<Repeat, {closure@$DIR/issue-30786-1.rs:115:27: 115:34}>: Stream` |
| 14 | + --> $DIR/issue-30786-1.rs:98:50 |
44 | 15 | |
|
45 |
| - = note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... |
46 |
| - = note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` |
47 |
| - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 16 | +LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {} |
| 17 | + | --------- - ^^^^^^ unsatisfied trait bound introduced here |
48 | 18 |
|
49 |
| -error: aborting due to 5 previous errors |
| 19 | +error: aborting due to 1 previous error |
50 | 20 |
|
| 21 | +For more information about this error, try `rustc --explain E0599`. |
0 commit comments