]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/concat-bytes-error.stderr
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
[rust.git] / tests / ui / macros / concat-bytes-error.stderr
1 error: expected a byte literal
2   --> $DIR/concat-bytes-error.rs:4:19
3    |
4 LL |     concat_bytes!(pie);
5    |                   ^^^
6    |
7    = note: only byte literals (like `b"foo"`, `b's'`, and `[3, 4, 5]`) can be passed to `concat_bytes!()`
8
9 error: expected a byte literal
10   --> $DIR/concat-bytes-error.rs:5:19
11    |
12 LL |     concat_bytes!(pie, pie);
13    |                   ^^^  ^^^
14    |
15    = note: only byte literals (like `b"foo"`, `b's'`, and `[3, 4, 5]`) can be passed to `concat_bytes!()`
16
17 error: cannot concatenate string literals
18   --> $DIR/concat-bytes-error.rs:6:19
19    |
20 LL |     concat_bytes!("tnrsi", "tnri");
21    |                   ^^^^^^^ help: try using a byte string: `b"tnrsi"`
22
23 error: cannot concatenate float literals
24   --> $DIR/concat-bytes-error.rs:7:19
25    |
26 LL |     concat_bytes!(2.8);
27    |                   ^^^
28
29 error: cannot concatenate numeric literals
30   --> $DIR/concat-bytes-error.rs:8:19
31    |
32 LL |     concat_bytes!(300);
33    |                   ^^^ help: try wrapping the number in an array: `[300]`
34
35 error: cannot concatenate character literals
36   --> $DIR/concat-bytes-error.rs:9:19
37    |
38 LL |     concat_bytes!('a');
39    |                   ^^^ help: try using a byte character: `b'a'`
40
41 error: cannot concatenate boolean literals
42   --> $DIR/concat-bytes-error.rs:10:19
43    |
44 LL |     concat_bytes!(true, false);
45    |                   ^^^^
46
47 error: cannot concatenate numeric literals
48   --> $DIR/concat-bytes-error.rs:11:19
49    |
50 LL |     concat_bytes!(42, b"va", b'l');
51    |                   ^^ help: try wrapping the number in an array: `[42]`
52
53 error: cannot concatenate numeric literals
54   --> $DIR/concat-bytes-error.rs:12:19
55    |
56 LL |     concat_bytes!(42, b"va", b'l', [1, 2]);
57    |                   ^^ help: try wrapping the number in an array: `[42]`
58
59 error: cannot concatenate string literals
60   --> $DIR/concat-bytes-error.rs:14:9
61    |
62 LL |         "hi",
63    |         ^^^^
64
65 error: cannot concatenate character literals
66   --> $DIR/concat-bytes-error.rs:17:9
67    |
68 LL |         'a',
69    |         ^^^ help: try using a byte character: `b'a'`
70
71 error: cannot concatenate boolean literals
72   --> $DIR/concat-bytes-error.rs:20:9
73    |
74 LL |         true,
75    |         ^^^^
76
77 error: cannot concatenate boolean literals
78   --> $DIR/concat-bytes-error.rs:23:9
79    |
80 LL |         false,
81    |         ^^^^^
82
83 error: cannot concatenate float literals
84   --> $DIR/concat-bytes-error.rs:26:9
85    |
86 LL |         2.6,
87    |         ^^^
88
89 error: numeric literal is out of bounds
90   --> $DIR/concat-bytes-error.rs:29:9
91    |
92 LL |         265,
93    |         ^^^
94
95 error: expected a byte literal
96   --> $DIR/concat-bytes-error.rs:32:9
97    |
98 LL |         -33,
99    |         ^^^
100    |
101    = note: only byte literals (like `b"foo"`, `b's'`, and `[3, 4, 5]`) can be passed to `concat_bytes!()`
102
103 error: cannot concatenate doubly nested array
104   --> $DIR/concat-bytes-error.rs:35:9
105    |
106 LL |         b"hi!",
107    |         ^^^^^^
108    |
109    = note: byte strings are treated as arrays of bytes
110    = help: try flattening the array
111
112 error: cannot concatenate doubly nested array
113   --> $DIR/concat-bytes-error.rs:38:9
114    |
115 LL |         [5, 6, 7],
116    |         ^^^^^^^^^
117
118 error: cannot concatenate numeric literals
119   --> $DIR/concat-bytes-error.rs:40:19
120    |
121 LL |     concat_bytes!(5u16);
122    |                   ^^^^ help: try wrapping the number in an array: `[5u16]`
123
124 error: numeric literal is not a `u8`
125   --> $DIR/concat-bytes-error.rs:41:20
126    |
127 LL |     concat_bytes!([5u16]);
128    |                    ^^^^
129
130 error: repeat count is not a positive number
131   --> $DIR/concat-bytes-error.rs:42:23
132    |
133 LL |     concat_bytes!([3; ()]);
134    |                       ^^
135
136 error: repeat count is not a positive number
137   --> $DIR/concat-bytes-error.rs:43:23
138    |
139 LL |     concat_bytes!([3; -2]);
140    |                       ^^
141
142 error: repeat count is not a positive number
143   --> $DIR/concat-bytes-error.rs:44:25
144    |
145 LL |     concat_bytes!([pie; -2]);
146    |                         ^^
147
148 error: expected a byte literal
149   --> $DIR/concat-bytes-error.rs:45:20
150    |
151 LL |     concat_bytes!([pie; 2]);
152    |                    ^^^
153    |
154    = note: only byte literals (like `b"foo"`, `b's'`, and `[3, 4, 5]`) can be passed to `concat_bytes!()`
155
156 error: cannot concatenate float literals
157   --> $DIR/concat-bytes-error.rs:46:20
158    |
159 LL |     concat_bytes!([2.2; 0]);
160    |                    ^^^
161
162 error: repeat count is not a positive number
163   --> $DIR/concat-bytes-error.rs:47:25
164    |
165 LL |     concat_bytes!([5.5; ()]);
166    |                         ^^
167
168 error: cannot concatenate doubly nested array
169   --> $DIR/concat-bytes-error.rs:48:20
170    |
171 LL |     concat_bytes!([[1, 2, 3]; 3]);
172    |                    ^^^^^^^^^
173
174 error: cannot concatenate doubly nested array
175   --> $DIR/concat-bytes-error.rs:49:20
176    |
177 LL |     concat_bytes!([[42; 2]; 3]);
178    |                    ^^^^^^^
179
180 error: aborting due to 28 previous errors
181