diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-01 12:38:31 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-01 12:38:31 -0600 |
commit | bd5e4b708d96ea5891a899f1891e22e5a6132acd (patch) | |
tree | 27ecb6348b65d9238119e8d55d23becf24763337 /README.md | |
parent | c41a84d0c71d3590660a4da05fbfa6b3f9e396b9 (diff) | |
download | bird-machine-bd5e4b708d96ea5891a899f1891e22e5a6132acd.tar.gz bird-machine-bd5e4b708d96ea5891a899f1891e22e5a6132acd.zip |
headers, how do they work
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -33,7 +33,7 @@ for (actual, expected) in match_info.zip(expected) { } ``` -# Example: replacement with named capture groups +## Example: replacement with named capture groups ```rust use bird_machine::{bird_machine, Machine}; @@ -49,11 +49,13 @@ let after = Date::replace_all(before, "$m/$d/$y"); assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014"); ``` -# Example: compile-time rejection of invalid regular expressions +## Example: compile-time rejection of invalid regular expressions -```rust,compile_fail +```rust use bird_machine::bird_machine; +// this will not compile #[bird_machine(r"(oops i left this group open")] struct Bad; -```
\ No newline at end of file +``` + |