about summary refs log tree commit diff
path: root/tests/ui/impl-trait/nested-rpit-hrtb.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-03-07 15:44:07 +0000
committerMichael Goulet <michael@errs.io>2024-03-08 19:08:13 +0000
commitffd30e0a6939d7d25c4ac28bfac4b4e367adcd59 (patch)
tree079aa5d6de0958fa94d642c53a3c8077baf65153 /tests/ui/impl-trait/nested-rpit-hrtb.rs
parent74acabe9b042ea8c42862ee29aca2a8b7d333644 (diff)
downloadrust-ffd30e0a6939d7d25c4ac28bfac4b4e367adcd59.tar.gz
rust-ffd30e0a6939d7d25c4ac28bfac4b4e367adcd59.zip
Improve error message for opaque captures
Diffstat (limited to 'tests/ui/impl-trait/nested-rpit-hrtb.rs')
-rw-r--r--tests/ui/impl-trait/nested-rpit-hrtb.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.rs b/tests/ui/impl-trait/nested-rpit-hrtb.rs
index a3eca741daa..c10bfbfe4dc 100644
--- a/tests/ui/impl-trait/nested-rpit-hrtb.rs
+++ b/tests/ui/impl-trait/nested-rpit-hrtb.rs
@@ -23,18 +23,18 @@ impl Qux<'_> for () {}
 
 // This is not supported.
 fn one_hrtb_outlives() -> impl for<'a> Foo<'a, Assoc = impl Sized + 'a> {}
-//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+//~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
 
 // This is not supported.
 fn one_hrtb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl Qux<'a>> {}
-//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+//~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
 
 fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
-//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+//~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
 //~| ERROR implementation of `Bar` is not general enough
 
 fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
-//~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+//~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
 //~| ERROR: the trait bound `for<'a> &'a (): Qux<'_>` is not satisfied
 
 // This should resolve.