summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr')
-rw-r--r--src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr
new file mode 100644
index 000000000..99fab4631
--- /dev/null
+++ b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr
@@ -0,0 +1,15 @@
+error: lifetime may not live long enough
+ --> $DIR/ex2c-push-inference-variable.rs:7:5
+ |
+LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
+ | -- -- lifetime `'c` defined here
+ | |
+ | lifetime `'b` defined here
+LL | let z = Ref { data: y.data };
+LL | x.push(z);
+ | ^^^^^^^^^ argument requires that `'c` must outlive `'b`
+ |
+ = help: consider adding the following bound: `'c: 'b`
+
+error: aborting due to previous error
+