fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0631]: type mismatch in closure arguments 2 --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5 3 | 4LL | f1(|_: (), _: ()| {}); 5 | ^^ -------------- found signature defined here 6 | | 7 | expected due to this 8 | 9 = note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _` 10 found closure signature `fn((), ()) -> _` 11note: required by a bound in `f1` 12 --> $DIR/anonymous-higher-ranked-lifetime.rs:16:25 13 | 14LL | fn f1<F>(_: F) where F: Fn(&(), &()) {} 15 | ^^^^^^^^^^^^ required by this bound in `f1` 16help: consider adjusting the signature so it borrows its arguments 17 | 18LL | f1(|_: &(), _: &()| {}); 19 | + + 20 21error[E0631]: type mismatch in closure arguments 22 --> $DIR/anonymous-higher-ranked-lifetime.rs:3:5 23 | 24LL | f2(|_: (), _: ()| {}); 25 | ^^ -------------- found signature defined here 26 | | 27 | expected due to this 28 | 29 = note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _` 30 found closure signature `fn((), ()) -> _` 31note: required by a bound in `f2` 32 --> $DIR/anonymous-higher-ranked-lifetime.rs:17:25 33 | 34LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {} 35 | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2` 36help: consider adjusting the signature so it borrows its arguments 37 | 38LL | f2(|_: &(), _: &()| {}); 39 | + + 40 41error[E0631]: type mismatch in closure arguments 42 --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5 43 | 44LL | f3(|_: (), _: ()| {}); 45 | ^^ -------------- found signature defined here 46 | | 47 | expected due to this 48 | 49 = note: expected closure signature `for<'a> fn(&(), &'a ()) -> _` 50 found closure signature `fn((), ()) -> _` 51note: required by a bound in `f3` 52 --> $DIR/anonymous-higher-ranked-lifetime.rs:18:29 53 | 54LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} 55 | ^^^^^^^^^^^^^^^ required by this bound in `f3` 56help: consider adjusting the signature so it borrows its arguments 57 | 58LL | f3(|_: &(), _: &()| {}); 59 | + + 60 61error[E0631]: type mismatch in closure arguments 62 --> $DIR/anonymous-higher-ranked-lifetime.rs:5:5 63 | 64LL | f4(|_: (), _: ()| {}); 65 | ^^ -------------- found signature defined here 66 | | 67 | expected due to this 68 | 69 = note: expected closure signature `for<'r, 'a> fn(&'a (), &'r ()) -> _` 70 found closure signature `fn((), ()) -> _` 71note: required by a bound in `f4` 72 --> $DIR/anonymous-higher-ranked-lifetime.rs:19:25 73 | 74LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {} 75 | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4` 76help: consider adjusting the signature so it borrows its arguments 77 | 78LL | f4(|_: &(), _: &()| {}); 79 | + + 80 81error[E0631]: type mismatch in closure arguments 82 --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5 83 | 84LL | f5(|_: (), _: ()| {}); 85 | ^^ -------------- found signature defined here 86 | | 87 | expected due to this 88 | 89 = note: expected closure signature `for<'r> fn(&'r (), &'r ()) -> _` 90 found closure signature `fn((), ()) -> _` 91note: required by a bound in `f5` 92 --> $DIR/anonymous-higher-ranked-lifetime.rs:20:25 93 | 94LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} 95 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5` 96help: consider adjusting the signature so it borrows its arguments 97 | 98LL | f5(|_: &(), _: &()| {}); 99 | + + 100 101error[E0631]: type mismatch in closure arguments 102 --> $DIR/anonymous-higher-ranked-lifetime.rs:7:5 103 | 104LL | g1(|_: (), _: ()| {}); 105 | ^^ -------------- found signature defined here 106 | | 107 | expected due to this 108 | 109 = note: expected closure signature `for<'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _` 110 found closure signature `fn((), ()) -> _` 111note: required by a bound in `g1` 112 --> $DIR/anonymous-higher-ranked-lifetime.rs:23:25 113 | 114LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {} 115 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1` 116help: consider adjusting the signature so it borrows its argument 117 | 118LL | g1(|_: &(), _: ()| {}); 119 | + 120 121error[E0631]: type mismatch in closure arguments 122 --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5 123 | 124LL | g2(|_: (), _: ()| {}); 125 | ^^ -------------- found signature defined here 126 | | 127 | expected due to this 128 | 129 = note: expected closure signature `for<'a> fn(&'a (), for<'a> fn(&'a ())) -> _` 130 found closure signature `fn((), ()) -> _` 131note: required by a bound in `g2` 132 --> $DIR/anonymous-higher-ranked-lifetime.rs:24:25 133 | 134LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {} 135 | ^^^^^^^^^^^^^^^^ required by this bound in `g2` 136help: consider adjusting the signature so it borrows its argument 137 | 138LL | g2(|_: &(), _: ()| {}); 139 | + 140 141error[E0631]: type mismatch in closure arguments 142 --> $DIR/anonymous-higher-ranked-lifetime.rs:9:5 143 | 144LL | g3(|_: (), _: ()| {}); 145 | ^^ -------------- found signature defined here 146 | | 147 | expected due to this 148 | 149 = note: expected closure signature `for<'s> fn(&'s (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _` 150 found closure signature `fn((), ()) -> _` 151note: required by a bound in `g3` 152 --> $DIR/anonymous-higher-ranked-lifetime.rs:25:25 153 | 154LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {} 155 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3` 156help: consider adjusting the signature so it borrows its argument 157 | 158LL | g3(|_: &(), _: ()| {}); 159 | + 160 161error[E0631]: type mismatch in closure arguments 162 --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5 163 | 164LL | g4(|_: (), _: ()| {}); 165 | ^^ -------------- found signature defined here 166 | | 167 | expected due to this 168 | 169 = note: expected closure signature `for<'a> fn(&'a (), for<'r> fn(&'r ())) -> _` 170 found closure signature `fn((), ()) -> _` 171note: required by a bound in `g4` 172 --> $DIR/anonymous-higher-ranked-lifetime.rs:26:25 173 | 174LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} 175 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4` 176help: consider adjusting the signature so it borrows its argument 177 | 178LL | g4(|_: &(), _: ()| {}); 179 | + 180 181error[E0631]: type mismatch in closure arguments 182 --> $DIR/anonymous-higher-ranked-lifetime.rs:11:5 183 | 184LL | h1(|_: (), _: (), _: (), _: ()| {}); 185 | ^^ ---------------------------- found signature defined here 186 | | 187 | expected due to this 188 | 189 = note: expected closure signature `for<'a, 'b> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'b (), for<'a, 'b> fn(&'a (), &'b ())) -> _` 190 found closure signature `fn((), (), (), ()) -> _` 191note: required by a bound in `h1` 192 --> $DIR/anonymous-higher-ranked-lifetime.rs:29:25 193 | 194LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {} 195 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1` 196help: consider adjusting the signature so it borrows its arguments 197 | 198LL | h1(|_: &(), _: (), _: &(), _: ()| {}); 199 | + + 200 201error[E0631]: type mismatch in closure arguments 202 --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 203 | 204LL | h2(|_: (), _: (), _: (), _: ()| {}); 205 | ^^ ---------------------------- found signature defined here 206 | | 207 | expected due to this 208 | 209 = note: expected closure signature `for<'t0, 'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'t0 (), for<'a, 'b> fn(&'a (), &'b ())) -> _` 210 found closure signature `fn((), (), (), ()) -> _` 211note: required by a bound in `h2` 212 --> $DIR/anonymous-higher-ranked-lifetime.rs:30:25 213 | 214LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {} 215 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2` 216help: consider adjusting the signature so it borrows its arguments 217 | 218LL | h2(|_: &(), _: (), _: &(), _: ()| {}); 219 | + + 220 221error: aborting due to 11 previous errors 222 223For more information about this error, try `rustc --explain E0631`.