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