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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
|
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:10:13
|
LL | () => { .. }
| ^^
...
LL | let mk_pat!();
| --------- in this macro invocation
|
= note: only allowed in tuple, tuple struct, and slice patterns
= note: this error originates in the macro `mk_pat` (in Nightly builds, run with -Z macro-backtrace for more info)
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:18:9
|
LL | let ..;
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:21:13
|
LL | let box ..;
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:25:13
|
LL | 1 | .. => {}
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:29:10
|
LL | let &..;
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:30:14
|
LL | let &mut ..;
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:33:13
|
LL | let x @ ..;
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:35:17
|
LL | let ref x @ ..;
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:36:21
|
LL | let ref mut x @ ..;
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` can only be used once per tuple pattern
--> $DIR/rest-pat-semantic-disallowed.rs:43:9
|
LL | ..,
| -- previously used here
LL | ..,
| ^^ can only be used once per tuple pattern
error: `..` can only be used once per tuple pattern
--> $DIR/rest-pat-semantic-disallowed.rs:44:9
|
LL | ..,
| -- previously used here
LL | ..,
LL | ..
| ^^ can only be used once per tuple pattern
error: `..` can only be used once per tuple pattern
--> $DIR/rest-pat-semantic-disallowed.rs:49:9
|
LL | ..,
| -- previously used here
LL | x,
LL | ..
| ^^ can only be used once per tuple pattern
error: `..` can only be used once per tuple struct pattern
--> $DIR/rest-pat-semantic-disallowed.rs:59:9
|
LL | ..,
| -- previously used here
LL | ..,
| ^^ can only be used once per tuple struct pattern
error: `..` can only be used once per tuple struct pattern
--> $DIR/rest-pat-semantic-disallowed.rs:60:9
|
LL | ..,
| -- previously used here
LL | ..,
LL | ..
| ^^ can only be used once per tuple struct pattern
error: `..` can only be used once per tuple struct pattern
--> $DIR/rest-pat-semantic-disallowed.rs:65:9
|
LL | ..,
| -- previously used here
LL | x,
LL | ..
| ^^ can only be used once per tuple struct pattern
error: `..` can only be used once per slice pattern
--> $DIR/rest-pat-semantic-disallowed.rs:73:9
|
LL | ..,
| -- previously used here
LL | ..,
| ^^ can only be used once per slice pattern
error: `..` can only be used once per slice pattern
--> $DIR/rest-pat-semantic-disallowed.rs:74:9
|
LL | ..,
| -- previously used here
LL | ..,
LL | ..
| ^^ can only be used once per slice pattern
error: `..` can only be used once per slice pattern
--> $DIR/rest-pat-semantic-disallowed.rs:78:17
|
LL | ..,
| -- previously used here
LL | ref x @ ..,
| ^^ can only be used once per slice pattern
error: `..` can only be used once per slice pattern
--> $DIR/rest-pat-semantic-disallowed.rs:79:21
|
LL | ..,
| -- previously used here
LL | ref x @ ..,
LL | ref mut y @ ..,
| ^^ can only be used once per slice pattern
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:80:18
|
LL | (ref z @ ..),
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error: `..` can only be used once per slice pattern
--> $DIR/rest-pat-semantic-disallowed.rs:81:9
|
LL | ..,
| -- previously used here
...
LL | ..
| ^^ can only be used once per slice pattern
error: `..` patterns are not allowed here
--> $DIR/rest-pat-semantic-disallowed.rs:17:12
|
LL | fn foo(..: u8) {}
| ^^
|
= note: only allowed in tuple, tuple struct, and slice patterns
error[E0282]: type annotations needed
--> $DIR/rest-pat-semantic-disallowed.rs:33:9
|
LL | let x @ ..;
| ^^^^^^
|
help: consider giving this pattern a type
|
LL | let x @ ..: /* Type */;
| ++++++++++++
error: aborting due to 23 previous errors
For more information about this error, try `rustc --explain E0282`.
|