Fix wrong life time for all_ranges
This commit is contained in:
parent
38251dccb0
commit
8380dd31da
1 changed files with 1 additions and 1 deletions
|
@ -414,7 +414,7 @@ fn check_match_ref_pats(cx: &LateContext, ex: &Expr, arms: &[Arm], source: Match
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get all arms that are unbounded `PatRange`s.
|
/// Get all arms that are unbounded `PatRange`s.
|
||||||
fn all_ranges<'a>(cx: &'a LateContext, arms: &'a [Arm]) -> Vec<SpannedRange<ConstVal<'a>>> {
|
fn all_ranges<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, arms: &[Arm]) -> Vec<SpannedRange<ConstVal<'tcx>>> {
|
||||||
let constcx = ConstContext::with_tables(cx.tcx, cx.tables);
|
let constcx = ConstContext::with_tables(cx.tcx, cx.tables);
|
||||||
arms.iter()
|
arms.iter()
|
||||||
.flat_map(|arm| {
|
.flat_map(|arm| {
|
||||||
|
|
Loading…
Add table
Reference in a new issue