aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-10-29 18:20:36 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-10-29 18:20:36 +0000
commita0e5ba15984af378f8dc44ef3d59a2eb6cba96d9 (patch)
treea4cc72b6549946f213f519a74047c500a6da8d10 /tests
parent01d450bf111715e8ad26bb0e3cec6b2dcbb88ce1 (diff)
parentb0dbc7637be15ee10fab9306685e0d71cf20a76c (diff)
downloadproc-macro-hack-a0e5ba15984af378f8dc44ef3d59a2eb6cba96d9.tar.gz
Upgrade rust/crates/proc-macro-hack to 0.5.19 am: b0dbc7637b
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/proc-macro-hack/+/1478509 Change-Id: I03147a5b09cba8ee8af9ebfa8f9688201cbb3c70
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/unexpected-arg.rs8
-rw-r--r--tests/ui/unexpected-arg.stderr5
-rw-r--r--tests/ui/unknown-arg.stderr2
3 files changed, 14 insertions, 1 deletions
diff --git a/tests/ui/unexpected-arg.rs b/tests/ui/unexpected-arg.rs
new file mode 100644
index 0000000..376fc0d
--- /dev/null
+++ b/tests/ui/unexpected-arg.rs
@@ -0,0 +1,8 @@
+use proc_macro_hack::proc_macro_hack;
+
+#[proc_macro_hack(fake_call_site)]
+pub fn my_macro(input: TokenStream) -> TokenStream {
+ unimplemented!()
+}
+
+fn main() {}
diff --git a/tests/ui/unexpected-arg.stderr b/tests/ui/unexpected-arg.stderr
new file mode 100644
index 0000000..6895e82
--- /dev/null
+++ b/tests/ui/unexpected-arg.stderr
@@ -0,0 +1,5 @@
+error: unexpected argument to proc_macro_hack macro implementation; args are only accepted on the macro declaration (the `pub use`)
+ --> $DIR/unexpected-arg.rs:3:19
+ |
+3 | #[proc_macro_hack(fake_call_site)]
+ | ^^^^^^^^^^^^^^
diff --git a/tests/ui/unknown-arg.stderr b/tests/ui/unknown-arg.stderr
index d3cd8c9..ffe3705 100644
--- a/tests/ui/unknown-arg.stderr
+++ b/tests/ui/unknown-arg.stderr
@@ -1,4 +1,4 @@
-error: expected one of: `support_nested`, `internal_macro_calls`, `fake_call_site`
+error: expected one of: `support_nested`, `internal_macro_calls`, `fake_call_site`, `only_hack_old_rustc`
--> $DIR/unknown-arg.rs:3:35
|
3 | #[proc_macro_hack(fake_call_site, support_nexted)]