rust-clippy/tests/run-pass-regex_macros/mut_mut_macro.rs

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"));
}