-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.
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);
| ^^^^^^^
kennytm
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.