diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr')
-rw-r--r-- | src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr deleted file mode 100644 index 9c81791fb..000000000 --- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr +++ /dev/null @@ -1,126 +0,0 @@ -error[E0700]: hidden type for `impl Copy` captures lifetime that does not appear in bounds - --> $DIR/must_outlive_least_region_or_bound.rs:3:35 - | -LL | fn elided(x: &i32) -> impl Copy { x } - | ---- ^ - | | - | hidden type `&i32` captures the anonymous lifetime defined here - | -help: to declare that `impl Copy` captures `'_`, you can add an explicit `'_` lifetime bound - | -LL | fn elided(x: &i32) -> impl Copy + '_ { x } - | ++++ - -error[E0700]: hidden type for `impl Copy` captures lifetime that does not appear in bounds - --> $DIR/must_outlive_least_region_or_bound.rs:6:44 - | -LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x } - | -- ^ - | | - | hidden type `&'a i32` captures the lifetime `'a` as defined here - | -help: to declare that `impl Copy` captures `'a`, you can add an explicit `'a` lifetime bound - | -LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x } - | ++++ - -error: lifetime may not live long enough - --> $DIR/must_outlive_least_region_or_bound.rs:9:46 - | -LL | fn elided2(x: &i32) -> impl Copy + 'static { x } - | - ^ returning this value requires that `'1` must outlive `'static` - | | - | let's call the lifetime of this reference `'1` - | -help: consider changing `impl Copy + 'static`'s explicit `'static` bound to the lifetime of argument `x` - | -LL | fn elided2(x: &i32) -> impl Copy + '_ { x } - | ~~ -help: alternatively, add an explicit `'static` bound to this reference - | -LL | fn elided2(x: &'static i32) -> impl Copy + 'static { x } - | ~~~~~~~~~~~~ - -error: lifetime may not live long enough - --> $DIR/must_outlive_least_region_or_bound.rs:12:55 - | -LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'static { x } - | -- lifetime `'a` defined here ^ returning this value requires that `'a` must outlive `'static` - | -help: consider changing `impl Copy + 'static`'s explicit `'static` bound to the lifetime of argument `x` - | -LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'a { x } - | ~~ -help: alternatively, add an explicit `'static` bound to this reference - | -LL | fn explicit2<'a>(x: &'static i32) -> impl Copy + 'static { x } - | ~~~~~~~~~~~~ - -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/must_outlive_least_region_or_bound.rs:15:41 - | -LL | fn foo<'a>(x: &i32) -> impl Copy + 'a { x } - | ---- ^ lifetime `'a` required - | | - | help: add explicit lifetime `'a` to the type of `x`: `&'a i32` - -error: lifetime may not live long enough - --> $DIR/must_outlive_least_region_or_bound.rs:26:55 - | -LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug) { (Box::new(x), x) } - | - ^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static` - | | - | let's call the lifetime of this reference `'1` - | -help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound - | -LL | fn elided5(x: &i32) -> (Box<dyn Debug + '_>, impl Debug) { (Box::new(x), x) } - | ++++ -help: to declare that `impl Debug` captures data from argument `x`, you can add an explicit `'_` lifetime bound - | -LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug + '_) { (Box::new(x), x) } - | ++++ - -error: lifetime may not live long enough - --> $DIR/must_outlive_least_region_or_bound.rs:32:69 - | -LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x } - | -- lifetime `'a` defined here ^ returning this value requires that `'a` must outlive `'static` - | -help: consider changing `impl LifetimeTrait<'a> + 'static`'s explicit `'static` bound to the lifetime of argument `x` - | -LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'a { x } - | ~~ -help: alternatively, add an explicit `'static` bound to this reference - | -LL | fn with_bound<'a>(x: &'static i32) -> impl LifetimeTrait<'a> + 'static { x } - | ~~~~~~~~~~~~ - -error[E0700]: hidden type for `impl Fn(&'a u32)` captures lifetime that does not appear in bounds - --> $DIR/must_outlive_least_region_or_bound.rs:38:5 - | -LL | fn move_lifetime_into_fn<'a, 'b>(x: &'a u32, y: &'b u32) -> impl Fn(&'a u32) { - | -- hidden type `[closure@$DIR/must_outlive_least_region_or_bound.rs:38:5: 38:13]` captures the lifetime `'b` as defined here -LL | move |_| println!("{}", y) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -help: to declare that `impl Fn(&'a u32)` captures `'b`, you can add an explicit `'b` lifetime bound - | -LL | fn move_lifetime_into_fn<'a, 'b>(x: &'a u32, y: &'b u32) -> impl Fn(&'a u32) + 'b { - | ++++ - -error[E0310]: the parameter type `T` may not live long enough - --> $DIR/must_outlive_least_region_or_bound.rs:43:5 - | -LL | x - | ^ ...so that the type `T` will meet its required lifetime bounds - | -help: consider adding an explicit lifetime bound... - | -LL | fn ty_param_wont_outlive_static<T:Debug + 'static>(x: T) -> impl Debug + 'static { - | +++++++++ - -error: aborting due to 9 previous errors - -Some errors have detailed explanations: E0310, E0621, E0700. -For more information about an error, try `rustc --explain E0310`. |