Closed
Description
The error for concat!(x)
is:
error: expected a literal
--> src/main.rs:2:13
|
2 | concat!(x);
| ^
help: you might be missing a string literal to format with
|
2 | concat!("{}", x);
| ^^^^^^^
That suggestion will clearly not work and gets worse when there are more arguments:
error: expected a literal
--> src/main.rs:2:13
|
2 | concat!(x, y, z);
| ^
help: you might be missing a string literal to format with
|
2 | concat!("{}", x, y, z);
| ^^^^^^^
error: expected a literal
--> src/main.rs:2:16
|
2 | concat!(x, y, z);
| ^
help: you might be missing a string literal to format with
|
2 | concat!(x, "{}", y, z);
| ^^^^^^^
error: expected a literal
--> src/main.rs:2:19
|
2 | concat!(x, y, z);
| ^
help: you might be missing a string literal to format with
|
2 | concat!(x, y, "{}", z);
| ^^^^^^^