File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -442,7 +442,7 @@ The final action that works only with `unsafe` is accessing fields of a
442
442
used in a particular instance at one time . Unions are primarily used to
443
443
interface with unions in C code . Accessing union fields is unsafe because Rust
444
444
can ’t guarantee the type of the data currently being stored in the union
445
- instance . You can learn more about unions in [the reference ][reference ].
445
+ instance . You can learn more about unions in [the Rust Reference ][reference ].
446
446
447
447
### When to Use Unsafe Code
448
448
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ pub fn some_name(input: TokenStream) -> TokenStream {
182
182
}
183
183
```
184
184
185
- <span class =" caption " >Listing 19-29: An example of using a procedural
185
+ <span class =" caption " >Listing 19-29: An example of defining a procedural
186
186
macro</span >
187
187
188
188
The function that defines a procedural macro takes a ` TokenStream ` as an input
@@ -484,11 +484,11 @@ Function-like macros define macros that look like function calls. Similarly to
484
484
` macro_rules! ` macros, they’re more flexible than functions; for example, they
485
485
can take an unknown number of arguments. However, ` macro_rules! ` macros can be
486
486
defined only using the match-like syntax we discussed in the section
487
- [ “Declarative Macros with ` macro_rules! ` for General Metaprogramming” ] [ decl ]
488
- earlier. Function-like macros take a ` TokenStream ` parameter and their
489
- definition manipulates that ` TokenStream ` using Rust code as the other two
490
- types of procedural macros do. An example of a function-like macro is an ` sql! `
491
- macro that might be called like so:
487
+ [ “Declarative Macros with ` macro_rules! ` for General
488
+ Metaprogramming” ] [ decl ] <!-- ignore --> earlier. Function-like macros take a
489
+ ` TokenStream ` parameter and their definition manipulates that ` TokenStream `
490
+ using Rust code as the other two types of procedural macros do. An example of a
491
+ function-like macro is an ` sql! ` macro that might be called like so:
492
492
493
493
[ decl ] : #declarative-macros-with-macro_rules-for-general-metaprogramming
494
494
You can’t perform that action at this time.
0 commit comments