about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-12-28 10:28:16 +0000
committerbors <bors@rust-lang.org>2017-12-28 10:28:16 +0000
commitb24d12e622052da1fc262a682e02e19af215e0b8 (patch)
tree4ae004da5ff6793433f30413a1f01845a44decd1 /src/test/compile-fail
parent5f7aeaf6e2b90e247a2d194d7bc0b642b287fc16 (diff)
parentd1b287cf3274bf26f9bcb30dbad3cb31d8e1cded (diff)
downloadrust-b24d12e622052da1fc262a682e02e19af215e0b8.tar.gz
rust-b24d12e622052da1fc262a682e02e19af215e0b8.zip
Auto merge of #47031 - topecongiro:issue-41719, r=jseyfried
Report an error when resolving non-ident macro path failed

Closes #41719.

Please feel free to bikeshed on the error message.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/extern-macro.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/compile-fail/extern-macro.rs b/src/test/compile-fail/extern-macro.rs
new file mode 100644
index 00000000000..4267103ab9a
--- /dev/null
+++ b/src/test/compile-fail/extern-macro.rs
@@ -0,0 +1,18 @@
+// Copyright 2017 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// #41719
+
+#![feature(use_extern_macros)]
+
+fn main() {
+    enum Foo {}
+    let _ = Foo::bar!(); //~ ERROR fail to resolve non-ident macro path
+}