Skip to content

Commit c25dd85

Browse files
committed
bless tests
1 parent 7a144e2 commit c25dd85

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

tests/ui/impl-trait/nested-rpit-hrtb.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = im
4848
// This should resolve.
4949
fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {}
5050
//~^ ERROR implementation of `Bar` is not general enough
51-
//~| ERROR lifetime may not live long enough
5251

5352
// This should resolve.
5453
fn two_htrb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Qux<'b>> {}

tests/ui/impl-trait/nested-rpit-hrtb.stderr

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0261]: use of undeclared lifetime name `'b`
2-
--> $DIR/nested-rpit-hrtb.rs:57:77
2+
--> $DIR/nested-rpit-hrtb.rs:56:77
33
|
44
LL | fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> {}
55
| ^^ undeclared lifetime
@@ -15,7 +15,7 @@ LL | fn two_htrb_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Siz
1515
| ++++
1616

1717
error[E0261]: use of undeclared lifetime name `'b`
18-
--> $DIR/nested-rpit-hrtb.rs:65:82
18+
--> $DIR/nested-rpit-hrtb.rs:64:82
1919
|
2020
LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
2121
| ^^ undeclared lifetime
@@ -87,12 +87,6 @@ LL | fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc
8787
but trait `Qux<'_>` is implemented for `()`
8888
= help: for that trait implementation, expected `()`, found `&'a ()`
8989

90-
error: lifetime may not live long enough
91-
--> $DIR/nested-rpit-hrtb.rs:49:93
92-
|
93-
LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {}
94-
| -- lifetime `'b` defined here ^^ opaque type requires that `'b` must outlive `'static`
95-
9690
error: implementation of `Bar` is not general enough
9791
--> $DIR/nested-rpit-hrtb.rs:49:93
9892
|
@@ -103,7 +97,7 @@ LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc =
10397
= note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
10498

10599
error[E0277]: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied
106-
--> $DIR/nested-rpit-hrtb.rs:61:64
100+
--> $DIR/nested-rpit-hrtb.rs:60:64
107101
|
108102
LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {}
109103
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()`
@@ -112,7 +106,7 @@ LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b>
112106
but trait `Qux<'_>` is implemented for `()`
113107
= help: for that trait implementation, expected `()`, found `&'a ()`
114108

115-
error: aborting due to 10 previous errors
109+
error: aborting due to 9 previous errors
116110

117111
Some errors have detailed explanations: E0261, E0277, E0657.
118112
For more information about an error, try `rustc --explain E0261`.

tests/ui/nll/ice-106874.stderr

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ LL | A(B(C::new(D::new(move |st| f(st)))))
1717
= note: ...but it actually implements `FnOnce<(&'1 mut V,)>`, for some specific lifetime `'1`
1818
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1919

20+
error: higher-ranked subtype error
21+
--> $DIR/ice-106874.rs:8:5
22+
|
23+
LL | A(B(C::new(D::new(move |st| f(st)))))
24+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25+
26+
error: higher-ranked subtype error
27+
--> $DIR/ice-106874.rs:8:5
28+
|
29+
LL | A(B(C::new(D::new(move |st| f(st)))))
30+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31+
|
32+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
33+
2034
error: implementation of `FnOnce` is not general enough
2135
--> $DIR/ice-106874.rs:8:7
2236
|
@@ -75,17 +89,5 @@ LL | A(B(C::new(D::new(move |st| f(st)))))
7589
= note: ...but it actually implements `Fn<(&'2 mut V,)>`, for some specific lifetime `'2`
7690
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
7791

78-
error: higher-ranked subtype error
79-
--> $DIR/ice-106874.rs:8:7
80-
|
81-
LL | A(B(C::new(D::new(move |st| f(st)))))
82-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83-
84-
error: higher-ranked subtype error
85-
--> $DIR/ice-106874.rs:8:41
86-
|
87-
LL | A(B(C::new(D::new(move |st| f(st)))))
88-
| ^
89-
9092
error: aborting due to 10 previous errors
9193

0 commit comments

Comments
 (0)