File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11error: 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
39 |
410LL | let filter = map.filter(|x: &_| true);
511 | ^^^^^^^^^^^^^^^^^^^^^^^^
612
713error: higher-ranked subtype error
8- --> $DIR/issue-30786.rs:115 :17
14+ --> $DIR/issue-30786.rs:116 :17
915 |
1016LL | let count = filter.count(); // Assert that we still have a valid stream.
1117 | ^^^^^^^^^^^^^^
1218
13- error: aborting due to 2 previous errors
19+ error: aborting due to 3 previous errors
1420
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 { }
106106fn main ( ) {
107107 let source = Repeat ( 10 ) ;
108108 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
110111 //[migrate]~| NOTE `Stream` would have to be implemented for the type `&'0 mut Map
111112 //[migrate]~| NOTE but `Stream` is actually implemented for the type `&'1
112113 //[migrate]~| NOTE implementation of `Stream` is not general enough
You can’t perform that action at this time.
0 commit comments