fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0261]: use of undeclared lifetime name `'a` 2 --> $DIR/missing-lifetimes-in-signature.rs:37:11 3 | 4LL | fn baz<G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ 5 | - ^^ undeclared lifetime 6 | | 7 | help: consider introducing lifetime `'a` here: `'a,` 8 9error[E0700]: hidden type for `impl FnOnce()` captures lifetime that does not appear in bounds 10 --> $DIR/missing-lifetimes-in-signature.rs:19:5 11 | 12LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() 13 | ------ ------------- opaque type defined here 14 | | 15 | hidden type `{closure@$DIR/missing-lifetimes-in-signature.rs:19:5: 19:12}` captures the anonymous lifetime defined here 16... 17LL | / move || { 18LL | | 19LL | | *dest = g.get(); 20LL | | } 21 | |_____^ 22 | 23help: to declare that `impl FnOnce()` captures `'_`, you can add an explicit `'_` lifetime bound 24 | 25LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ 26 | ++++ 27 28error[E0311]: the parameter type `G` may not live long enough 29 --> $DIR/missing-lifetimes-in-signature.rs:30:5 30 | 31LL | / move || { 32LL | | 33LL | | *dest = g.get(); 34LL | | } 35 | |_____^ 36 | 37note: the parameter type `G` must be valid for the anonymous lifetime defined here... 38 --> $DIR/missing-lifetimes-in-signature.rs:26:26 39 | 40LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ 41 | ^^^^^^ 42note: ...so that the type `G` will meet its required lifetime bounds 43 --> $DIR/missing-lifetimes-in-signature.rs:30:5 44 | 45LL | / move || { 46LL | | 47LL | | *dest = g.get(); 48LL | | } 49 | |_____^ 50help: consider adding an explicit lifetime bound... 51 | 52LL ~ fn bar<'a, G, T>(g: G, dest: &'a mut T) -> impl FnOnce() + '_ 53LL | where 54LL ~ G: Get<T> + 'a, 55 | 56 57error[E0311]: the parameter type `G` may not live long enough 58 --> $DIR/missing-lifetimes-in-signature.rs:52:5 59 | 60LL | / move || { 61LL | | 62LL | | *dest = g.get(); 63LL | | } 64 | |_____^ 65 | 66note: the parameter type `G` must be valid for the anonymous lifetime defined here... 67 --> $DIR/missing-lifetimes-in-signature.rs:48:34 68 | 69LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ 70 | ^^^^^^ 71note: ...so that the type `G` will meet its required lifetime bounds 72 --> $DIR/missing-lifetimes-in-signature.rs:52:5 73 | 74LL | / move || { 75LL | | 76LL | | *dest = g.get(); 77LL | | } 78 | |_____^ 79help: consider adding an explicit lifetime bound... 80 | 81LL | fn qux<'b, 'a, G: 'a + 'b, T>(g: G, dest: &'b mut T) -> impl FnOnce() + '_ 82 | +++ ++++ ++ 83 84error[E0311]: the parameter type `G` may not live long enough 85 --> $DIR/missing-lifetimes-in-signature.rs:61:9 86 | 87LL | / move || { 88LL | | 89LL | | *dest = g.get(); 90LL | | } 91 | |_________^ 92 | 93note: the parameter type `G` must be valid for the anonymous lifetime defined here... 94 --> $DIR/missing-lifetimes-in-signature.rs:60:47 95 | 96LL | fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ { 97 | ^^^^^^ 98note: ...so that the type `G` will meet its required lifetime bounds 99 --> $DIR/missing-lifetimes-in-signature.rs:61:9 100 | 101LL | / move || { 102LL | | 103LL | | *dest = g.get(); 104LL | | } 105 | |_________^ 106help: consider adding an explicit lifetime bound... 107 | 108LL | fn qux<'c, 'b, G: Get<T> + 'b + 'c, T>(g: G, dest: &'c mut T) -> impl FnOnce() + '_ { 109 | +++ ++++ ++ 110 111error[E0311]: the parameter type `G` may not live long enough 112 --> $DIR/missing-lifetimes-in-signature.rs:73:5 113 | 114LL | / move || { 115LL | | 116LL | | 117LL | | *dest = g.get(); 118LL | | } 119 | |_____^ 120 | 121note: the parameter type `G` must be valid for the anonymous lifetime defined here... 122 --> $DIR/missing-lifetimes-in-signature.rs:69:34 123 | 124LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a 125 | ^^^^^^ 126note: ...so that the type `G` will meet its required lifetime bounds 127 --> $DIR/missing-lifetimes-in-signature.rs:73:5 128 | 129LL | / move || { 130LL | | 131LL | | 132LL | | *dest = g.get(); 133LL | | } 134 | |_____^ 135help: consider adding an explicit lifetime bound... 136 | 137LL | fn bat<'b, 'a, G: 'a + 'b, T>(g: G, dest: &'b mut T) -> impl FnOnce() + '_ + 'a 138 | +++ ++++ ++ 139 140error[E0621]: explicit lifetime required in the type of `dest` 141 --> $DIR/missing-lifetimes-in-signature.rs:73:5 142 | 143LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a 144 | ------ help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T` 145... 146LL | / move || { 147LL | | 148LL | | 149LL | | *dest = g.get(); 150LL | | } 151 | |_____^ lifetime `'a` required 152 153error[E0309]: the parameter type `G` may not live long enough 154 --> $DIR/missing-lifetimes-in-signature.rs:85:5 155 | 156LL | / move || { 157LL | | 158LL | | *dest = g.get(); 159LL | | } 160 | |_____^ ...so that the type `G` will meet its required lifetime bounds 161 | 162help: consider adding an explicit lifetime bound... 163 | 164LL | G: Get<T> + 'a, 165 | ++++ 166 167error: aborting due to 8 previous errors 168 169Some errors have detailed explanations: E0261, E0309, E0311, E0621, E0700. 170For more information about an error, try `rustc --explain E0261`.