File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
error: higher-ranked subtype error
2
- --> $DIR/issue-30786.rs:113:18
2
+ --> $DIR/issue-30786.rs:108:15
3
+ |
4
+ LL | let map = source.map(|x: &_| x);
5
+ | ^^^^^^^^^^^^^^^^^^^^^
6
+
7
+ error: higher-ranked subtype error
8
+ --> $DIR/issue-30786.rs:114:18
3
9
|
4
10
LL | let filter = map.filter(|x: &_| true);
5
11
| ^^^^^^^^^^^^^^^^^^^^^^^^
6
12
7
13
error: higher-ranked subtype error
8
- --> $DIR/issue-30786.rs:115 :17
14
+ --> $DIR/issue-30786.rs:116 :17
9
15
|
10
16
LL | let count = filter.count(); // Assert that we still have a valid stream.
11
17
| ^^^^^^^^^^^^^^
12
18
13
- error: aborting due to 2 previous errors
19
+ error: aborting due to 3 previous errors
14
20
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ impl<T> StreamExt for T where for<'a> &'a mut T: Stream { }
106
106
fn main ( ) {
107
107
let source = Repeat ( 10 ) ;
108
108
let map = source. map ( |x : & _ | x) ;
109
- //[migrate]~^ ERROR implementation of `Stream` is not general enough
109
+ //[nll]~^ ERROR higher-ranked subtype error
110
+ //[migrate]~^^ ERROR implementation of `Stream` is not general enough
110
111
//[migrate]~| NOTE `Stream` would have to be implemented for the type `&'0 mut Map
111
112
//[migrate]~| NOTE but `Stream` is actually implemented for the type `&'1
112
113
//[migrate]~| NOTE implementation of `Stream` is not general enough
You can’t perform that action at this time.
0 commit comments