Update tests

This commit is contained in:
Matthew Jasper 2020-01-11 17:18:58 +00:00
parent e3e5d27f23
commit 78e0ab53fb
13 changed files with 123 additions and 230 deletions

View File

@ -1,11 +1,3 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/issue-63388-1.rs:12:10
|
LL | ) -> &dyn Foo
| ^^^^^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#22r
error: lifetime may not live long enough
--> $DIR/issue-63388-1.rs:13:5
|
@ -19,6 +11,5 @@ LL | | foo
LL | | }
| |_____^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
error: aborting due to 2 previous errors
error: aborting due to previous error
For more information about this error, try `rustc --explain E0700`.

View File

@ -41,7 +41,7 @@ note: ...which requires processing `cycle2::{{opaque}}#0`...
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
note: ...which requires borrow-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -51,22 +51,22 @@ note: ...which requires processing `cycle2`...
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires unsafety-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -127,13 +127,33 @@ note: ...which requires processing `cycle2::{{opaque}}#0`...
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
note: ...which requires borrow-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires unsafety-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
@ -155,9 +175,34 @@ error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^
|
note: ...which requires borrow-checking `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires unsafety-checking `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
@ -166,28 +211,33 @@ note: ...which requires processing `cycle2::{{opaque}}#0`...
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
note: ...which requires borrow-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires unsafety-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:21:1
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -0,0 +1,29 @@
// compile-flags:-Zborrowck=mir
#![feature(member_constraints)]
#![feature(type_alias_impl_trait)]
#[derive(Clone)]
struct CopyIfEq<T, U>(T, U);
impl<T: Copy> Copy for CopyIfEq<T, T> {}
type E<'a, 'b> = impl Sized;
fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
//~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds
let v = CopyIfEq::<*mut _, *mut _>(&mut { x }, &mut y);
// This assignment requires that `x` and `y` have the same type due to the
// `Copy` impl. The reason why we are using a copy to create a constraint
// is that only borrow checking (not regionck in type checking) enforces
// this bound.
let u = v;
let _: *mut &'a i32 = u.1;
unsafe {
let _: &'b i32 = *u.0;
}
u.0
}
fn main() {}

View File

@ -0,0 +1,15 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/error-handling-2.rs:13:60
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^^^^^^^^
|
note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 13:8
--> $DIR/error-handling-2.rs:13:8
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0700`.

View File

@ -11,7 +11,6 @@ impl<T: Copy> Copy for CopyIfEq<T, T> {}
type E<'a, 'b> = impl Sized;
fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
//~^ ERROR lifetime may not live long enough
let v = CopyIfEq::<*mut _, *mut _>(&mut { x }, &mut y);
// This assignment requires that `x` and `y` have the same type due to the
@ -22,6 +21,7 @@ fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
let _: *mut &'a i32 = u.1;
unsafe {
let _: &'b i32 = *u.0;
//~^ ERROR lifetime may not live long enough
}
u.0
}

View File

@ -1,14 +1,15 @@
error: lifetime may not live long enough
--> $DIR/error-handling.rs:13:56
--> $DIR/error-handling.rs:23:16
|
LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| -- lifetime `'a` defined here ^^^^^^^^^ opaque type requires that `'a` must outlive `'static`
|
= help: consider replacing `'a` with `'static`
help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a bound
|
LL | type E<'a, 'b> = impl Sized + 'a;
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
...
LL | let _: &'b i32 = *u.0;
| ^^^^^^^ type annotation requires that `'a` must outlive `'b`
|
= help: consider adding the following bound: `'a: 'b`
error: aborting due to previous error

View File

@ -3,6 +3,8 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea
|
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
| ^^^^^^^^^^^^^^^^^^
|
= note: hidden type `Ordinary<'_>` captures lifetime '_#8r
error: aborting due to previous error

View File

@ -3,6 +3,8 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea
|
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
| ^^^^^^^^^^^^^^^^^^
|
= note: hidden type `Ordinary<'_>` captures lifetime '_#5r
error: aborting due to previous error

View File

@ -1,11 +1,3 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:45
|
LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
|
@ -24,14 +16,6 @@ LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:58
|
LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
| ^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
|
@ -41,6 +25,5 @@ LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
| | let's call the lifetime of this reference `'1`
| lifetime `'a` defined here
error: aborting due to 5 previous errors
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0700`.

View File

@ -1,11 +1,3 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/lt-ref-self-async.rs:12:42
|
LL | async fn ref_self(&self, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:13:9
|
@ -16,14 +8,6 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/lt-ref-self-async.rs:18:48
|
LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:19:9
|
@ -34,14 +18,6 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/lt-ref-self-async.rs:22:57
|
LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:23:9
|
@ -52,14 +28,6 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/lt-ref-self-async.rs:26:57
|
LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:27:9
|
@ -70,14 +38,6 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/lt-ref-self-async.rs:30:66
|
LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:31:9
|
@ -88,14 +48,6 @@ LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/lt-ref-self-async.rs:34:62
|
LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:35:9
|
@ -106,6 +58,5 @@ LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 12 previous errors
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0700`.

View File

@ -1,11 +1,3 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-self-async.rs:12:46
|
LL | async fn ref_self(&mut self, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:13:9
|
@ -16,14 +8,6 @@ LL | async fn ref_self(&mut self, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-self-async.rs:18:52
|
LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:19:9
|
@ -34,14 +18,6 @@ LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-self-async.rs:22:61
|
LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:23:9
|
@ -52,14 +28,6 @@ LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-self-async.rs:26:61
|
LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:27:9
|
@ -70,14 +38,6 @@ LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-self-async.rs:30:70
|
LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:31:9
|
@ -88,14 +48,6 @@ LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-self-async.rs:34:70
|
LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:35:9
|
@ -106,6 +58,5 @@ LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 12 previous errors
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0700`.

View File

@ -1,11 +1,3 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-struct-async.rs:12:56
|
LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:13:9
|
@ -16,14 +8,6 @@ LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-struct-async.rs:16:65
|
LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:17:9
|
@ -34,14 +18,6 @@ LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-struct-async.rs:20:65
|
LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:21:9
|
@ -52,14 +28,6 @@ LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-struct-async.rs:24:74
|
LL | async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:25:9
|
@ -70,14 +38,6 @@ LL | async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/ref-mut-struct-async.rs:28:74
|
LL | async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:29:9
|
@ -88,6 +48,5 @@ LL | async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 10 previous errors
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0700`.

View File

@ -1,11 +1,3 @@
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 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:13:9
|
@ -16,14 +8,6 @@ LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
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 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:17:9
|
@ -34,14 +18,6 @@ LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
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 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:21:9
|
@ -52,14 +28,6 @@ LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
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 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:25:9
|
@ -70,14 +38,6 @@ LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
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 {
| ^^^^
|
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:29:9
|
@ -88,6 +48,5 @@ LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 10 previous errors
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0700`.