fbce952193
- Don't print the newline on its own to avoid the possibility of printing it out of order due to `stdout` locking. - Modify wording of `concat!()` with non-literals to not mislead into believing that only `&str` literals are accepted. - Add test for `concat!()` with non-literals.
11 lines
268 B
Plaintext
11 lines
268 B
Plaintext
error: expected a literal
|
|
--> $DIR/bad-concat.rs:15:21
|
|
|
|
|
LL | let _ = concat!(x, y, z, "bar");
|
|
| ^ ^ ^
|
|
|
|
|
= note: only literals (like `"foo"`, `42` and `3.14`) can be passed to `concat!()`
|
|
|
|
error: aborting due to previous error
|
|
|