From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../lifetime-errors/ex2c-push-inference-variable.stderr | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr (limited to 'tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr') diff --git a/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr b/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr new file mode 100644 index 000000000..99fab4631 --- /dev/null +++ b/tests/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>, 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 + -- cgit v1.2.3