summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-types/bound-lifetime-constrained.object.stderr')
-rw-r--r--src/test/ui/associated-types/bound-lifetime-constrained.object.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr b/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr
new file mode 100644
index 000000000..36fa06cce
--- /dev/null
+++ b/src/test/ui/associated-types/bound-lifetime-constrained.object.stderr
@@ -0,0 +1,15 @@
+error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
+ --> $DIR/bound-lifetime-constrained.rs:28:60
+ |
+LL | fn object1(_: Box<dyn for<'a> Fn(<() as Foo<'a>>::Item) -> &'a i32>) {
+ | ^^^^^^^
+
+error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
+ --> $DIR/bound-lifetime-constrained.rs:33:39
+ |
+LL | fn object2(_: Box<dyn for<'a> Fn() -> <() as Foo<'a>>::Item>) {
+ | ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0582`.