We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
defmac
1 parent 741f6c9 commit c9cf3edCopy full SHA for c9cf3ed
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