about summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/rpitit.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/precise-capturing/rpitit.stderr')
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit.stderr10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit.stderr b/tests/ui/impl-trait/precise-capturing/rpitit.stderr
index 202eeb39385..45eceef2f49 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit.stderr
+++ b/tests/ui/impl-trait/precise-capturing/rpitit.stderr
@@ -1,3 +1,11 @@
+error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
+  --> $DIR/rpitit.rs:11:36
+   |
+LL |     fn hello() -> impl PartialEq + use<Self>;
+   |                                    ^^^^^^^^^
+   |
+   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
+
 error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
   --> $DIR/rpitit.rs:11:19
    |
@@ -38,5 +46,5 @@ LL | |     );
 
 help: `'a` and `'b` must be the same: replace one with the other
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors