Skip to content

Commit

Permalink
Fix invalid link to the counting section
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Sep 22, 2020
1 parent aa10a25 commit 3cfc19f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/macros-practical.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ fn main() {
Let's tackle a harder one: how to turn `inits` into both the array literal `[0, 1]` *and* the array
type, `[$sty; 2]`. The first one we can do like so:

```ignore
```rust,ignore
Recurrence { mem: [$($inits),+], pos: 0 }
// ^~~~~~~~~~~ changed
```
Expand Down Expand Up @@ -803,7 +803,7 @@ macro_rules! count_exprs {
```

> **<abbr title="Just for this example">JFTE</abbr>**: this is not the *only*, or even the *best*
way of counting things. You may wish to peruse the [Counting](.blocks/counting.html) section
way of counting things. You may wish to peruse the [Counting](./blocks/counting.html) section
later.

With this, we can now modify `recurrence` to determine the necessary size of `mem`.
Expand Down
3 changes: 3 additions & 0 deletions src/macros/minutiae/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ But not just `rustc` exposes means to aid in debugging macros. For the aforement
[`cargo-expand`](https://github.com/dtolnay/cargo-expand) made by [`dtolnay`](https://github.com/dtolnay)
which is basically just a wrapper around it.

You can also use the [playground](https://play.rust-lang.org/), clicking on its `TOOLS` button in
the top right gives you the option to expand macros right there!

Another amazing tool is [`lukaslueg`'s](https://github.com/lukaslueg)
[`macro_railroad`](https://github.com/lukaslueg/macro_railroad), a tool that allows you visualize
and generate syntax diagrams for Rust's `macro-by-example` style macros. It visualizes the accepted
Expand Down

0 comments on commit 3cfc19f

Please sign in to comment.