Skip to content

Commit eda81b8

Browse files
committed
clearer doc with compile_fail
1 parent 4013e4c commit eda81b8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT"
99
categories = ["text-processing"]
1010
repository = "https://github.com/Canop/lazy-regex"
1111
readme = "README.md"
12-
rust-version = "1.56"
12+
rust-version = "1.65"
1313

1414
[dependencies]
1515
once_cell = "1.7"

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ let r = regex!(r#"(?x)
5858
assert_eq!(r.find("This is lazy_regex-2.2!").unwrap().as_str(), "lazy_regex-2.2");
5959
// (look at the regex_captures! macro to easily extract the groups)
6060
61-
// this line wouldn't compile because the regex is invalid:
62-
// let r = regex!("(unclosed");
61+
```
62+
```compile_fail
63+
// this line doesn't compile because the regex is invalid:
64+
let r = regex!("(unclosed");
6365
6466
```
6567
Supported regex flags: `i`, `m`, `s`, `x`, `U`.

0 commit comments

Comments
 (0)