mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
13 lines
249 B
Rust
13 lines
249 B
Rust
|
#![feature(plugin)]
|
||
|
#![plugin(clippy, regex_macros)]
|
||
|
|
||
|
#[macro_use]
|
||
|
extern crate regex;
|
||
|
|
||
|
#[deny(mut_mut)]
|
||
|
#[allow(regex_macro)]
|
||
|
fn main() {
|
||
|
let pattern = regex!(r"^(?P<level>[#]+)\s(?P<title>.+)$");
|
||
|
assert!(pattern.is_match("# headline"));
|
||
|
}
|