fork/rust

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

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

master
3.7 KiB110 linesraw
1error[E0311]: the parameter type `impl Sized` may not live long enough
2  --> $DIR/issue-105544.rs:7:5
3   |
4LL |     (d, p)
5   |     ^^^^^^
6   |
7note: the parameter type `impl Sized` must be valid for the anonymous lifetime defined here...
8  --> $DIR/issue-105544.rs:5:26
9   |
10LL | fn foo(d: impl Sized, p: &mut ()) -> impl Sized + '_ {
11   |                          ^^^^^^^
12note: ...so that the type `impl Sized` will meet its required lifetime bounds
13  --> $DIR/issue-105544.rs:7:5
14   |
15LL |     (d, p)
16   |     ^^^^^^
17help: consider adding an explicit lifetime bound...
18   |
19LL | fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + '_ {
20   |       ++++               ++++      ++
21
22error[E0309]: the parameter type `impl Sized` may not live long enough
23  --> $DIR/issue-105544.rs:14:5
24   |
25LL |     (d, p)
26   |     ^^^^^^ ...so that the type `impl Sized` will meet its required lifetime bounds
27   |
28help: consider adding an explicit lifetime bound...
29   |
30LL | fn foo1<'b>(d: impl Sized + 'b, p: &'b mut ()) -> impl Sized + '_ {
31   |                           ++++
32
33error[E0311]: the parameter type `impl Sized + 'a` may not live long enough
34  --> $DIR/issue-105544.rs:20:5
35   |
36LL |     (d, p)
37   |     ^^^^^^
38   |
39note: the parameter type `impl Sized + 'a` must be valid for the anonymous lifetime defined here...
40  --> $DIR/issue-105544.rs:18:36
41   |
42LL | fn foo2<'a>(d: impl Sized + 'a, p: &mut ()) -> impl Sized + '_ {
43   |                                    ^^^^^^^
44note: ...so that the type `impl Sized + 'a` will meet its required lifetime bounds
45  --> $DIR/issue-105544.rs:20:5
46   |
47LL |     (d, p)
48   |     ^^^^^^
49help: consider adding an explicit lifetime bound...
50   |
51LL | fn foo2<'b, 'a>(d: impl Sized + 'a + 'b, p: &'b mut ()) -> impl Sized + '_ {
52   |         +++                        ++++      ++
53
54error[E0311]: the parameter type `T` may not live long enough
55  --> $DIR/issue-105544.rs:27:5
56   |
57LL |     (d, p)
58   |     ^^^^^^
59   |
60note: the parameter type `T` must be valid for the anonymous lifetime defined here...
61  --> $DIR/issue-105544.rs:25:28
62   |
63LL | fn bar<T : Sized>(d: T, p: & mut ()) -> impl Sized + '_ {
64   |                            ^^^^^^^^
65note: ...so that the type `T` will meet its required lifetime bounds
66  --> $DIR/issue-105544.rs:27:5
67   |
68LL |     (d, p)
69   |     ^^^^^^
70help: consider adding an explicit lifetime bound...
71   |
72LL | fn bar<'a, T : Sized + 'a>(d: T, p: &'a mut ()) -> impl Sized + '_ {
73   |        +++           ++++            ++
74
75error[E0309]: the parameter type `T` may not live long enough
76  --> $DIR/issue-105544.rs:34:5
77   |
78LL |     (d, p)
79   |     ^^^^^^ ...so that the type `T` will meet its required lifetime bounds
80   |
81help: consider adding an explicit lifetime bound...
82   |
83LL | fn bar1<'b, T : Sized + 'b>(d: T, p: &'b mut ()) -> impl Sized + '_ {
84   |                       ++++
85
86error[E0311]: the parameter type `T` may not live long enough
87  --> $DIR/issue-105544.rs:40:5
88   |
89LL |     (d, p)
90   |     ^^^^^^
91   |
92note: the parameter type `T` must be valid for the anonymous lifetime defined here...
93  --> $DIR/issue-105544.rs:38:38
94   |
95LL | fn bar2<'a, T : Sized + 'a>(d: T, p: &mut ()) -> impl Sized + '_ {
96   |                                      ^^^^^^^
97note: ...so that the type `T` will meet its required lifetime bounds
98  --> $DIR/issue-105544.rs:40:5
99   |
100LL |     (d, p)
101   |     ^^^^^^
102help: consider adding an explicit lifetime bound...
103   |
104LL | fn bar2<'b, 'a, T : Sized + 'a + 'b>(d: T, p: &'b mut ()) -> impl Sized + '_ {
105   |         +++                    ++++            ++
106
107error: aborting due to 6 previous errors
108
109Some errors have detailed explanations: E0309, E0311.
110For more information about an error, try `rustc --explain E0309`.