about summary refs log tree commit diff
path: root/tests/ui/c-variadic/no-closure.stderr
blob: 77bd106bb9519625853fd8c7df0bc3356ff86930 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
error[E0743]: C-variadic type `...` may not be nested inside another type
  --> $DIR/no-closure.rs:6:35
   |
LL | const F: extern "C" fn(...) = |_: ...| {};
   |                                   ^^^

error: unexpected `...`
  --> $DIR/no-closure.rs:10:14
   |
LL |     let f = |...| {};
   |              ^^^ not a valid pattern
   |
help: for a rest pattern, use `..` instead of `...`
   |
LL -     let f = |...| {};
LL +     let f = |..| {};
   |

error[E0743]: C-variadic type `...` may not be nested inside another type
  --> $DIR/no-closure.rs:14:17
   |
LL |     let f = |_: ...| {};
   |                 ^^^

error: `..` patterns are not allowed here
  --> $DIR/no-closure.rs:10:14
   |
LL |     let f = |...| {};
   |              ^^^
   |
   = note: only allowed in tuple, tuple struct, and slice patterns

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0743`.