about summary refs log tree commit diff
path: root/tests/ui/impl-trait/nested-rpit-hrtb.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-31 13:45:26 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-01-09 21:08:16 +0000
commit0978f6e010e0eb3dddfa2a1a374ae5567e1f7f4c (patch)
tree088de30be238d47fcc5889f5e5eae9298366e92b /tests/ui/impl-trait/nested-rpit-hrtb.rs
parentbe00c5a9b89161b7f45ba80340f709e8e41122f9 (diff)
downloadrust-0978f6e010e0eb3dddfa2a1a374ae5567e1f7f4c.tar.gz
rust-0978f6e010e0eb3dddfa2a1a374ae5567e1f7f4c.zip
Avoid silencing relevant follow-up errors
Diffstat (limited to 'tests/ui/impl-trait/nested-rpit-hrtb.rs')
-rw-r--r--tests/ui/impl-trait/nested-rpit-hrtb.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.rs b/tests/ui/impl-trait/nested-rpit-hrtb.rs
index a5db10d3a22..a3eca741daa 100644
--- a/tests/ui/impl-trait/nested-rpit-hrtb.rs
+++ b/tests/ui/impl-trait/nested-rpit-hrtb.rs
@@ -31,9 +31,11 @@ fn one_hrtb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl Qux<'a>> {}
 
 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 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: the trait bound `for<'a> &'a (): Qux<'_>` is not satisfied
 
 // This should resolve.
 fn one_hrtb_mention_fn_trait_param<'b>() -> impl for<'a> Foo<'a, Assoc = impl Qux<'b>> {}
@@ -43,9 +45,11 @@ fn one_hrtb_mention_fn_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl Sized
 
 // This should resolve.
 fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {}
+//~^ ERROR: the trait bound `for<'a> &'a (): Qux<'b>` is not satisfied
 
 // This should resolve.
 fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {}
+//~^ ERROR implementation of `Bar` is not general enough
 
 // This should resolve.
 fn two_htrb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Qux<'b>> {}
@@ -56,9 +60,11 @@ fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b>
 
 // This should resolve.
 fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {}
+//~^ ERROR: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied
 
 // `'b` is not in scope for the outlives bound.
 fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
 //~^ ERROR use of undeclared lifetime name `'b` [E0261]
+//~| ERROR implementation of `Bar` is not general enough
 
 fn main() {}