diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/regions/region-object-lifetime-in-coercion.stderr | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/regions/region-object-lifetime-in-coercion.stderr')
-rw-r--r-- | src/test/ui/regions/region-object-lifetime-in-coercion.stderr | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr deleted file mode 100644 index b5bb08c73..000000000 --- a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr +++ /dev/null @@ -1,62 +0,0 @@ -error: lifetime may not live long enough - --> $DIR/region-object-lifetime-in-coercion.rs:8:12 - | -LL | fn a(v: &[u8]) -> Box<dyn Foo + 'static> { - | - let's call the lifetime of this reference `'1` -LL | let x: Box<dyn Foo + 'static> = Box::new(v); - | ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'1` must outlive `'static` - | -help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v` - | -LL | fn a(v: &[u8]) -> Box<dyn Foo + '_> { - | ~~ -help: alternatively, add an explicit `'static` bound to this reference - | -LL | fn a(v: &'static [u8]) -> Box<dyn Foo + 'static> { - | ~~~~~~~~~~~~~ - -error: lifetime may not live long enough - --> $DIR/region-object-lifetime-in-coercion.rs:14:5 - | -LL | fn b(v: &[u8]) -> Box<dyn Foo + 'static> { - | - let's call the lifetime of this reference `'1` -LL | Box::new(v) - | ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static` - | -help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v` - | -LL | fn b(v: &[u8]) -> Box<dyn Foo + '_> { - | ~~ -help: alternatively, add an explicit `'static` bound to this reference - | -LL | fn b(v: &'static [u8]) -> Box<dyn Foo + 'static> { - | ~~~~~~~~~~~~~ - -error: lifetime may not live long enough - --> $DIR/region-object-lifetime-in-coercion.rs:21:5 - | -LL | fn c(v: &[u8]) -> Box<dyn Foo> { - | - let's call the lifetime of this reference `'1` -... -LL | Box::new(v) - | ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static` - | -help: to declare that the trait object captures data from argument `v`, you can add an explicit `'_` lifetime bound - | -LL | fn c(v: &[u8]) -> Box<dyn Foo + '_> { - | ++++ - -error: lifetime may not live long enough - --> $DIR/region-object-lifetime-in-coercion.rs:26:5 - | -LL | fn d<'a,'b>(v: &'a [u8]) -> Box<dyn Foo+'b> { - | -- -- lifetime `'b` defined here - | | - | lifetime `'a` defined here -LL | Box::new(v) - | ^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` - | - = help: consider adding the following bound: `'a: 'b` - -error: aborting due to 4 previous errors - |