about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-07-15 11:52:11 -0700
committerEsteban Küber <esteban@commure.com>2018-07-19 23:18:07 -0700
commitfbce952193d38328c39262cf2fb7f7bfbe088a70 (patch)
treed4dbd97694e5310b68149c2d653ece3664fa9edf /src/libsyntax_ext
parentf53c145ef18db6543e8e5420e172e04b6054db2e (diff)
downloadrust-fbce952193d38328c39262cf2fb7f7bfbe088a70.tar.gz
rust-fbce952193d38328c39262cf2fb7f7bfbe088a70.zip
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.
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/concat.rs2
1 files changed, 1 insertions, 1 deletions
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);