forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,21 @@ | ||
error: implementation of `FnOnce` is not general enough | ||
--> $DIR/issue-30786-1.rs:115:15 | ||
| | ||
LL | let map = source.mapx(|x: &_| x); | ||
| ^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | ||
| | ||
= note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... | ||
= note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` | ||
|
||
error: implementation of `FnOnce` is not general enough | ||
--> $DIR/issue-30786-1.rs:117:18 | ||
| | ||
LL | let filter = map.filterx(|x: &_| true); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | ||
| | ||
= note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... | ||
= note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` | ||
|
||
error: implementation of `FnOnce` is not general enough | ||
--> $DIR/issue-30786-1.rs:117:18 | ||
error[E0599]: the method `filterx` exists for struct `Map<Repeat, {closure@issue-30786-1.rs:115:27}>`, but its trait bounds were not satisfied | ||
--> $DIR/issue-30786-1.rs:116:22 | ||
| | ||
LL | pub struct Map<S, F> { | ||
| -------------------- method `filterx` not found for this struct because it doesn't satisfy `_: StreamExt` | ||
... | ||
LL | let filter = map.filterx(|x: &_| true); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | ||
| ^^^^^^^ method cannot be called on `Map<Repeat, {closure@issue-30786-1.rs:115:27}>` due to unsatisfied trait bounds | ||
| | ||
= note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... | ||
= note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error: implementation of `FnOnce` is not general enough | ||
--> $DIR/issue-30786-1.rs:117:18 | ||
| | ||
LL | let filter = map.filterx(|x: &_| true); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | ||
| | ||
= note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... | ||
= note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error: implementation of `FnOnce` is not general enough | ||
--> $DIR/issue-30786-1.rs:117:18 | ||
| | ||
LL | let filter = map.filterx(|x: &_| true); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | ||
note: the following trait bounds were not satisfied: | ||
`&'a mut &Map<Repeat, {closure@$DIR/issue-30786-1.rs:115:27: 115:34}>: Stream` | ||
`&'a mut &mut Map<Repeat, {closure@$DIR/issue-30786-1.rs:115:27: 115:34}>: Stream` | ||
`&'a mut Map<Repeat, {closure@$DIR/issue-30786-1.rs:115:27: 115:34}>: Stream` | ||
--> $DIR/issue-30786-1.rs:98:50 | ||
| | ||
= note: closure with signature `fn(&'2 u64) -> &u64` must implement `FnOnce<(&'1 u64,)>`, for any lifetime `'1`... | ||
= note: ...but it actually implements `FnOnce<(&'2 u64,)>`, for some specific lifetime `'2` | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {} | ||
| --------- - ^^^^^^ unsatisfied trait bound introduced here | ||
|
||
error: aborting due to 5 previous errors | ||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0599`. |