Skip to content

Commit

Permalink
bless nll tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 22, 2021
1 parent f2d2fd3 commit d103852
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
error: lifetime may not live long enough
--> $DIR/ret-impl-trait-one.rs:10:80
--> $DIR/ret-impl-trait-one.rs:10:65
|
LL | async fn async_ret_impl_trait1<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a> {
| ________________________________--__--__________________________________________^
| | | |
| | | lifetime `'b` defined here
| | lifetime `'a` defined here
LL | |
LL | | (a, b)
LL | | }
| |_^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
LL | async fn async_ret_impl_trait1<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a> {
| -- -- ^^^^^^^^^^^^^^ opaque type requires that `'b` must outlive `'a`
| | |
| | lifetime `'b` defined here
| lifetime `'a` defined here
|
= help: consider adding the following bound: `'b: 'a`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:48
--> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:37
|
LL | async fn f(self: Pin<&Self>) -> impl Clone { self }
| - ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
| - ^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
| |
| let's call the lifetime of this reference `'1`
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ LL | type WrongGeneric<T> = impl 'static;
found opaque type `impl Sized`

error[E0310]: the parameter type `T` may not live long enough
--> $DIR/generic_type_does_not_live_long_enough.rs:17:30
--> $DIR/generic_type_does_not_live_long_enough.rs:16:30
|
LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
| ^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LL | type WrongGeneric<T> = impl 'static;
found opaque type `impl Sized`

error[E0310]: the parameter type `T` may not live long enough
--> $DIR/generic_type_does_not_live_long_enough.rs:17:30
--> $DIR/generic_type_does_not_live_long_enough.rs:16:30
|
LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
| ^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information

error: higher-ranked subtype error
--> $DIR/issue-57611-trait-alias.rs:28:9
--> $DIR/issue-57611-trait-alias.rs:24:9
|
LL | |x| x
| ^^^^^

error: higher-ranked subtype error
--> $DIR/issue-57611-trait-alias.rs:28:9
--> $DIR/issue-57611-trait-alias.rs:24:9
|
LL | |x| x
| ^^^^^
Expand All @@ -28,7 +28,7 @@ LL | type Bar = impl Baz<Self, Self>;
= note: expected type `for<'r> Fn<(&'r X,)>`
found type `Fn<(&'static X,)>`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-57611-trait-alias.rs:28:9
--> $DIR/issue-57611-trait-alias.rs:24:9
|
LL | |x| x
| ^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: higher-ranked subtype error
--> $DIR/issue-57611-trait-alias.rs:28:9
--> $DIR/issue-57611-trait-alias.rs:24:9
|
LL | |x| x
| ^^^^^

error: higher-ranked subtype error
--> $DIR/issue-57611-trait-alias.rs:28:9
--> $DIR/issue-57611-trait-alias.rs:24:9
|
LL | |x| x
| ^^^^^
Expand All @@ -19,7 +19,7 @@ LL | type Bar = impl Baz<Self, Self>;
= note: expected type `for<'r> Fn<(&'r X,)>`
found type `Fn<(&'static X,)>`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-57611-trait-alias.rs:28:9
--> $DIR/issue-57611-trait-alias.rs:24:9
|
LL | |x| x
| ^^^^^
Expand Down

0 comments on commit d103852

Please sign in to comment.