From cd067503a7546eaee904a9b5c6ae30eb0175d376 Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Mon, 8 Nov 2021 18:06:56 +0000 Subject: [rust] Macros --- rust/macros/tests/invalid/leading-comma.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 rust/macros/tests/invalid/leading-comma.rs (limited to 'rust/macros/tests/invalid/leading-comma.rs') diff --git a/rust/macros/tests/invalid/leading-comma.rs b/rust/macros/tests/invalid/leading-comma.rs new file mode 100644 index 0000000..bc03666 --- /dev/null +++ b/rust/macros/tests/invalid/leading-comma.rs @@ -0,0 +1,7 @@ +use macros::hashmap; +use std::collections::HashMap; + +fn main() { + // leading commas are not valid + let _hm: HashMap<_, _> = hashmap!(, 'a' => 2); +} -- cgit v1.2.3