Rustup to *rustc 1.15.0-nightly (7b3eeea22
2016-11-21)*
This commit is contained in:
parent
530083c3b9
commit
c35f82b823
28 changed files with 111 additions and 105 deletions
|
@ -8,7 +8,7 @@ use std::collections::HashSet;
|
|||
use std::error::Error;
|
||||
use syntax::ast::{LitKind, NodeId};
|
||||
use syntax::codemap::{Span, BytePos};
|
||||
use syntax::parse::token::InternedString;
|
||||
use syntax::symbol::InternedString;
|
||||
use utils::{is_expn_of, match_def_path, match_type, paths, span_lint, span_help_and_lint};
|
||||
|
||||
/// **What it does:** Checks [regex] creation (with `Regex::new`,
|
||||
|
@ -203,6 +203,7 @@ fn check_regex(cx: &LateContext, expr: &Expr, utf8: bool) {
|
|||
|
||||
if let ExprLit(ref lit) = expr.node {
|
||||
if let LitKind::Str(ref r, _) = lit.node {
|
||||
let r = &*r.as_str();
|
||||
match builder.parse(r) {
|
||||
Ok(r) => {
|
||||
if let Some(repl) = is_trivial_regex(&r) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue