Fix for rustc 1.17.0-nightly (be760566c
2017-02-28)
This commit is contained in:
parent
a39b5f95b8
commit
f66e0aad84
22 changed files with 47 additions and 65 deletions
|
@ -2,7 +2,6 @@ use regex_syntax;
|
|||
use rustc::hir::*;
|
||||
use rustc::lint::*;
|
||||
use rustc::middle::const_val::ConstVal;
|
||||
use rustc_const_eval::EvalHint::ExprTypeChecked;
|
||||
use rustc_const_eval::ConstContext;
|
||||
use std::collections::HashSet;
|
||||
use std::error::Error;
|
||||
|
@ -151,7 +150,7 @@ fn str_span(base: Span, s: &str, c: usize) -> Span {
|
|||
}
|
||||
|
||||
fn const_str(cx: &LateContext, e: &Expr) -> Option<InternedString> {
|
||||
match ConstContext::with_tables(cx.tcx, cx.tables).eval(e, ExprTypeChecked) {
|
||||
match ConstContext::with_tables(cx.tcx, cx.tables).eval(e) {
|
||||
Ok(ConstVal::Str(r)) => Some(r),
|
||||
_ => None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue