diff options
author | Akshay <[email protected]> | 2020-05-10 15:34:46 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-05-10 15:34:46 +0100 |
commit | bc27a5c7b1bd4138076c3c1e7c19dc69cc097443 (patch) | |
tree | 78b0cd62b891c43ce1dd62c28fe82d3fc475e550 /docs/index.xml | |
parent | 40cefb2ff08d0e872408c8218b5d4d22d2c5ba11 (diff) |
fix erronous macro examples
Diffstat (limited to 'docs/index.xml')
-rw-r--r-- | docs/index.xml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/index.xml b/docs/index.xml index dce3d00..07120bc 100644 --- a/docs/index.xml +++ b/docs/index.xml | |||
@@ -60,9 +60,11 @@ h(x)(y)(z) = g(y)(z) = k(z) = v</code></pre> | |||
60 | <h3 id="procedural-macros">Procedural Macros</h3> | 60 | <h3 id="procedural-macros">Procedural Macros</h3> |
61 | <p>These are functions that take code as input and spit out modified code as output. Powerful stuff. Rust has three kinds of proc-macros:</p> | 61 | <p>These are functions that take code as input and spit out modified code as output. Powerful stuff. Rust has three kinds of proc-macros:</p> |
62 | <ul> | 62 | <ul> |
63 | <li>Function like macros: <code>println!</code>, <code>vec!</code>.</li> | 63 | <li>Function like macros<br /> |
64 | <li>Derive macros: <code>#[derive(...)]</code>, used to automatically implement traits for structs/enums.</li> | 64 | </li> |
65 | <li>and Attribute macros: <code>#[test]</code>, usually slapped onto functions.</li> | 65 | <li>Derive macros: <code>#[derive(...)]</code>, used to automatically implement traits for structs/enums<br /> |
66 | </li> | ||
67 | <li>and Attribute macros: <code>#[test]</code>, usually slapped onto functions</li> | ||
66 | </ul> | 68 | </ul> |
67 | <p>We will be using Attribute macros to convert a Rust function into a curried Rust function, which we should be able to call via: <code>function(arg1)(arg2)</code>.</p> | 69 | <p>We will be using Attribute macros to convert a Rust function into a curried Rust function, which we should be able to call via: <code>function(arg1)(arg2)</code>.</p> |
68 | <h3 id="definitions">Definitions</h3> | 70 | <h3 id="definitions">Definitions</h3> |