fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB50 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
9error: lifetime may not live long enough
10  --> $DIR/regions-bounded-by-trait-requiring-static.rs:27:5
11   |
12LL | fn param_not_ok1<'a>(_: &'a isize) {
13   |                  -- lifetime `'a` defined here
14LL |     assert_send::<&'a str>();
15   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
16
17error: lifetime may not live long enough
18  --> $DIR/regions-bounded-by-trait-requiring-static.rs:32:5
19   |
20LL | fn param_not_ok2<'a>(_: &'a isize) {
21   |                  -- lifetime `'a` defined here
22LL |     assert_send::<&'a [isize]>();
23   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
24
25error: lifetime may not live long enough
26  --> $DIR/regions-bounded-by-trait-requiring-static.rs:47:5
27   |
28LL | fn box_with_region_not_ok<'a>() {
29   |                           -- lifetime `'a` defined here
30LL |     assert_send::<Box<&'a isize>>();
31   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
32
33error: lifetime may not live long enough
34  --> $DIR/regions-bounded-by-trait-requiring-static.rs:59:5
35   |
36LL | fn unsafe_ok2<'a>(_: &'a isize) {
37   |               -- lifetime `'a` defined here
38LL |     assert_send::<*const &'a isize>();
39   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
40
41error: lifetime may not live long enough
42  --> $DIR/regions-bounded-by-trait-requiring-static.rs:64:5
43   |
44LL | fn unsafe_ok3<'a>(_: &'a isize) {
45   |               -- lifetime `'a` defined here
46LL |     assert_send::<*mut &'a isize>();
47   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
48
49error: aborting due to 6 previous errors
50