Skip to content

Commit 03bbb98

Browse files
committed
Bless tests.
1 parent 94449e6 commit 03bbb98

File tree

68 files changed

+527
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+527
-298
lines changed

src/test/ui/async-await/issue-86507.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ note: captured value is not `Send` because `&` references cannot be sent unless
1414
LL | let x = x;
1515
| ^ has type `&T` which is not `Send`, because `T` is not `Sync`
1616
= note: required for the cast to the object type `dyn Future<Output = ()> + Send`
17-
help: consider further restricting type parameter `T`
17+
help: consider further restricting this bound
1818
|
19-
LL | where 'me:'async_trait, T: std::marker::Sync {
20-
| ++++++++++++++++++++++
19+
LL | fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
20+
| +++++++++++++++++++
2121

2222
error: aborting due to previous error
2323

src/test/ui/builtin-superkinds/builtin-superkinds-self-type.stderr

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ error[E0310]: the parameter type `T` may not live long enough
22
--> $DIR/builtin-superkinds-self-type.rs:10:16
33
|
44
LL | impl <T: Sync> Foo for T { }
5-
| -- ^^^ ...so that the type `T` will meet its required lifetime bounds
6-
| |
7-
| help: consider adding an explicit lifetime bound...: `T: 'static +`
5+
| ^^^ ...so that the type `T` will meet its required lifetime bounds
6+
|
7+
help: consider adding an explicit lifetime bound...
8+
|
9+
LL | impl <T: Sync + 'static> Foo for T { }
10+
| +++++++++
811

912
error: aborting due to previous error
1013

src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
error[E0310]: the parameter type `U` may not live long enough
22
--> $DIR/feature-gate-infer_static_outlives_requirements.rs:5:10
33
|
4-
LL | struct Foo<U> {
5-
| - help: consider adding an explicit lifetime bound...: `U: 'static`
64
LL | bar: Bar<U>
75
| ^^^^^^ ...so that the type `U` will meet its required lifetime bounds...
86
|
@@ -11,6 +9,10 @@ note: ...that is required by this bound
119
|
1210
LL | struct Bar<T: 'static> {
1311
| ^^^^^^^
12+
help: consider adding an explicit lifetime bound...
13+
|
14+
LL | struct Foo<U: 'static> {
15+
| +++++++++
1416

1517
error: aborting due to previous error
1618

src/test/ui/generic-associated-types/issue-86483.stderr

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
error[E0311]: the parameter type `T` may not live long enough
22
--> $DIR/issue-86483.rs:5:1
33
|
4-
LL | pub trait IceIce<T>
5-
| ^ - help: consider adding an explicit lifetime bound...: `T: 'a`
6-
| _|
7-
| |
4+
LL | / pub trait IceIce<T>
85
LL | | where
96
LL | | for<'a> T: 'a,
107
LL | | {
@@ -19,13 +16,14 @@ note: ...that is required by this bound
1916
|
2017
LL | for<'a> T: 'a,
2118
| ^^
19+
help: consider adding an explicit lifetime bound...
20+
|
21+
LL | for<'a> T: 'a + 'a,
22+
| ++++
2223

2324
error[E0311]: the parameter type `T` may not live long enough
2425
--> $DIR/issue-86483.rs:9:5
2526
|
26-
LL | pub trait IceIce<T>
27-
| - help: consider adding an explicit lifetime bound...: `T: 'a`
28-
...
2927
LL | type Ice<'v>: IntoIterator<Item = &'v T>;
3028
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
3129
|
@@ -34,6 +32,10 @@ note: ...that is required by this bound
3432
|
3533
LL | for<'a> T: 'a,
3634
| ^^
35+
help: consider adding an explicit lifetime bound...
36+
|
37+
LL | for<'a> T: 'a + 'a,
38+
| ++++
3739

3840
error[E0309]: the parameter type `T` may not live long enough
3941
--> $DIR/issue-86483.rs:9:32
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
error[E0311]: the parameter type `T` may not live long enough
22
--> $DIR/issue-91139.rs:27:12
33
|
4-
LL | fn foo<T>() {
5-
| - help: consider adding an explicit lifetime bound...: `T: 'a`
64
LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
75
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
6+
|
7+
help: consider adding an explicit lifetime bound...
8+
|
9+
LL | fn foo<T: 'a>() {
10+
| ++++
811

912
error: aborting due to previous error
1013

src/test/ui/generic-associated-types/issue-92096.migrate.stderr

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ error[E0311]: the parameter type `C` may not live long enough
22
--> $DIR/issue-92096.rs:20:33
33
|
44
LL | fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
5-
| - ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
6-
| |
7-
| help: consider adding an explicit lifetime bound...: `C: 'a`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
6+
|
7+
help: consider adding an explicit lifetime bound...
8+
|
9+
LL | C: Client + Send + Sync + 'a,
10+
| ++++
811

912
error[E0311]: the parameter type `C` may not live long enough
1013
--> $DIR/issue-92096.rs:20:33
1114
|
1215
LL | fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
13-
| - ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
14-
| |
15-
| help: consider adding an explicit lifetime bound...: `C: 'a`
16+
| ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
17+
|
18+
help: consider adding an explicit lifetime bound...
19+
|
20+
LL | C: Client + Send + Sync + 'a,
21+
| ++++
1622

1723
error: aborting due to 2 previous errors
1824

src/test/ui/generic-associated-types/missing-bounds.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ note: tuple struct defined here
8787
|
8888
LL | struct E<B>(B);
8989
| ^
90-
help: consider further restricting type parameter `B`
90+
help: consider further restricting this bound
9191
|
92-
LL | impl<B: Add> Add for E<B> where <B as Add>::Output = B, B: Add<Output = B> {
93-
| ++++++++++++++++++++
92+
LL | impl<B: Add + Add<Output = B>> Add for E<B> where <B as Add>::Output = B {
93+
| +++++++++++++++++
9494

9595
error: aborting due to 5 previous errors
9696

src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ warning: unnecessary lifetime parameter `'a`
22
--> $DIR/unsatified-item-lifetime-bound.rs:4:12
33
|
44
LL | type Y<'a: 'static>;
5-
| ^^^^^^^^^^^
5+
| ^^
66
|
77
= help: you can use the `'static` lifetime directly, in place of `'a`
88

src/test/ui/impl-trait/equal-hidden-lifetimes.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ warning: unnecessary lifetime parameter `'a`
22
--> $DIR/equal-hidden-lifetimes.rs:7:25
33
|
44
LL | fn equal_regions_static<'a: 'static>(x: &'a i32) -> impl Sized {
5-
| ^^^^^^^^^^^
5+
| ^^
66
|
77
= help: you can use the `'static` lifetime directly, in place of `'a`
88

src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,12 @@ error[E0310]: the parameter type `T` may not live long enough
128128
--> $DIR/must_outlive_least_region_or_bound.rs:38:51
129129
|
130130
LL | fn ty_param_wont_outlive_static<T:Debug>(x: T) -> impl Debug + 'static {
131-
| -- ^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
132-
| |
133-
| help: consider adding an explicit lifetime bound...: `T: 'static +`
131+
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
132+
|
133+
help: consider adding an explicit lifetime bound...
134+
|
135+
LL | fn ty_param_wont_outlive_static<T:Debug + 'static>(x: T) -> impl Debug + 'static {
136+
| +++++++++
134137

135138
error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
136139
--> $DIR/must_outlive_least_region_or_bound.rs:16:50

0 commit comments

Comments
 (0)