1
Fork 0
rust/src/test/ui/self/elision/ref-struct-async.nll.stderr

94 lines
4.4 KiB
Text
Raw Normal View History

2019-08-13 09:13:50 -04:00
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-struct-async.rs:12:52
|
LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
2019-08-13 09:13:50 -04:00
| ^^^^
|
2019-08-16 15:54:11 +03:00
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
2019-08-13 09:13:50 -04:00
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:13:9
2019-08-13 09:13:50 -04:00
|
2019-10-03 04:20:51 -04:00
LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
2019-11-25 12:36:53 -06:00
| - - let's call the lifetime of this reference `'1`
2019-10-03 04:20:51 -04:00
| |
| let's call the lifetime of this reference `'2`
2019-10-03 04:20:51 -04:00
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
2019-08-13 09:13:50 -04:00
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-struct-async.rs:16:61
|
LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
2019-08-13 09:13:50 -04:00
| ^^^^
|
2019-08-16 15:54:11 +03:00
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
2019-08-13 09:13:50 -04:00
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:17:9
2019-08-13 09:13:50 -04:00
|
2019-10-03 04:20:51 -04:00
LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
2019-11-25 12:36:53 -06:00
| - - let's call the lifetime of this reference `'1`
2019-10-03 04:20:51 -04:00
| |
| let's call the lifetime of this reference `'2`
2019-10-03 04:20:51 -04:00
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
2019-08-13 09:13:50 -04:00
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-struct-async.rs:20:61
|
LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
2019-08-13 09:13:50 -04:00
| ^^^^
|
2019-08-16 15:54:11 +03:00
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
2019-08-13 09:13:50 -04:00
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:21:9
|
2019-10-03 04:20:51 -04:00
LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
2019-11-25 12:36:53 -06:00
| - - let's call the lifetime of this reference `'1`
2019-10-03 04:20:51 -04:00
| |
| let's call the lifetime of this reference `'2`
2019-10-03 04:20:51 -04:00
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
2019-08-13 09:13:50 -04:00
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-struct-async.rs:24:70
|
LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
2019-08-13 09:13:50 -04:00
| ^^^^
|
2019-08-16 15:54:11 +03:00
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
2019-08-13 09:13:50 -04:00
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:25:9
|
2019-10-03 04:20:51 -04:00
LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
2019-11-25 12:36:53 -06:00
| - - let's call the lifetime of this reference `'1`
2019-10-03 04:20:51 -04:00
| |
| let's call the lifetime of this reference `'2`
2019-10-03 04:20:51 -04:00
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
2019-08-13 09:13:50 -04:00
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-struct-async.rs:28:66
|
LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
2019-08-13 09:13:50 -04:00
| ^^^^
|
2019-08-16 15:54:11 +03:00
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
2019-08-13 09:13:50 -04:00
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:29:9
|
2019-10-03 04:20:51 -04:00
LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
2019-11-25 12:36:53 -06:00
| - - let's call the lifetime of this reference `'1`
2019-10-03 04:20:51 -04:00
| |
| let's call the lifetime of this reference `'2`
2019-10-03 04:20:51 -04:00
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
2019-08-13 09:13:50 -04:00
error: aborting due to 10 previous errors
2019-08-13 09:13:50 -04:00
For more information about this error, try `rustc --explain E0700`.