We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
defmac
1 parent 12dcc28 commit 3e070faCopy full SHA for 3e070fa
tests/defmac.rs
@@ -0,0 +1,9 @@
1
+use defmac::defmac; // 2018 edition style
2
+
3
+#[test]
4
+fn incr() {
5
+ let mut acc = 0;
6
+ defmac!(incr => acc += 1);
7
+ incr!();
8
+ assert_eq!(acc, 1);
9
+}
0 commit comments