diff --git a/src/test/ui/hrtb/issue-30786.nll.stderr b/src/test/ui/hrtb/issue-30786.nll.stderr index 1cfd93e59d935..cd1272da2a66e 100644 --- a/src/test/ui/hrtb/issue-30786.nll.stderr +++ b/src/test/ui/hrtb/issue-30786.nll.stderr @@ -1,14 +1,20 @@ error: higher-ranked subtype error - --> $DIR/issue-30786.rs:113:18 + --> $DIR/issue-30786.rs:108:15 + | +LL | let map = source.map(|x: &_| x); + | ^^^^^^^^^^^^^^^^^^^^^ + +error: higher-ranked subtype error + --> $DIR/issue-30786.rs:114:18 | LL | let filter = map.filter(|x: &_| true); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: higher-ranked subtype error - --> $DIR/issue-30786.rs:115:17 + --> $DIR/issue-30786.rs:116:17 | LL | let count = filter.count(); // Assert that we still have a valid stream. | ^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors diff --git a/src/test/ui/hrtb/issue-30786.rs b/src/test/ui/hrtb/issue-30786.rs index 1bbef995fe885..34d6b19f602f7 100644 --- a/src/test/ui/hrtb/issue-30786.rs +++ b/src/test/ui/hrtb/issue-30786.rs @@ -106,7 +106,8 @@ impl StreamExt for T where for<'a> &'a mut T: Stream { } fn main() { let source = Repeat(10); let map = source.map(|x: &_| x); - //[migrate]~^ ERROR implementation of `Stream` is not general enough + //[nll]~^ ERROR higher-ranked subtype error + //[migrate]~^^ ERROR implementation of `Stream` is not general enough //[migrate]~| NOTE `Stream` would have to be implemented for the type `&'0 mut Map //[migrate]~| NOTE but `Stream` is actually implemented for the type `&'1 //[migrate]~| NOTE implementation of `Stream` is not general enough