Skip to content

Commit

Permalink
Fix some links and small wordings
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Mar 5, 2022
1 parent 704f045 commit 036e88a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ch19-01-unsafe-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ The final action that works only with `unsafe` is accessing fields of a
used in a particular instance at one time. Unions are primarily used to
interface with unions in C code. Accessing union fields is unsafe because Rust
cant guarantee the type of the data currently being stored in the union
instance. You can learn more about unions in [the reference][reference].
instance. You can learn more about unions in [the Rust Reference][reference].
### When to Use Unsafe Code
Expand Down
12 changes: 6 additions & 6 deletions src/ch19-06-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pub fn some_name(input: TokenStream) -> TokenStream {
}
```

<span class="caption">Listing 19-29: An example of using a procedural
<span class="caption">Listing 19-29: An example of defining a procedural
macro</span>

The function that defines a procedural macro takes a `TokenStream` as an input
Expand Down Expand Up @@ -484,11 +484,11 @@ Function-like macros define macros that look like function calls. Similarly to
`macro_rules!` macros, they’re more flexible than functions; for example, they
can take an unknown number of arguments. However, `macro_rules!` macros can be
defined only using the match-like syntax we discussed in the section
[“Declarative Macros with `macro_rules!` for General Metaprogramming”][decl]
earlier. Function-like macros take a `TokenStream` parameter and their
definition manipulates that `TokenStream` using Rust code as the other two
types of procedural macros do. An example of a function-like macro is an `sql!`
macro that might be called like so:
[“Declarative Macros with `macro_rules!` for General
Metaprogramming”][decl]<!-- ignore --> earlier. Function-like macros take a
`TokenStream` parameter and their definition manipulates that `TokenStream`
using Rust code as the other two types of procedural macros do. An example of a
function-like macro is an `sql!` macro that might be called like so:

[decl]: #declarative-macros-with-macro_rules-for-general-metaprogramming

Expand Down

0 comments on commit 036e88a

Please sign in to comment.