Skip to content

Commit b7c192e

Browse files
committed
Use revisions for NLL in hrtb
1 parent b16bd7c commit b7c192e

21 files changed

+95
-71
lines changed

src/test/ui/hrtb/hrtb-conflate-regions.stderr renamed to src/test/ui/hrtb/hrtb-conflate-regions.base.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Foo` is not general enough
2-
--> $DIR/hrtb-conflate-regions.rs:27:10
2+
--> $DIR/hrtb-conflate-regions.rs:31:10
33
|
44
LL | fn b() { want_foo2::<SomeStruct>(); }
55
| ^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough

src/test/ui/hrtb/hrtb-conflate-regions.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Foo` is not general enough
2-
--> $DIR/hrtb-conflate-regions.rs:27:10
2+
--> $DIR/hrtb-conflate-regions.rs:31:10
33
|
44
LL | fn b() { want_foo2::<SomeStruct>(); }
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
@@ -8,7 +8,7 @@ LL | fn b() { want_foo2::<SomeStruct>(); }
88
= note: ...but it actually implements `Foo<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
99

1010
error: implementation of `Foo` is not general enough
11-
--> $DIR/hrtb-conflate-regions.rs:27:10
11+
--> $DIR/hrtb-conflate-regions.rs:31:10
1212
|
1313
LL | fn b() { want_foo2::<SomeStruct>(); }
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough

src/test/ui/hrtb/hrtb-conflate-regions.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// revisions: base nll
2+
// ignore-compare-mode-nll
3+
//[nll] compile-flags: -Z borrowck=mir
4+
15
// Test that an impl with only one bound region `'a` cannot be used to
26
// satisfy a constraint where there are two bound regions.
37

@@ -24,6 +28,9 @@ impl<'a> Foo<(&'a isize, &'a isize)> for SomeStruct
2428
}
2529

2630
fn a() { want_foo1::<SomeStruct>(); } // OK -- foo wants just one region
27-
fn b() { want_foo2::<SomeStruct>(); } //~ ERROR
31+
fn b() { want_foo2::<SomeStruct>(); }
32+
//[base]~^ ERROR
33+
//[nll]~^^ ERROR implementation of
34+
//[nll]~| ERROR implementation of
2835

2936
fn main() { }

src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr renamed to src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.base.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Trait` is not general enough
2-
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5
2+
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:38:5
33
|
44
LL | foo::<()>();
55
| ^^^^^^^^^ implementation of `Trait` is not general enough

src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Trait` is not general enough
2-
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5
2+
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:38:5
33
|
44
LL | foo::<()>();
55
| ^^^^^^^^^^^ implementation of `Trait` is not general enough

src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// revisions: base nll
2+
// ignore-compare-mode-nll
3+
//[nll] compile-flags: -Z borrowck=mir
4+
15
// Test a case where variance and higher-ranked types interact in surprising ways.
26
//
37
// In particular, we test this pattern in trait solving, where it is not connected

src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr renamed to src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.base.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Trait` is not general enough
2-
--> $DIR/hrtb-exists-forall-trait-invariant.rs:28:5
2+
--> $DIR/hrtb-exists-forall-trait-invariant.rs:32:5
33
|
44
LL | foo::<()>();
55
| ^^^^^^^^^ implementation of `Trait` is not general enough

src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Trait` is not general enough
2-
--> $DIR/hrtb-exists-forall-trait-invariant.rs:28:5
2+
--> $DIR/hrtb-exists-forall-trait-invariant.rs:32:5
33
|
44
LL | foo::<()>();
55
| ^^^^^^^^^^^ implementation of `Trait` is not general enough

src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// revisions: base nll
2+
// ignore-compare-mode-nll
3+
//[nll] compile-flags: -Z borrowck=mir
4+
15
// Test an `exists<'a> { forall<'b> { 'a = 'b } }` pattern -- which should not compile!
26
//
37
// In particular, we test this pattern in trait solving, where it is not connected

src/test/ui/hrtb/hrtb-just-for-static.stderr renamed to src/test/ui/hrtb/hrtb-just-for-static.base.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Foo` is not general enough
2-
--> $DIR/hrtb-just-for-static.rs:24:5
2+
--> $DIR/hrtb-just-for-static.rs:28:5
33
|
44
LL | want_hrtb::<StaticInt>()
55
| ^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
@@ -8,7 +8,7 @@ LL | want_hrtb::<StaticInt>()
88
= note: ...but it actually implements `Foo<&'static isize>`
99

1010
error: implementation of `Foo` is not general enough
11-
--> $DIR/hrtb-just-for-static.rs:30:5
11+
--> $DIR/hrtb-just-for-static.rs:34:5
1212
|
1313
LL | want_hrtb::<&'a u32>()
1414
| ^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough

src/test/ui/hrtb/hrtb-just-for-static.nll.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Foo` is not general enough
2-
--> $DIR/hrtb-just-for-static.rs:24:5
2+
--> $DIR/hrtb-just-for-static.rs:28:5
33
|
44
LL | want_hrtb::<StaticInt>()
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
@@ -8,15 +8,15 @@ LL | want_hrtb::<StaticInt>()
88
= note: ...but it actually implements `Foo<&'static isize>`
99

1010
error: lifetime may not live long enough
11-
--> $DIR/hrtb-just-for-static.rs:30:5
11+
--> $DIR/hrtb-just-for-static.rs:34:5
1212
|
1313
LL | fn give_some<'a>() {
1414
| -- lifetime `'a` defined here
1515
LL | want_hrtb::<&'a u32>()
1616
| ^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
1717

1818
error: implementation of `Foo` is not general enough
19-
--> $DIR/hrtb-just-for-static.rs:30:5
19+
--> $DIR/hrtb-just-for-static.rs:34:5
2020
|
2121
LL | want_hrtb::<&'a u32>()
2222
| ^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough

src/test/ui/hrtb/hrtb-just-for-static.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// revisions: base nll
2+
// ignore-compare-mode-nll
3+
//[nll] compile-flags: -Z borrowck=mir
4+
15
// Test a case where you have an impl of `Foo<X>` for all `X` that
26
// is being applied to `for<'a> Foo<&'a mut X>`. Issue #19730.
37

@@ -27,7 +31,10 @@ fn give_static() {
2731
// AnyInt implements Foo<&'a isize> for any 'a, so it is a match.
2832
impl<'a> Foo<&'a isize> for &'a u32 { }
2933
fn give_some<'a>() {
30-
want_hrtb::<&'a u32>() //~ ERROR
34+
want_hrtb::<&'a u32>()
35+
//[base]~^ ERROR
36+
//[nll]~^^ ERROR lifetime may not live long enough
37+
//[nll]~| ERROR implementation of `Foo` is not general enough
3138
}
3239

3340
fn main() { }

src/test/ui/hrtb/hrtb-perfect-forwarding.stderr renamed to src/test/ui/hrtb/hrtb-perfect-forwarding.base.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: implementation of `Bar` is not general enough
2-
--> $DIR/hrtb-perfect-forwarding.rs:43:5
2+
--> $DIR/hrtb-perfect-forwarding.rs:47:5
33
|
44
LL | foo_hrtb_bar_not(&mut t);
55
| ^^^^^^^^^^^^^^^^ implementation of `Bar` is not general enough
@@ -8,7 +8,7 @@ LL | foo_hrtb_bar_not(&mut t);
88
= note: ...but it actually implements `Bar<&'b isize>`
99

1010
error: implementation of `Bar` is not general enough
11-
--> $DIR/hrtb-perfect-forwarding.rs:43:5
11+
--> $DIR/hrtb-perfect-forwarding.rs:47:5
1212
|
1313
LL | foo_hrtb_bar_not(&mut t);
1414
| ^^^^^^^^^^^^^^^^ implementation of `Bar` is not general enough

src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: function cannot return without recursing
2-
--> $DIR/hrtb-perfect-forwarding.rs:16:1
2+
--> $DIR/hrtb-perfect-forwarding.rs:20:1
33
|
44
LL | / fn no_hrtb<'b, T>(mut t: T)
55
LL | | where
@@ -15,7 +15,7 @@ LL | | }
1515
= help: a `loop` may express intention better if this is on purpose
1616

1717
warning: function cannot return without recursing
18-
--> $DIR/hrtb-perfect-forwarding.rs:25:1
18+
--> $DIR/hrtb-perfect-forwarding.rs:29:1
1919
|
2020
LL | / fn bar_hrtb<T>(mut t: T)
2121
LL | | where
@@ -30,7 +30,7 @@ LL | | }
3030
= help: a `loop` may express intention better if this is on purpose
3131

3232
warning: function cannot return without recursing
33-
--> $DIR/hrtb-perfect-forwarding.rs:35:1
33+
--> $DIR/hrtb-perfect-forwarding.rs:39:1
3434
|
3535
LL | / fn foo_hrtb_bar_not<'b, T>(mut t: T)
3636
LL | | where
@@ -39,15 +39,15 @@ LL | | {
3939
... |
4040
LL | | foo_hrtb_bar_not(&mut t);
4141
| | ------------------------ recursive call site
42-
LL | |
42+
... |
4343
LL | |
4444
LL | | }
4545
| |_^ cannot return without recursing
4646
|
4747
= help: a `loop` may express intention better if this is on purpose
4848

4949
error: lifetime may not live long enough
50-
--> $DIR/hrtb-perfect-forwarding.rs:43:5
50+
--> $DIR/hrtb-perfect-forwarding.rs:47:5
5151
|
5252
LL | fn foo_hrtb_bar_not<'b, T>(mut t: T)
5353
| -- lifetime `'b` defined here
@@ -56,7 +56,7 @@ LL | foo_hrtb_bar_not(&mut t);
5656
| ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
5757

5858
error: implementation of `Bar` is not general enough
59-
--> $DIR/hrtb-perfect-forwarding.rs:43:5
59+
--> $DIR/hrtb-perfect-forwarding.rs:47:5
6060
|
6161
LL | foo_hrtb_bar_not(&mut t);
6262
| ^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Bar` is not general enough
@@ -65,7 +65,7 @@ LL | foo_hrtb_bar_not(&mut t);
6565
= note: ...but it actually implements `Bar<&'1 isize>`, for some specific lifetime `'1`
6666

6767
warning: function cannot return without recursing
68-
--> $DIR/hrtb-perfect-forwarding.rs:48:1
68+
--> $DIR/hrtb-perfect-forwarding.rs:53:1
6969
|
7070
LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T)
7171
LL | | where

src/test/ui/hrtb/hrtb-perfect-forwarding.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// revisions: base nll
2+
// ignore-compare-mode-nll
3+
//[nll] compile-flags: -Z borrowck=mir
4+
15
// Test a case where you have an impl of `Foo<X>` for all `X` that
26
// is being applied to `for<'a> Foo<&'a mut X>`. Issue #19730.
37

@@ -13,7 +17,7 @@ impl<'a, X, F> Foo<X> for &'a mut F where F: Foo<X> + Bar<X> {}
1317

1418
impl<'a, X, F> Bar<X> for &'a mut F where F: Bar<X> {}
1519

16-
fn no_hrtb<'b, T>(mut t: T)
20+
fn no_hrtb<'b, T>(mut t: T) //[nll]~ WARN function cannot return
1721
where
1822
T: Bar<&'b isize>,
1923
{
@@ -22,7 +26,7 @@ where
2226
no_hrtb(&mut t);
2327
}
2428

25-
fn bar_hrtb<T>(mut t: T)
29+
fn bar_hrtb<T>(mut t: T) //[nll]~ WARN function cannot return
2630
where
2731
T: for<'b> Bar<&'b isize>,
2832
{
@@ -32,7 +36,7 @@ where
3236
bar_hrtb(&mut t);
3337
}
3438

35-
fn foo_hrtb_bar_not<'b, T>(mut t: T)
39+
fn foo_hrtb_bar_not<'b, T>(mut t: T) //[nll]~ WARN function cannot return
3640
where
3741
T: for<'a> Foo<&'a isize> + Bar<&'b isize>,
3842
{
@@ -42,10 +46,11 @@ where
4246
// clause only specifies `T : Bar<&'b isize>`.
4347
foo_hrtb_bar_not(&mut t);
4448
//~^ ERROR implementation of `Bar` is not general enough
45-
//~| ERROR implementation of `Bar` is not general enough
49+
//[base]~^^ ERROR implementation of `Bar` is not general enough
50+
//[nll]~^^^ ERROR lifetime may not live long enough
4651
}
4752

48-
fn foo_hrtb_bar_hrtb<T>(mut t: T)
53+
fn foo_hrtb_bar_hrtb<T>(mut t: T) //[nll]~ WARN function cannot return
4954
where
5055
T: for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>,
5156
{

src/test/ui/hrtb/issue-30786.migrate.stderr renamed to src/test/ui/hrtb/issue-30786.base.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
error[E0599]: the method `filterx` exists for struct `Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>`, but its trait bounds were not satisfied
2-
--> $DIR/issue-30786.rs:127:22
1+
error[E0599]: the method `filterx` exists for struct `Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>`, but its trait bounds were not satisfied
2+
--> $DIR/issue-30786.rs:122:22
33
|
44
LL | pub struct Map<S, F> {
55
| --------------------
@@ -8,13 +8,13 @@ LL | pub struct Map<S, F> {
88
| doesn't satisfy `_: StreamExt`
99
...
1010
LL | let filter = map.filterx(|x: &_| true);
11-
| ^^^^^^^ method cannot be called on `Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>` due to unsatisfied trait bounds
11+
| ^^^^^^^ method cannot be called on `Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>` due to unsatisfied trait bounds
1212
|
1313
note: the following trait bounds were not satisfied:
14-
`&'a mut &Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>: Stream`
15-
`&'a mut &mut Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>: Stream`
16-
`&'a mut Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>: Stream`
17-
--> $DIR/issue-30786.rs:105:50
14+
`&'a mut &Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>: Stream`
15+
`&'a mut &mut Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>: Stream`
16+
`&'a mut Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>: Stream`
17+
--> $DIR/issue-30786.rs:100:50
1818
|
1919
LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {}
2020
| --------- - ^^^^^^ unsatisfied trait bound introduced here
@@ -23,8 +23,8 @@ help: one of the expressions' fields has a method of the same name
2323
LL | let filter = map.stream.filterx(|x: &_| true);
2424
| +++++++
2525

26-
error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>`, but its trait bounds were not satisfied
27-
--> $DIR/issue-30786.rs:140:24
26+
error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>`, but its trait bounds were not satisfied
27+
--> $DIR/issue-30786.rs:134:24
2828
|
2929
LL | pub struct Filter<S, F> {
3030
| -----------------------
@@ -33,13 +33,13 @@ LL | pub struct Filter<S, F> {
3333
| doesn't satisfy `_: StreamExt`
3434
...
3535
LL | let count = filter.countx();
36-
| ^^^^^^ method cannot be called on `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>` due to unsatisfied trait bounds
36+
| ^^^^^^ method cannot be called on `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>` due to unsatisfied trait bounds
3737
|
3838
note: the following trait bounds were not satisfied:
39-
`&'a mut &Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>: Stream`
40-
`&'a mut &mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>: Stream`
41-
`&'a mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>: Stream`
42-
--> $DIR/issue-30786.rs:105:50
39+
`&'a mut &Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>: Stream`
40+
`&'a mut &mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>: Stream`
41+
`&'a mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>: Stream`
42+
--> $DIR/issue-30786.rs:100:50
4343
|
4444
LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {}
4545
| --------- - ^^^^^^ unsatisfied trait bound introduced here

src/test/ui/hrtb/issue-30786.nll.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
error[E0599]: the method `filterx` exists for struct `Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>`, but its trait bounds were not satisfied
2-
--> $DIR/issue-30786.rs:127:22
1+
error[E0599]: the method `filterx` exists for struct `Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>`, but its trait bounds were not satisfied
2+
--> $DIR/issue-30786.rs:122:22
33
|
44
LL | pub struct Map<S, F> {
55
| --------------------
@@ -8,13 +8,13 @@ LL | pub struct Map<S, F> {
88
| doesn't satisfy `_: StreamExt`
99
...
1010
LL | let filter = map.filterx(|x: &_| true);
11-
| ^^^^^^^ method cannot be called on `Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>` due to unsatisfied trait bounds
11+
| ^^^^^^^ method cannot be called on `Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>` due to unsatisfied trait bounds
1212
|
1313
note: the following trait bounds were not satisfied:
14-
`&'a mut &Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>: Stream`
15-
`&'a mut &mut Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>: Stream`
16-
`&'a mut Map<Repeat, [closure@$DIR/issue-30786.rs:126:27: 126:36]>: Stream`
17-
--> $DIR/issue-30786.rs:105:50
14+
`&'a mut &Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>: Stream`
15+
`&'a mut &mut Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>: Stream`
16+
`&'a mut Map<Repeat, [closure@$DIR/issue-30786.rs:121:27: 121:36]>: Stream`
17+
--> $DIR/issue-30786.rs:100:50
1818
|
1919
LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {}
2020
| --------- - ^^^^^^ unsatisfied trait bound introduced here
@@ -23,8 +23,8 @@ help: one of the expressions' fields has a method of the same name
2323
LL | let filter = map.stream.filterx(|x: &_| true);
2424
| +++++++
2525

26-
error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>`, but its trait bounds were not satisfied
27-
--> $DIR/issue-30786.rs:140:24
26+
error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>`, but its trait bounds were not satisfied
27+
--> $DIR/issue-30786.rs:134:24
2828
|
2929
LL | pub struct Filter<S, F> {
3030
| -----------------------
@@ -33,13 +33,13 @@ LL | pub struct Filter<S, F> {
3333
| doesn't satisfy `_: StreamExt`
3434
...
3535
LL | let count = filter.countx();
36-
| ^^^^^^ method cannot be called on `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>` due to unsatisfied trait bounds
36+
| ^^^^^^ method cannot be called on `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>` due to unsatisfied trait bounds
3737
|
3838
note: the following trait bounds were not satisfied:
39-
`&'a mut &Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>: Stream`
40-
`&'a mut &mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>: Stream`
41-
`&'a mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:139:30: 139:42]>: Stream`
42-
--> $DIR/issue-30786.rs:105:50
39+
`&'a mut &Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>: Stream`
40+
`&'a mut &mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>: Stream`
41+
`&'a mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:133:30: 133:42]>: Stream`
42+
--> $DIR/issue-30786.rs:100:50
4343
|
4444
LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {}
4545
| --------- - ^^^^^^ unsatisfied trait bound introduced here

0 commit comments

Comments
 (0)