From fbce952193d38328c39262cf2fb7f7bfbe088a70 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Sun, 15 Jul 2018 11:52:11 -0700 Subject: review comments: modify note wording and change `println` - 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. --- src/libsyntax_ext/concat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax_ext') diff --git a/src/libsyntax_ext/concat.rs b/src/libsyntax_ext/concat.rs index d58f4ce17e2..99dba8af754 100644 --- a/src/libsyntax_ext/concat.rs +++ b/src/libsyntax_ext/concat.rs @@ -58,7 +58,7 @@ pub fn expand_syntax_ext( } if missing_literal.len() > 0 { let mut err = cx.struct_span_err(missing_literal, "expected a literal"); - err.note("only `&str` literals can be passed to `concat!()`"); + err.note("only literals (like `\"foo\"`, `42` and `3.14`) can be passed to `concat!()`"); err.emit(); } let sp = sp.apply_mark(cx.current_expansion.mark); -- cgit 1.4.1-3-g733a5