1 error[E0311]: the parameter type `impl Sized` may not live long enough
2 --> $DIR/issue-105544.rs:7:5
7 note: the parameter type `impl Sized` must be valid for the anonymous lifetime defined here...
8 --> $DIR/issue-105544.rs:5:26
10 LL | fn foo(d: impl Sized, p: &mut ()) -> impl Sized + '_ {
12 note: ...so that the type `impl Sized` will meet its required lifetime bounds
13 --> $DIR/issue-105544.rs:7:5
17 help: consider adding an explicit lifetime bound...
19 LL | fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + '_ {
22 error[E0309]: the parameter type `impl Sized` may not live long enough
23 --> $DIR/issue-105544.rs:14:5
26 | ^^^^^^ ...so that the type `impl Sized` will meet its required lifetime bounds
28 help: consider adding an explicit lifetime bound...
30 LL | fn foo1<'b>(d: impl Sized + 'b, p: &'b mut ()) -> impl Sized + '_ {
33 error[E0311]: the parameter type `impl Sized + 'a` may not live long enough
34 --> $DIR/issue-105544.rs:20:5
39 note: the parameter type `impl Sized + 'a` must be valid for the anonymous lifetime defined here...
40 --> $DIR/issue-105544.rs:18:36
42 LL | fn foo2<'a>(d: impl Sized + 'a, p: &mut ()) -> impl Sized + '_ {
44 note: ...so that the type `impl Sized + 'a` will meet its required lifetime bounds
45 --> $DIR/issue-105544.rs:20:5
49 help: consider adding an explicit lifetime bound...
51 LL | fn foo2<'b, 'a>(d: impl Sized + 'a + 'b, p: &'b mut ()) -> impl Sized + '_ {
54 error[E0311]: the parameter type `T` may not live long enough
55 --> $DIR/issue-105544.rs:27:5
60 note: the parameter type `T` must be valid for the anonymous lifetime defined here...
61 --> $DIR/issue-105544.rs:25:28
63 LL | fn bar<T : Sized>(d: T, p: & mut ()) -> impl Sized + '_ {
65 note: ...so that the type `T` will meet its required lifetime bounds
66 --> $DIR/issue-105544.rs:27:5
70 help: consider adding an explicit lifetime bound...
72 LL | fn bar<'a, T : Sized + 'a>(d: T, p: &'a mut ()) -> impl Sized + '_ {
75 error[E0309]: the parameter type `T` may not live long enough
76 --> $DIR/issue-105544.rs:34:5
79 | ^^^^^^ ...so that the type `T` will meet its required lifetime bounds
81 help: consider adding an explicit lifetime bound...
83 LL | fn bar1<'b, T : Sized + 'b>(d: T, p: &'b mut ()) -> impl Sized + '_ {
86 error[E0311]: the parameter type `T` may not live long enough
87 --> $DIR/issue-105544.rs:40:5
92 note: the parameter type `T` must be valid for the anonymous lifetime defined here...
93 --> $DIR/issue-105544.rs:38:38
95 LL | fn bar2<'a, T : Sized + 'a>(d: T, p: &mut ()) -> impl Sized + '_ {
97 note: ...so that the type `T` will meet its required lifetime bounds
98 --> $DIR/issue-105544.rs:40:5
102 help: consider adding an explicit lifetime bound...
104 LL | fn bar2<'b, 'a, T : Sized + 'a + 'b>(d: T, p: &'b mut ()) -> impl Sized + '_ {
107 error: aborting due to 6 previous errors
109 Some errors have detailed explanations: E0309, E0311.
110 For more information about an error, try `rustc --explain E0309`.