fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
2.4 KiB73 linesraw
1error: lifetime may not live long enough
2  --> $DIR/wf-unreachable.rs:8:12
3   |
4LL | fn uninit<'a>() {
5   |           -- lifetime `'a` defined here
6LL |     return;
7LL |     let x: &'static &'a ();
8   |            ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
9
10error: lifetime may not live long enough
11  --> $DIR/wf-unreachable.rs:13:12
12   |
13LL | fn var_type<'a>() {
14   |             -- lifetime `'a` defined here
15LL |     return;
16LL |     let x: &'static &'a () = &&();
17   |            ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
18
19error: lifetime may not live long enough
20  --> $DIR/wf-unreachable.rs:17:12
21   |
22LL | fn uninit_infer<'a>() {
23   |                 -- lifetime `'a` defined here
24LL |     let x: &'static &'a _;
25   |            ^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
26
27error: lifetime may not live long enough
28  --> $DIR/wf-unreachable.rs:23:12
29   |
30LL | fn infer<'a>() {
31   |          -- lifetime `'a` defined here
32LL |     return;
33LL |     let x: &'static &'a _ = &&();
34   |            ^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
35
36error: lifetime may not live long enough
37  --> $DIR/wf-unreachable.rs:28:12
38   |
39LL | fn uninit_no_var<'a>() {
40   |                  -- lifetime `'a` defined here
41LL |     return;
42LL |     let _: &'static &'a ();
43   |            ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
44
45error: lifetime may not live long enough
46  --> $DIR/wf-unreachable.rs:33:12
47   |
48LL | fn no_var<'a>() {
49   |           -- lifetime `'a` defined here
50LL |     return;
51LL |     let _: &'static &'a () = &&();
52   |            ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
53
54error: lifetime may not live long enough
55  --> $DIR/wf-unreachable.rs:38:12
56   |
57LL | fn infer_no_var<'a>() {
58   |                 -- lifetime `'a` defined here
59LL |     return;
60LL |     let _: &'static &'a _ = &&();
61   |            ^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
62
63error: lifetime may not live long enough
64  --> $DIR/wf-unreachable.rs:51:12
65   |
66LL | fn required_substs<'a>() {
67   |                    -- lifetime `'a` defined here
68LL |     return;
69LL |     let _: C<'static, 'a, _> = C((), &(), &());
70   |            ^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
71
72error: aborting due to 8 previous errors
73