File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
compiler/rustc_builtin_macros/src Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ pub fn expand_concat_bytes(
154
154
}
155
155
}
156
156
} else {
157
- cx.span_err(count.value.span, "repeat count is not a number");
157
+ cx.span_err(count.value.span, "repeat count is not a positive number");
158
158
}
159
159
}
160
160
ast::ExprKind::Lit(ref lit) => match lit.kind {
Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ fn main() {
39
39
]);
40
40
concat_bytes!(5u16); //~ ERROR cannot concatenate numeric literals
41
41
concat_bytes!([5u16]); //~ ERROR numeric literal is not a `u8`
42
- concat_bytes!([3; ()]); //~ ERROR repeat count is not a number
43
- concat_bytes!([3; -2]); //~ ERROR repeat count is not a number
44
- concat_bytes!([pie; -2]); //~ ERROR repeat count is not a number
42
+ concat_bytes!([3; ()]); //~ ERROR repeat count is not a positive number
43
+ concat_bytes!([3; -2]); //~ ERROR repeat count is not a positive number
44
+ concat_bytes!([pie; -2]); //~ ERROR repeat count is not a positive number
45
45
concat_bytes!([pie; 2]); //~ ERROR expected a byte literal
46
46
concat_bytes!([2.2; 0]); //~ ERROR cannot concatenate float literals
47
- concat_bytes!([5.5; ()]); //~ ERROR repeat count is not a number
47
+ concat_bytes!([5.5; ()]); //~ ERROR repeat count is not a positive number
48
48
concat_bytes!([[1, 2, 3]; 3]); //~ ERROR cannot concatenate doubly nested array
49
49
concat_bytes!([[42; 2]; 3]); //~ ERROR cannot concatenate doubly nested array
50
50
}
Original file line number Diff line number Diff line change @@ -127,19 +127,19 @@ error: numeric literal is not a `u8`
127
127
LL | concat_bytes!([5u16]);
128
128
| ^^^^
129
129
130
- error: repeat count is not a number
130
+ error: repeat count is not a positive number
131
131
--> $DIR/concat-bytes-error.rs:42:23
132
132
|
133
133
LL | concat_bytes!([3; ()]);
134
134
| ^^
135
135
136
- error: repeat count is not a number
136
+ error: repeat count is not a positive number
137
137
--> $DIR/concat-bytes-error.rs:43:23
138
138
|
139
139
LL | concat_bytes!([3; -2]);
140
140
| ^^
141
141
142
- error: repeat count is not a number
142
+ error: repeat count is not a positive number
143
143
--> $DIR/concat-bytes-error.rs:44:25
144
144
|
145
145
LL | concat_bytes!([pie; -2]);
@@ -159,7 +159,7 @@ error: cannot concatenate float literals
159
159
LL | concat_bytes!([2.2; 0]);
160
160
| ^^^
161
161
162
- error: repeat count is not a number
162
+ error: repeat count is not a positive number
163
163
--> $DIR/concat-bytes-error.rs:47:25
164
164
|
165
165
LL | concat_bytes!([5.5; ()]);
You can’t perform that action at this time.
0 commit comments