summaryrefslogtreecommitdiffstats
path: root/tests/ui/cfg/cfg-method-receiver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/cfg/cfg-method-receiver.rs')
-rw-r--r--tests/ui/cfg/cfg-method-receiver.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/cfg/cfg-method-receiver.rs b/tests/ui/cfg/cfg-method-receiver.rs
new file mode 100644
index 000000000..71134ff17
--- /dev/null
+++ b/tests/ui/cfg/cfg-method-receiver.rs
@@ -0,0 +1,11 @@
+macro_rules! cbor_map {
+ ($key:expr) => {
+ $key.signum();
+ //~^ ERROR can't call method `signum` on ambiguous numeric type `{integer}` [E0689]
+ };
+}
+
+fn main() {
+ cbor_map! { #[cfg(test)] 4};
+ //~^ ERROR removing an expression is not supported in this position
+}