From cd54b3e4483a331326a7508de6c24c90664ae392 Mon Sep 17 00:00:00 2001 From: Michael Lamparski Date: Wed, 2 May 2018 20:51:39 -0400 Subject: forbid empty identifiers from concat_idents --- src/test/ui/issue-50403.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/issue-50403.rs (limited to 'src/test') diff --git a/src/test/ui/issue-50403.rs b/src/test/ui/issue-50403.rs new file mode 100644 index 00000000000..8d4c6c5140f --- /dev/null +++ b/src/test/ui/issue-50403.rs @@ -0,0 +1,15 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(concat_idents)] + +fn main() { + let x = concat_idents!(); //~ ERROR concat_idents! takes 1 or more arguments +} -- cgit 1.4.1-3-g733a5 From fbc57a7c7a9c01db5881aa77148bbe5fd7a066fd Mon Sep 17 00:00:00 2001 From: Michael Lamparski Date: Thu, 3 May 2018 00:25:14 -0400 Subject: add missing output for ui test --- src/test/ui/issue-50403.stderr | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/test/ui/issue-50403.stderr (limited to 'src/test') diff --git a/src/test/ui/issue-50403.stderr b/src/test/ui/issue-50403.stderr new file mode 100644 index 00000000000..f2871c72e25 --- /dev/null +++ b/src/test/ui/issue-50403.stderr @@ -0,0 +1,8 @@ +error: concat_idents! takes 1 or more arguments. + --> $DIR/issue-50403.rs:14:13 + | +LL | let x = concat_idents!(); //~ ERROR concat_idents! takes 1 or more arguments + | ^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + -- cgit 1.4.1-3-g733a5