about summary refs log tree commit diff
path: root/src/test/parse-fail
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-04-05 10:49:14 -0500
committerGitHub <noreply@github.com>2018-04-05 10:49:14 -0500
commit46492ffabd7194bb134035cadcd66d47f1b97db8 (patch)
treef361c33cc5f7794ae707b5ed1d60fff877000575 /src/test/parse-fail
parentb0bd9a771e81740da7e4a7a2f5a6dfecce10c699 (diff)
parent5d74990cebb82b9573ea6a9d509bb8e05fd6681e (diff)
downloadrust-46492ffabd7194bb134035cadcd66d47f1b97db8.tar.gz
rust-46492ffabd7194bb134035cadcd66d47f1b97db8.zip
Rollup merge of #49350 - abonander:macros-in-extern, r=petrochenkov
Expand macros in `extern {}` blocks

This permits macro and proc-macro and attribute invocations (the latter only with the `proc_macro` feature of course) in `extern {}` blocks, gated behind a new `macros_in_extern` feature.

A tracking issue is now open at #49476

closes #48747
Diffstat (limited to 'src/test/parse-fail')
-rw-r--r--src/test/parse-fail/duplicate-visibility.rs2
-rw-r--r--src/test/parse-fail/extern-no-fn.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/parse-fail/duplicate-visibility.rs b/src/test/parse-fail/duplicate-visibility.rs
index 5ee84cd5543..6899caa7153 100644
--- a/src/test/parse-fail/duplicate-visibility.rs
+++ b/src/test/parse-fail/duplicate-visibility.rs
@@ -10,7 +10,7 @@
 
 // compile-flags: -Z parse-only
 
-// error-pattern:unmatched visibility `pub`
+// error-pattern:expected one of `(`, `fn`, `static`, `type`, or `}` here
 extern {
     pub pub fn foo();
 }
diff --git a/src/test/parse-fail/extern-no-fn.rs b/src/test/parse-fail/extern-no-fn.rs
index ff3fefde40e..aa0dbd4d4fc 100644
--- a/src/test/parse-fail/extern-no-fn.rs
+++ b/src/test/parse-fail/extern-no-fn.rs
@@ -10,8 +10,8 @@
 
 // compile-flags: -Z parse-only
 
-extern {
-    f(); //~ ERROR expected one of `!` or `::`, found `(`
+extern { //~ ERROR missing `fn`, `type`, or `static` for extern-item declaration
+    f();
 }
 
 fn main() {