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