fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
2.2 KiB62 linesraw
1error: lifetime may not live long enough
2  --> $DIR/regions-bounded-by-trait-requiring-static.rs:22:5
3   |
4LL | fn param_not_ok<'a>(x: &'a isize) {
5   |                 -- lifetime `'a` defined here
6LL |     assert_send::<&'a isize>();
7   |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
8   |
9   = help: consider replacing `'a` with `'static`
10
11error: lifetime may not live long enough
12  --> $DIR/regions-bounded-by-trait-requiring-static.rs:26:5
13   |
14LL | fn param_not_ok1<'a>(_: &'a isize) {
15   |                  -- lifetime `'a` defined here
16LL |     assert_send::<&'a str>();
17   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
18   |
19   = help: consider replacing `'a` with `'static`
20
21error: lifetime may not live long enough
22  --> $DIR/regions-bounded-by-trait-requiring-static.rs:30:5
23   |
24LL | fn param_not_ok2<'a>(_: &'a isize) {
25   |                  -- lifetime `'a` defined here
26LL |     assert_send::<&'a [isize]>();
27   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
28   |
29   = help: consider replacing `'a` with `'static`
30
31error: lifetime may not live long enough
32  --> $DIR/regions-bounded-by-trait-requiring-static.rs:44:5
33   |
34LL | fn box_with_region_not_ok<'a>() {
35   |                           -- lifetime `'a` defined here
36LL |     assert_send::<Box<&'a isize>>();
37   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
38   |
39   = help: consider replacing `'a` with `'static`
40
41error: lifetime may not live long enough
42  --> $DIR/regions-bounded-by-trait-requiring-static.rs:55:5
43   |
44LL | fn unsafe_ok2<'a>(_: &'a isize) {
45   |               -- lifetime `'a` defined here
46LL |     assert_send::<*const &'a isize>();
47   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
48   |
49   = help: consider replacing `'a` with `'static`
50
51error: lifetime may not live long enough
52  --> $DIR/regions-bounded-by-trait-requiring-static.rs:59:5
53   |
54LL | fn unsafe_ok3<'a>(_: &'a isize) {
55   |               -- lifetime `'a` defined here
56LL |     assert_send::<*mut &'a isize>();
57   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
58   |
59   = help: consider replacing `'a` with `'static`
60
61error: aborting due to 6 previous errors
62