diff options
| author | Michael Goulet <michael@errs.io> | 2023-07-14 18:37:12 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-07-29 21:19:33 +0000 |
| commit | 349a2372ed2ad8989a663f05c7efd23e879bfbb9 (patch) | |
| tree | 7b981a3b886dcc8cfa57aef5607cfa91d8a09e7d /tests | |
| parent | 03a57254b56886c43464e23b74af484d11374623 (diff) | |
| download | rust-349a2372ed2ad8989a663f05c7efd23e879bfbb9.tar.gz rust-349a2372ed2ad8989a663f05c7efd23e879bfbb9.zip | |
Take RPITITs inherit the assumed_wf_types of their parent fn
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/async-await/in-trait/async-generics-and-bounds.stderr | 8 | ||||
| -rw-r--r-- | tests/ui/async-await/in-trait/async-generics.stderr | 8 | ||||
| -rw-r--r-- | tests/ui/impl-trait/in-trait/wf-bounds.stderr | 4 |
3 files changed, 8 insertions, 12 deletions
diff --git a/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr b/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr index f1f0d7e5907..5c8d64fc6cb 100644 --- a/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr +++ b/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr @@ -4,11 +4,11 @@ error[E0311]: the parameter type `U` may not live long enough LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ^^^^^^^ | -note: the parameter type `U` must be valid for the anonymous lifetime defined here... +note: the parameter type `U` must be valid for the anonymous lifetime as defined here... --> $DIR/async-generics-and-bounds.rs:12:18 | LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; - | ^^^^^ + | ^ note: ...so that the reference type `&(T, U)` does not outlive the data it points at --> $DIR/async-generics-and-bounds.rs:12:28 | @@ -21,11 +21,11 @@ error[E0311]: the parameter type `T` may not live long enough LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; | ^^^^^^^ | -note: the parameter type `T` must be valid for the anonymous lifetime defined here... +note: the parameter type `T` must be valid for the anonymous lifetime as defined here... --> $DIR/async-generics-and-bounds.rs:12:18 | LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash; - | ^^^^^ + | ^ note: ...so that the reference type `&(T, U)` does not outlive the data it points at --> $DIR/async-generics-and-bounds.rs:12:28 | diff --git a/tests/ui/async-await/in-trait/async-generics.stderr b/tests/ui/async-await/in-trait/async-generics.stderr index 2f05564564c..6ae73d9e3a6 100644 --- a/tests/ui/async-await/in-trait/async-generics.stderr +++ b/tests/ui/async-await/in-trait/async-generics.stderr @@ -4,11 +4,11 @@ error[E0311]: the parameter type `U` may not live long enough LL | async fn foo(&self) -> &(T, U); | ^^^^^^^ | -note: the parameter type `U` must be valid for the anonymous lifetime defined here... +note: the parameter type `U` must be valid for the anonymous lifetime as defined here... --> $DIR/async-generics.rs:9:18 | LL | async fn foo(&self) -> &(T, U); - | ^^^^^ + | ^ note: ...so that the reference type `&(T, U)` does not outlive the data it points at --> $DIR/async-generics.rs:9:28 | @@ -21,11 +21,11 @@ error[E0311]: the parameter type `T` may not live long enough LL | async fn foo(&self) -> &(T, U); | ^^^^^^^ | -note: the parameter type `T` must be valid for the anonymous lifetime defined here... +note: the parameter type `T` must be valid for the anonymous lifetime as defined here... --> $DIR/async-generics.rs:9:18 | LL | async fn foo(&self) -> &(T, U); - | ^^^^^ + | ^ note: ...so that the reference type `&(T, U)` does not outlive the data it points at --> $DIR/async-generics.rs:9:28 | diff --git a/tests/ui/impl-trait/in-trait/wf-bounds.stderr b/tests/ui/impl-trait/in-trait/wf-bounds.stderr index beac6620911..4d60b133048 100644 --- a/tests/ui/impl-trait/in-trait/wf-bounds.stderr +++ b/tests/ui/impl-trait/in-trait/wf-bounds.stderr @@ -47,10 +47,6 @@ note: required by a bound in `NeedsDisplay` | LL | struct NeedsDisplay<T: Display>(T); | ^^^^^^^ required by this bound in `NeedsDisplay` -help: consider restricting type parameter `T` - | -LL | fn nya4<T: std::fmt::Display>() -> impl Wf<NeedsDisplay<T>>; - | +++++++++++++++++++ error: aborting due to 4 previous errors |
