Skip to content

Commit

Permalink
clearer doc with compile_fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed Jan 3, 2023
1 parent 4013e4c commit eda81b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
categories = ["text-processing"]
repository = "https://github.com/Canop/lazy-regex"
readme = "README.md"
rust-version = "1.56"
rust-version = "1.65"

[dependencies]
once_cell = "1.7"
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ let r = regex!(r#"(?x)
assert_eq!(r.find("This is lazy_regex-2.2!").unwrap().as_str(), "lazy_regex-2.2");
// (look at the regex_captures! macro to easily extract the groups)
// this line wouldn't compile because the regex is invalid:
// let r = regex!("(unclosed");
```
```compile_fail
// this line doesn't compile because the regex is invalid:
let r = regex!("(unclosed");
```
Supported regex flags: `i`, `m`, `s`, `x`, `U`.
Expand Down

0 comments on commit eda81b8

Please sign in to comment.