mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
12 lines
222 B
Rust
12 lines
222 B
Rust
|
#![feature(plugin)]
|
||
|
#![plugin(clippy, regex_macros)]
|
||
|
|
||
|
extern crate regex;
|
||
|
|
||
|
#[test]
|
||
|
#[deny(mut_mut)]
|
||
|
fn test_regex() {
|
||
|
let pattern = regex!(r"^(?P<level>[#]+)\s(?P<title>.+)$");
|
||
|
assert!(pattern.is_match("# headline"));
|
||
|
}
|