|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/ref-pat-suggestions.rs:3:8 |
| 3 | + | |
| 4 | +LL | fn _f0(&_a: u32) {} |
| 5 | + | ^^^ --- expected due to this |
| 6 | + | | |
| 7 | + | expected `u32`, found reference |
| 8 | + | |
| 9 | + = note: expected type `u32` |
| 10 | + found reference `&_` |
| 11 | +help: to take parameter `_a` by reference, move `&` to the type |
| 12 | + | |
| 13 | +LL - fn _f0(&_a: u32) {} |
| 14 | +LL + fn _f0(_a: &u32) {} |
| 15 | + | |
| 16 | + |
| 17 | +error[E0308]: mismatched types |
| 18 | + --> $DIR/ref-pat-suggestions.rs:4:8 |
| 19 | + | |
| 20 | +LL | fn _f1(&mut _a: u32) {} |
| 21 | + | ^^^^^^^ --- expected due to this |
| 22 | + | | |
| 23 | + | expected `u32`, found `&mut _` |
| 24 | + | |
| 25 | + = note: expected type `u32` |
| 26 | + found mutable reference `&mut _` |
| 27 | +help: to take parameter `_a` by reference, move `&mut` to the type |
| 28 | + | |
| 29 | +LL - fn _f1(&mut _a: u32) {} |
| 30 | +LL + fn _f1(_a: &mut u32) {} |
| 31 | + | |
| 32 | + |
| 33 | +error[E0308]: mismatched types |
| 34 | + --> $DIR/ref-pat-suggestions.rs:5:9 |
| 35 | + | |
| 36 | +LL | fn _f2(&&_a: &u32) {} |
| 37 | + | ^^^ ---- expected due to this |
| 38 | + | | |
| 39 | + | expected `u32`, found reference |
| 40 | + | |
| 41 | + = note: expected type `u32` |
| 42 | + found reference `&_` |
| 43 | +help: consider removing `&` from the pattern |
| 44 | + | |
| 45 | +LL - fn _f2(&&_a: &u32) {} |
| 46 | +LL + fn _f2(&_a: &u32) {} |
| 47 | + | |
| 48 | + |
| 49 | +error[E0308]: mismatched types |
| 50 | + --> $DIR/ref-pat-suggestions.rs:6:13 |
| 51 | + | |
| 52 | +LL | fn _f3(&mut &_a: &mut u32) {} |
| 53 | + | ^^^ -------- expected due to this |
| 54 | + | | |
| 55 | + | expected `u32`, found reference |
| 56 | + | |
| 57 | + = note: expected type `u32` |
| 58 | + found reference `&_` |
| 59 | +help: consider removing `&` from the pattern |
| 60 | + | |
| 61 | +LL - fn _f3(&mut &_a: &mut u32) {} |
| 62 | +LL + fn _f3(&mut _a: &mut u32) {} |
| 63 | + | |
| 64 | + |
| 65 | +error[E0308]: mismatched types |
| 66 | + --> $DIR/ref-pat-suggestions.rs:7:9 |
| 67 | + | |
| 68 | +LL | fn _f4(&&mut _a: &u32) {} |
| 69 | + | ^^^^^^^ ---- expected due to this |
| 70 | + | | |
| 71 | + | expected `u32`, found `&mut _` |
| 72 | + | |
| 73 | + = note: expected type `u32` |
| 74 | + found mutable reference `&mut _` |
| 75 | +help: consider removing `&mut` from the pattern |
| 76 | + | |
| 77 | +LL - fn _f4(&&mut _a: &u32) {} |
| 78 | +LL + fn _f4(&_a: &u32) {} |
| 79 | + | |
| 80 | + |
| 81 | +error[E0308]: mismatched types |
| 82 | + --> $DIR/ref-pat-suggestions.rs:8:13 |
| 83 | + | |
| 84 | +LL | fn _f5(&mut &mut _a: &mut u32) {} |
| 85 | + | ^^^^^^^ -------- expected due to this |
| 86 | + | | |
| 87 | + | expected `u32`, found `&mut _` |
| 88 | + | |
| 89 | + = note: expected type `u32` |
| 90 | + found mutable reference `&mut _` |
| 91 | +help: consider removing `&mut` from the pattern |
| 92 | + | |
| 93 | +LL - fn _f5(&mut &mut _a: &mut u32) {} |
| 94 | +LL + fn _f5(&mut _a: &mut u32) {} |
| 95 | + | |
| 96 | + |
| 97 | +error[E0308]: mismatched types |
| 98 | + --> $DIR/ref-pat-suggestions.rs:11:23 |
| 99 | + | |
| 100 | +LL | let _: fn(u32) = |&_a| (); |
| 101 | + | ^-- |
| 102 | + | || |
| 103 | + | |expected due to this |
| 104 | + | expected `u32`, found reference |
| 105 | + | |
| 106 | + = note: expected type `u32` |
| 107 | + found reference `&_` |
| 108 | +help: consider removing `&` from the pattern |
| 109 | + | |
| 110 | +LL - let _: fn(u32) = |&_a| (); |
| 111 | +LL + let _: fn(u32) = |_a| (); |
| 112 | + | |
| 113 | + |
| 114 | +error[E0308]: mismatched types |
| 115 | + --> $DIR/ref-pat-suggestions.rs:12:23 |
| 116 | + | |
| 117 | +LL | let _: fn(u32) = |&mut _a| (); |
| 118 | + | ^^^^^-- |
| 119 | + | | | |
| 120 | + | | expected due to this |
| 121 | + | expected `u32`, found `&mut _` |
| 122 | + | |
| 123 | + = note: expected type `u32` |
| 124 | + found mutable reference `&mut _` |
| 125 | +help: consider removing `&mut` from the pattern |
| 126 | + | |
| 127 | +LL - let _: fn(u32) = |&mut _a| (); |
| 128 | +LL + let _: fn(u32) = |_a| (); |
| 129 | + | |
| 130 | + |
| 131 | +error[E0308]: mismatched types |
| 132 | + --> $DIR/ref-pat-suggestions.rs:13:25 |
| 133 | + | |
| 134 | +LL | let _: fn(&u32) = |&&_a| (); |
| 135 | + | ^-- |
| 136 | + | || |
| 137 | + | |expected due to this |
| 138 | + | expected `u32`, found reference |
| 139 | + | |
| 140 | + = note: expected type `u32` |
| 141 | + found reference `&_` |
| 142 | +help: consider removing `&` from the pattern |
| 143 | + | |
| 144 | +LL - let _: fn(&u32) = |&&_a| (); |
| 145 | +LL + let _: fn(&u32) = |&_a| (); |
| 146 | + | |
| 147 | + |
| 148 | +error[E0308]: mismatched types |
| 149 | + --> $DIR/ref-pat-suggestions.rs:14:33 |
| 150 | + | |
| 151 | +LL | let _: fn(&mut u32) = |&mut &_a| (); |
| 152 | + | ^-- |
| 153 | + | || |
| 154 | + | |expected due to this |
| 155 | + | expected `u32`, found reference |
| 156 | + | |
| 157 | + = note: expected type `u32` |
| 158 | + found reference `&_` |
| 159 | +help: consider removing `&` from the pattern |
| 160 | + | |
| 161 | +LL - let _: fn(&mut u32) = |&mut &_a| (); |
| 162 | +LL + let _: fn(&mut u32) = |&mut _a| (); |
| 163 | + | |
| 164 | + |
| 165 | +error[E0308]: mismatched types |
| 166 | + --> $DIR/ref-pat-suggestions.rs:15:25 |
| 167 | + | |
| 168 | +LL | let _: fn(&u32) = |&&mut _a| (); |
| 169 | + | ^^^^^-- |
| 170 | + | | | |
| 171 | + | | expected due to this |
| 172 | + | expected `u32`, found `&mut _` |
| 173 | + | |
| 174 | + = note: expected type `u32` |
| 175 | + found mutable reference `&mut _` |
| 176 | +help: consider removing `&mut` from the pattern |
| 177 | + | |
| 178 | +LL - let _: fn(&u32) = |&&mut _a| (); |
| 179 | +LL + let _: fn(&u32) = |&_a| (); |
| 180 | + | |
| 181 | + |
| 182 | +error[E0308]: mismatched types |
| 183 | + --> $DIR/ref-pat-suggestions.rs:16:33 |
| 184 | + | |
| 185 | +LL | let _: fn(&mut u32) = |&mut &mut _a| (); |
| 186 | + | ^^^^^-- |
| 187 | + | | | |
| 188 | + | | expected due to this |
| 189 | + | expected `u32`, found `&mut _` |
| 190 | + | |
| 191 | + = note: expected type `u32` |
| 192 | + found mutable reference `&mut _` |
| 193 | +help: consider removing `&mut` from the pattern |
| 194 | + | |
| 195 | +LL - let _: fn(&mut u32) = |&mut &mut _a| (); |
| 196 | +LL + let _: fn(&mut u32) = |&mut _a| (); |
| 197 | + | |
| 198 | + |
| 199 | +error[E0308]: mismatched types |
| 200 | + --> $DIR/ref-pat-suggestions.rs:18:14 |
| 201 | + | |
| 202 | +LL | let _ = |&_a: u32| (); |
| 203 | + | ^^^ --- expected due to this |
| 204 | + | | |
| 205 | + | expected `u32`, found reference |
| 206 | + | |
| 207 | + = note: expected type `u32` |
| 208 | + found reference `&_` |
| 209 | +help: to take parameter `_a` by reference, move `&` to the type |
| 210 | + | |
| 211 | +LL - let _ = |&_a: u32| (); |
| 212 | +LL + let _ = |_a: &u32| (); |
| 213 | + | |
| 214 | + |
| 215 | +error[E0308]: mismatched types |
| 216 | + --> $DIR/ref-pat-suggestions.rs:19:14 |
| 217 | + | |
| 218 | +LL | let _ = |&mut _a: u32| (); |
| 219 | + | ^^^^^^^ --- expected due to this |
| 220 | + | | |
| 221 | + | expected `u32`, found `&mut _` |
| 222 | + | |
| 223 | + = note: expected type `u32` |
| 224 | + found mutable reference `&mut _` |
| 225 | +help: to take parameter `_a` by reference, move `&mut` to the type |
| 226 | + | |
| 227 | +LL - let _ = |&mut _a: u32| (); |
| 228 | +LL + let _ = |_a: &mut u32| (); |
| 229 | + | |
| 230 | + |
| 231 | +error[E0308]: mismatched types |
| 232 | + --> $DIR/ref-pat-suggestions.rs:20:15 |
| 233 | + | |
| 234 | +LL | let _ = |&&_a: &u32| (); |
| 235 | + | ^^^ ---- expected due to this |
| 236 | + | | |
| 237 | + | expected `u32`, found reference |
| 238 | + | |
| 239 | + = note: expected type `u32` |
| 240 | + found reference `&_` |
| 241 | +help: consider removing `&` from the pattern |
| 242 | + | |
| 243 | +LL - let _ = |&&_a: &u32| (); |
| 244 | +LL + let _ = |&_a: &u32| (); |
| 245 | + | |
| 246 | + |
| 247 | +error[E0308]: mismatched types |
| 248 | + --> $DIR/ref-pat-suggestions.rs:21:19 |
| 249 | + | |
| 250 | +LL | let _ = |&mut &_a: &mut u32| (); |
| 251 | + | ^^^ -------- expected due to this |
| 252 | + | | |
| 253 | + | expected `u32`, found reference |
| 254 | + | |
| 255 | + = note: expected type `u32` |
| 256 | + found reference `&_` |
| 257 | +help: consider removing `&` from the pattern |
| 258 | + | |
| 259 | +LL - let _ = |&mut &_a: &mut u32| (); |
| 260 | +LL + let _ = |&mut _a: &mut u32| (); |
| 261 | + | |
| 262 | + |
| 263 | +error[E0308]: mismatched types |
| 264 | + --> $DIR/ref-pat-suggestions.rs:22:15 |
| 265 | + | |
| 266 | +LL | let _ = |&&mut _a: &u32| (); |
| 267 | + | ^^^^^^^ ---- expected due to this |
| 268 | + | | |
| 269 | + | expected `u32`, found `&mut _` |
| 270 | + | |
| 271 | + = note: expected type `u32` |
| 272 | + found mutable reference `&mut _` |
| 273 | +help: consider removing `&mut` from the pattern |
| 274 | + | |
| 275 | +LL - let _ = |&&mut _a: &u32| (); |
| 276 | +LL + let _ = |&_a: &u32| (); |
| 277 | + | |
| 278 | + |
| 279 | +error[E0308]: mismatched types |
| 280 | + --> $DIR/ref-pat-suggestions.rs:23:19 |
| 281 | + | |
| 282 | +LL | let _ = |&mut &mut _a: &mut u32| (); |
| 283 | + | ^^^^^^^ -------- expected due to this |
| 284 | + | | |
| 285 | + | expected `u32`, found `&mut _` |
| 286 | + | |
| 287 | + = note: expected type `u32` |
| 288 | + found mutable reference `&mut _` |
| 289 | +help: consider removing `&mut` from the pattern |
| 290 | + | |
| 291 | +LL - let _ = |&mut &mut _a: &mut u32| (); |
| 292 | +LL + let _ = |&mut _a: &mut u32| (); |
| 293 | + | |
| 294 | + |
| 295 | +error: aborting due to 18 previous errors |
| 296 | + |
| 297 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments