diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-07-15 11:52:11 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@commure.com> | 2018-07-19 23:18:07 -0700 |
| commit | fbce952193d38328c39262cf2fb7f7bfbe088a70 (patch) | |
| tree | d4dbd97694e5310b68149c2d653ece3664fa9edf /src/libsyntax_ext | |
| parent | f53c145ef18db6543e8e5420e172e04b6054db2e (diff) | |
| download | rust-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.rs | 2 |
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); |
