mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
12 lines
249 B
Rust
12 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"));
|
|
}
|