1
Fork 0

Rustup to *rustc 1.15.0-nightly (7b3eeea22 2016-11-21)*

This commit is contained in:
mcarton 2016-11-23 21:19:03 +01:00
parent 530083c3b9
commit c35f82b823
No known key found for this signature in database
GPG key ID: 5E427C794CBA45E8
28 changed files with 111 additions and 105 deletions

View file

@ -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) {