@@ -32,106 +32,117 @@ error: cannot concatenate string literals
3232LL | concat_bytes!(r#"tnrsi"#, r###"tnri"###);
3333 | ^^^^^^^^^^ help: try using a byte string: `br#"tnrsi"#`
3434
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'
3642 --> $DIR/concat-bytes-error.rs:18:19
3743 |
3844LL | concat_bytes!(c"tnrsi", c"tnri");
3945 | ^^^^^^^^
46+ = note: concatenating C strings is ambiguous about including the '\0'
4047
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
4350 |
4451LL | concat_bytes!(cr"tnrsi", cr"tnri");
4552 | ^^^^^^^^^
53+ |
54+ = note: concatenating C strings is ambiguous about including the '\0'
4655
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
4958 |
5059LL | concat_bytes!(cr#"tnrsi"#, cr###"tnri"###);
5160 | ^^^^^^^^^^^
61+ |
62+ = note: concatenating C strings is ambiguous about including the '\0'
5263
5364error: cannot concatenate float literals
54- --> $DIR/concat-bytes-error.rs:23 :19
65+ --> $DIR/concat-bytes-error.rs:24 :19
5566 |
5667LL | concat_bytes!(2.8);
5768 | ^^^
5869
5970error: cannot concatenate numeric literals
60- --> $DIR/concat-bytes-error.rs:24 :19
71+ --> $DIR/concat-bytes-error.rs:25 :19
6172 |
6273LL | concat_bytes!(300);
6374 | ^^^ help: try wrapping the number in an array: `[300]`
6475
6576error: cannot concatenate character literals
66- --> $DIR/concat-bytes-error.rs:26 :19
77+ --> $DIR/concat-bytes-error.rs:27 :19
6778 |
6879LL | concat_bytes!('a');
6980 | ^^^ help: try using a byte character: `b'a'`
7081
7182error: cannot concatenate boolean literals
72- --> $DIR/concat-bytes-error.rs:28 :19
83+ --> $DIR/concat-bytes-error.rs:29 :19
7384 |
7485LL | concat_bytes!(true, false);
7586 | ^^^^
7687
7788error: cannot concatenate numeric literals
78- --> $DIR/concat-bytes-error.rs:29 :19
89+ --> $DIR/concat-bytes-error.rs:30 :19
7990 |
8091LL | concat_bytes!(42, b"va", b'l');
8192 | ^^ help: try wrapping the number in an array: `[42]`
8293
8394error: cannot concatenate numeric literals
84- --> $DIR/concat-bytes-error.rs:31 :19
95+ --> $DIR/concat-bytes-error.rs:32 :19
8596 |
8697LL | concat_bytes!(42, b"va", b'l', [1, 2]);
8798 | ^^ help: try wrapping the number in an array: `[42]`
8899
89100error: cannot concatenate string literals
90- --> $DIR/concat-bytes-error.rs:36 :9
101+ --> $DIR/concat-bytes-error.rs:37 :9
91102 |
92103LL | "hi",
93104 | ^^^^
94105
95106error: cannot concatenate character literals
96- --> $DIR/concat-bytes-error.rs:39 :9
107+ --> $DIR/concat-bytes-error.rs:40 :9
97108 |
98109LL | 'a',
99110 | ^^^ help: try using a byte character: `b'a'`
100111
101112error: cannot concatenate boolean literals
102- --> $DIR/concat-bytes-error.rs:43 :9
113+ --> $DIR/concat-bytes-error.rs:44 :9
103114 |
104115LL | true,
105116 | ^^^^
106117
107118error: cannot concatenate boolean literals
108- --> $DIR/concat-bytes-error.rs:46 :9
119+ --> $DIR/concat-bytes-error.rs:47 :9
109120 |
110121LL | false,
111122 | ^^^^^
112123
113124error: cannot concatenate float literals
114- --> $DIR/concat-bytes-error.rs:49 :9
125+ --> $DIR/concat-bytes-error.rs:50 :9
115126 |
116127LL | 2.6,
117128 | ^^^
118129
119130error: numeric literal is out of bounds
120- --> $DIR/concat-bytes-error.rs:52 :9
131+ --> $DIR/concat-bytes-error.rs:53 :9
121132 |
122133LL | 265,
123134 | ^^^
124135
125136error: expected a byte literal
126- --> $DIR/concat-bytes-error.rs:55 :9
137+ --> $DIR/concat-bytes-error.rs:56 :9
127138 |
128139LL | -33,
129140 | ^^^
130141 |
131142 = note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
132143
133144error: cannot concatenate doubly nested array
134- --> $DIR/concat-bytes-error.rs:58 :9
145+ --> $DIR/concat-bytes-error.rs:59 :9
135146 |
136147LL | b"hi!",
137148 | ^^^^^^
@@ -140,69 +151,69 @@ LL | b"hi!",
140151 = help: try flattening the array
141152
142153error: cannot concatenate doubly nested array
143- --> $DIR/concat-bytes-error.rs:61 :9
154+ --> $DIR/concat-bytes-error.rs:62 :9
144155 |
145156LL | [5, 6, 7],
146157 | ^^^^^^^^^
147158
148159error: cannot concatenate numeric literals
149- --> $DIR/concat-bytes-error.rs:63 :19
160+ --> $DIR/concat-bytes-error.rs:64 :19
150161 |
151162LL | concat_bytes!(5u16);
152163 | ^^^^ help: try wrapping the number in an array: `[5u16]`
153164
154165error: numeric literal is not a `u8`
155- --> $DIR/concat-bytes-error.rs:65 :20
166+ --> $DIR/concat-bytes-error.rs:66 :20
156167 |
157168LL | concat_bytes!([5u16]);
158169 | ^^^^
159170
160171error: repeat count is not a positive number
161- --> $DIR/concat-bytes-error.rs:66 :23
172+ --> $DIR/concat-bytes-error.rs:67 :23
162173 |
163174LL | concat_bytes!([3; ()]);
164175 | ^^
165176
166177error: repeat count is not a positive number
167- --> $DIR/concat-bytes-error.rs:67 :23
178+ --> $DIR/concat-bytes-error.rs:68 :23
168179 |
169180LL | concat_bytes!([3; -2]);
170181 | ^^
171182
172183error: repeat count is not a positive number
173- --> $DIR/concat-bytes-error.rs:68 :25
184+ --> $DIR/concat-bytes-error.rs:69 :25
174185 |
175186LL | concat_bytes!([pie; -2]);
176187 | ^^
177188
178189error: expected a byte literal
179- --> $DIR/concat-bytes-error.rs:69 :20
190+ --> $DIR/concat-bytes-error.rs:70 :20
180191 |
181192LL | concat_bytes!([pie; 2]);
182193 | ^^^
183194 |
184195 = note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
185196
186197error: cannot concatenate float literals
187- --> $DIR/concat-bytes-error.rs:70 :20
198+ --> $DIR/concat-bytes-error.rs:71 :20
188199 |
189200LL | concat_bytes!([2.2; 0]);
190201 | ^^^
191202
192203error: repeat count is not a positive number
193- --> $DIR/concat-bytes-error.rs:71 :25
204+ --> $DIR/concat-bytes-error.rs:72 :25
194205 |
195206LL | concat_bytes!([5.5; ()]);
196207 | ^^
197208
198209error: cannot concatenate doubly nested array
199- --> $DIR/concat-bytes-error.rs:72 :20
210+ --> $DIR/concat-bytes-error.rs:73 :20
200211 |
201212LL | concat_bytes!([[1, 2, 3]; 3]);
202213 | ^^^^^^^^^
203214
204215error: cannot concatenate doubly nested array
205- --> $DIR/concat-bytes-error.rs:73 :20
216+ --> $DIR/concat-bytes-error.rs:74 :20
206217 |
207218LL | concat_bytes!([[42; 2]; 3]);
208219 | ^^^^^^^
0 commit comments