@@ -32,106 +32,117 @@ error: cannot concatenate string literals
32
32
LL | concat_bytes!(r#"tnrsi"#, r###"tnri"###);
33
33
| ^^^^^^^^^^ help: try using a byte string: `br#"tnrsi"#`
34
34
35
- error: cannot concatenate a C string literal
35
+ error: cannot concatenate C string literals
36
+ --> $DIR/concat-bytes-error.rs:18:19
37
+ |
38
+ LL | concat_bytes!(c"tnrsi", c"tnri");
39
+ | ^^^^^^^^ help: try using a null-terminated byte string: `b"tnrsi\0"`
40
+ |
41
+ note: concatenating C strings is ambiguous about including the '\0'
36
42
--> $DIR/concat-bytes-error.rs:18:19
37
43
|
38
44
LL | concat_bytes!(c"tnrsi", c"tnri");
39
45
| ^^^^^^^^
46
+ = note: concatenating C strings is ambiguous about including the '\0'
40
47
41
- error: cannot concatenate a C string literal
42
- --> $DIR/concat-bytes-error.rs:19 :19
48
+ error: cannot concatenate C string literals
49
+ --> $DIR/concat-bytes-error.rs:20 :19
43
50
|
44
51
LL | concat_bytes!(cr"tnrsi", cr"tnri");
45
52
| ^^^^^^^^^
53
+ |
54
+ = note: concatenating C strings is ambiguous about including the '\0'
46
55
47
- error: cannot concatenate a C string literal
48
- --> $DIR/concat-bytes-error.rs:20 :19
56
+ error: cannot concatenate C string literals
57
+ --> $DIR/concat-bytes-error.rs:21 :19
49
58
|
50
59
LL | concat_bytes!(cr#"tnrsi"#, cr###"tnri"###);
51
60
| ^^^^^^^^^^^
61
+ |
62
+ = note: concatenating C strings is ambiguous about including the '\0'
52
63
53
64
error: cannot concatenate float literals
54
- --> $DIR/concat-bytes-error.rs:23 :19
65
+ --> $DIR/concat-bytes-error.rs:24 :19
55
66
|
56
67
LL | concat_bytes!(2.8);
57
68
| ^^^
58
69
59
70
error: cannot concatenate numeric literals
60
- --> $DIR/concat-bytes-error.rs:24 :19
71
+ --> $DIR/concat-bytes-error.rs:25 :19
61
72
|
62
73
LL | concat_bytes!(300);
63
74
| ^^^ help: try wrapping the number in an array: `[300]`
64
75
65
76
error: cannot concatenate character literals
66
- --> $DIR/concat-bytes-error.rs:26 :19
77
+ --> $DIR/concat-bytes-error.rs:27 :19
67
78
|
68
79
LL | concat_bytes!('a');
69
80
| ^^^ help: try using a byte character: `b'a'`
70
81
71
82
error: cannot concatenate boolean literals
72
- --> $DIR/concat-bytes-error.rs:28 :19
83
+ --> $DIR/concat-bytes-error.rs:29 :19
73
84
|
74
85
LL | concat_bytes!(true, false);
75
86
| ^^^^
76
87
77
88
error: cannot concatenate numeric literals
78
- --> $DIR/concat-bytes-error.rs:29 :19
89
+ --> $DIR/concat-bytes-error.rs:30 :19
79
90
|
80
91
LL | concat_bytes!(42, b"va", b'l');
81
92
| ^^ help: try wrapping the number in an array: `[42]`
82
93
83
94
error: cannot concatenate numeric literals
84
- --> $DIR/concat-bytes-error.rs:31 :19
95
+ --> $DIR/concat-bytes-error.rs:32 :19
85
96
|
86
97
LL | concat_bytes!(42, b"va", b'l', [1, 2]);
87
98
| ^^ help: try wrapping the number in an array: `[42]`
88
99
89
100
error: cannot concatenate string literals
90
- --> $DIR/concat-bytes-error.rs:36 :9
101
+ --> $DIR/concat-bytes-error.rs:37 :9
91
102
|
92
103
LL | "hi",
93
104
| ^^^^
94
105
95
106
error: cannot concatenate character literals
96
- --> $DIR/concat-bytes-error.rs:39 :9
107
+ --> $DIR/concat-bytes-error.rs:40 :9
97
108
|
98
109
LL | 'a',
99
110
| ^^^ help: try using a byte character: `b'a'`
100
111
101
112
error: cannot concatenate boolean literals
102
- --> $DIR/concat-bytes-error.rs:43 :9
113
+ --> $DIR/concat-bytes-error.rs:44 :9
103
114
|
104
115
LL | true,
105
116
| ^^^^
106
117
107
118
error: cannot concatenate boolean literals
108
- --> $DIR/concat-bytes-error.rs:46 :9
119
+ --> $DIR/concat-bytes-error.rs:47 :9
109
120
|
110
121
LL | false,
111
122
| ^^^^^
112
123
113
124
error: cannot concatenate float literals
114
- --> $DIR/concat-bytes-error.rs:49 :9
125
+ --> $DIR/concat-bytes-error.rs:50 :9
115
126
|
116
127
LL | 2.6,
117
128
| ^^^
118
129
119
130
error: numeric literal is out of bounds
120
- --> $DIR/concat-bytes-error.rs:52 :9
131
+ --> $DIR/concat-bytes-error.rs:53 :9
121
132
|
122
133
LL | 265,
123
134
| ^^^
124
135
125
136
error: expected a byte literal
126
- --> $DIR/concat-bytes-error.rs:55 :9
137
+ --> $DIR/concat-bytes-error.rs:56 :9
127
138
|
128
139
LL | -33,
129
140
| ^^^
130
141
|
131
142
= note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
132
143
133
144
error: cannot concatenate doubly nested array
134
- --> $DIR/concat-bytes-error.rs:58 :9
145
+ --> $DIR/concat-bytes-error.rs:59 :9
135
146
|
136
147
LL | b"hi!",
137
148
| ^^^^^^
@@ -140,69 +151,69 @@ LL | b"hi!",
140
151
= help: try flattening the array
141
152
142
153
error: cannot concatenate doubly nested array
143
- --> $DIR/concat-bytes-error.rs:61 :9
154
+ --> $DIR/concat-bytes-error.rs:62 :9
144
155
|
145
156
LL | [5, 6, 7],
146
157
| ^^^^^^^^^
147
158
148
159
error: cannot concatenate numeric literals
149
- --> $DIR/concat-bytes-error.rs:63 :19
160
+ --> $DIR/concat-bytes-error.rs:64 :19
150
161
|
151
162
LL | concat_bytes!(5u16);
152
163
| ^^^^ help: try wrapping the number in an array: `[5u16]`
153
164
154
165
error: numeric literal is not a `u8`
155
- --> $DIR/concat-bytes-error.rs:65 :20
166
+ --> $DIR/concat-bytes-error.rs:66 :20
156
167
|
157
168
LL | concat_bytes!([5u16]);
158
169
| ^^^^
159
170
160
171
error: repeat count is not a positive number
161
- --> $DIR/concat-bytes-error.rs:66 :23
172
+ --> $DIR/concat-bytes-error.rs:67 :23
162
173
|
163
174
LL | concat_bytes!([3; ()]);
164
175
| ^^
165
176
166
177
error: repeat count is not a positive number
167
- --> $DIR/concat-bytes-error.rs:67 :23
178
+ --> $DIR/concat-bytes-error.rs:68 :23
168
179
|
169
180
LL | concat_bytes!([3; -2]);
170
181
| ^^
171
182
172
183
error: repeat count is not a positive number
173
- --> $DIR/concat-bytes-error.rs:68 :25
184
+ --> $DIR/concat-bytes-error.rs:69 :25
174
185
|
175
186
LL | concat_bytes!([pie; -2]);
176
187
| ^^
177
188
178
189
error: expected a byte literal
179
- --> $DIR/concat-bytes-error.rs:69 :20
190
+ --> $DIR/concat-bytes-error.rs:70 :20
180
191
|
181
192
LL | concat_bytes!([pie; 2]);
182
193
| ^^^
183
194
|
184
195
= note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
185
196
186
197
error: cannot concatenate float literals
187
- --> $DIR/concat-bytes-error.rs:70 :20
198
+ --> $DIR/concat-bytes-error.rs:71 :20
188
199
|
189
200
LL | concat_bytes!([2.2; 0]);
190
201
| ^^^
191
202
192
203
error: repeat count is not a positive number
193
- --> $DIR/concat-bytes-error.rs:71 :25
204
+ --> $DIR/concat-bytes-error.rs:72 :25
194
205
|
195
206
LL | concat_bytes!([5.5; ()]);
196
207
| ^^
197
208
198
209
error: cannot concatenate doubly nested array
199
- --> $DIR/concat-bytes-error.rs:72 :20
210
+ --> $DIR/concat-bytes-error.rs:73 :20
200
211
|
201
212
LL | concat_bytes!([[1, 2, 3]; 3]);
202
213
| ^^^^^^^^^
203
214
204
215
error: cannot concatenate doubly nested array
205
- --> $DIR/concat-bytes-error.rs:73 :20
216
+ --> $DIR/concat-bytes-error.rs:74 :20
206
217
|
207
218
LL | concat_bytes!([[42; 2]; 3]);
208
219
| ^^^^^^^
0 commit comments