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 --- .../variance/variance-invariant-arg-object.stderr | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/ui/variance/variance-invariant-arg-object.stderr (limited to 'tests/ui/variance/variance-invariant-arg-object.stderr') diff --git a/tests/ui/variance/variance-invariant-arg-object.stderr b/tests/ui/variance/variance-invariant-arg-object.stderr new file mode 100644 index 000000000..9793a36be --- /dev/null +++ b/tests/ui/variance/variance-invariant-arg-object.stderr @@ -0,0 +1,28 @@ +error: lifetime may not live long enough + --> $DIR/variance-invariant-arg-object.rs:11:5 + | +LL | fn get_min_from_max<'min, 'max>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ function was supposed to return data with lifetime `'max` but it is returning data with lifetime `'min` + | + = help: consider adding the following bound: `'min: 'max` + +error: lifetime may not live long enough + --> $DIR/variance-invariant-arg-object.rs:19:5 + | +LL | fn get_max_from_min<'min, 'max>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ function was supposed to return data with lifetime `'max` but it is returning data with lifetime `'min` + | + = help: consider adding the following bound: `'min: 'max` + +error: aborting due to 2 previous errors + -- cgit v1.2.3