diff options
| author | bors <bors@rust-lang.org> | 2018-05-03 20:45:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-03 20:45:54 +0000 |
| commit | e82261dfbb5feaa2d28d2b138f4aabb2aa52c94b (patch) | |
| tree | 3bade0f4dfbda64eac4eed19227ac3f46acdf373 /src/libsyntax_ext | |
| parent | d68b0eceaaf719a4702ab13a7ca62dea5d966082 (diff) | |
| parent | 03a0402dbf3143ab6a8b7166f4d1f74aa68f71df (diff) | |
| download | rust-e82261dfbb5feaa2d28d2b138f4aabb2aa52c94b.tar.gz rust-e82261dfbb5feaa2d28d2b138f4aabb2aa52c94b.zip | |
Auto merge of #50413 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests Successful merges: - #50302 (Add query search order check) - #50320 (Fix invalid path generation in rustdoc search) - #50349 (Rename "show type declaration" to "show declaration") - #50360 (Clarify wordings of the `unstable_name_collision` lint.) - #50365 (Use two vectors in nearest_common_ancestor.) - #50393 (Allow unaligned reads in constants) - #50401 (Revert "Implement FromStr for PathBuf") - #50406 (Forbid constructing empty identifiers from concat_idents) - #50407 (Always inline simple BytePos and CharPos methods.) - #50416 (check if the token is a lifetime before parsing) - #50417 (Update Cargo) - #50421 (Fix ICE when using a..=b in a closure.) Failed merges:
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/concat_idents.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax_ext/concat_idents.rs b/src/libsyntax_ext/concat_idents.rs index 544b1410d3d..b8345e7cf40 100644 --- a/src/libsyntax_ext/concat_idents.rs +++ b/src/libsyntax_ext/concat_idents.rs @@ -31,6 +31,11 @@ pub fn expand_syntax_ext<'cx>(cx: &'cx mut ExtCtxt, return base::DummyResult::expr(sp); } + if tts.is_empty() { + cx.span_err(sp, "concat_idents! takes 1 or more arguments."); + return DummyResult::expr(sp); + } + let mut res_str = String::new(); for (i, e) in tts.iter().enumerate() { if i & 1 == 1 { |
