Fix ICE for issue 2594
This commit is contained in:
parent
21e783d3b6
commit
6eb07cc5b6
17 changed files with 42 additions and 35 deletions
|
@ -138,7 +138,7 @@ fn str_span(base: Span, c: regex_syntax::ast::Span, offset: u16) -> Span {
|
|||
}
|
||||
|
||||
fn const_str<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) -> Option<String> {
|
||||
constant(cx, e).and_then(|(c, _)| match c {
|
||||
constant(cx, cx.tables, e).and_then(|(c, _)| match c {
|
||||
Constant::Str(s) => Some(s),
|
||||
_ => None,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue