]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/normalization-infer.stderr
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / nll / user-annotations / normalization-infer.stderr
1 error[E0310]: the parameter type `A` may not live long enough
2   --> $DIR/normalization-infer.rs:11:12
3    |
4 LL |     let _: <(_,) as Tr>::Ty = a;
5    |            ^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
6    |
7 help: consider adding an explicit lifetime bound...
8    |
9 LL | fn test1<A: 'static, B, C, D>(a: A, b: B, c: C) {
10    |           +++++++++
11
12 error[E0310]: the parameter type `B` may not live long enough
13   --> $DIR/normalization-infer.rs:12:5
14    |
15 LL |     Some::<<(_,) as Tr>::Ty>(b);
16    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `B` will meet its required lifetime bounds
17    |
18 help: consider adding an explicit lifetime bound...
19    |
20 LL | fn test1<A, B: 'static, C, D>(a: A, b: B, c: C) {
21    |              +++++++++
22
23 error[E0310]: the parameter type `C` may not live long enough
24   --> $DIR/normalization-infer.rs:13:11
25    |
26 LL |     || -> <(_,) as Tr>::Ty { c };
27    |           ^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
28    |
29 help: consider adding an explicit lifetime bound...
30    |
31 LL | fn test1<A, B, C: 'static, D>(a: A, b: B, c: C) {
32    |                 +++++++++
33
34 error[E0310]: the parameter type `D` may not live long enough
35   --> $DIR/normalization-infer.rs:14:6
36    |
37 LL |     |d: <(_,) as Tr>::Ty| -> D { d };
38    |      ^ ...so that the type `D` will meet its required lifetime bounds
39    |
40 help: consider adding an explicit lifetime bound...
41    |
42 LL | fn test1<A, B, C, D: 'static>(a: A, b: B, c: C) {
43    |                    +++++++++
44
45 error[E0310]: the parameter type `A` may not live long enough
46   --> $DIR/normalization-infer.rs:28:12
47    |
48 LL |     let _: Alias<_, _> = (a, 0u8);
49    |            ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
50    |
51 help: consider adding an explicit lifetime bound...
52    |
53 LL | fn test2<A: 'static, B, C>(a: A, b: B, c: C) {
54    |           +++++++++
55
56 error[E0310]: the parameter type `B` may not live long enough
57   --> $DIR/normalization-infer.rs:29:5
58    |
59 LL |     Some::<Alias<_, _>>((b, 0u8));
60    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `B` will meet its required lifetime bounds
61    |
62 help: consider adding an explicit lifetime bound...
63    |
64 LL | fn test2<A, B: 'static, C>(a: A, b: B, c: C) {
65    |              +++++++++
66
67 error[E0310]: the parameter type `C` may not live long enough
68   --> $DIR/normalization-infer.rs:30:11
69    |
70 LL |     || -> Alias<_, _> { (c, 0u8) };
71    |           ^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
72    |
73 help: consider adding an explicit lifetime bound...
74    |
75 LL | fn test2<A, B, C: 'static>(a: A, b: B, c: C) {
76    |                 +++++++++
77
78 error[E0716]: temporary value dropped while borrowed
79   --> $DIR/normalization-infer.rs:32:28
80    |
81 LL |     let _: Alias<_, _> = (&temp(), 0u8);
82    |            -----------     ^^^^^^ creates a temporary value which is freed while still in use
83    |            |
84    |            type annotation requires that borrow lasts for `'static`
85 ...
86 LL | }
87    | - temporary value is freed at the end of this statement
88
89 error[E0716]: temporary value dropped while borrowed
90   --> $DIR/normalization-infer.rs:33:27
91    |
92 LL |     Some::<Alias<_, _>>((&temp(), 0u8));
93    |                         --^^^^^^------ - temporary value is freed at the end of this statement
94    |                         | |
95    |                         | creates a temporary value which is freed while still in use
96    |                         this usage requires that borrow lasts for `'static`
97
98 error: aborting due to 9 previous errors
99
100 Some errors have detailed explanations: E0310, E0716.
101 For more information about an error, try `rustc --explain E0310`.