Highlight a few remaining unhighlighted readme code blocks

This commit is contained in:
David Tolnay 2021-04-10 10:50:27 -07:00
parent c80b47159a
commit dedbdd156b
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -150,7 +150,7 @@ By tracking span information all the way through the expansion of a procedural
macro as shown in the `heapsize` example, token-based macros in Syn are able to
trigger errors that directly pinpoint the source of the problem.
```
```console
error[E0277]: the trait bound `std::thread::Thread: HeapSize` is not satisfied
--> src/main.rs:7:5
|
@ -171,7 +171,7 @@ Syn's parsing API.
The example reimplements the popular `lazy_static` crate from crates.io as a
procedural macro.
```
```rust
lazy_static! {
static ref USERNAME: Regex = Regex::new("^[a-z0-9_-]{3,16}$").unwrap();
}
@ -180,7 +180,7 @@ lazy_static! {
The implementation shows how to trigger custom warnings and error messages on
the macro input.
```
```console
warning: come on, pick a more creative name
--> src/main.rs:10:16
|