Directly use Option<&[T]> instead of converting from Option<&Vec<T>> later on

This commit is contained in:
LingMan 2021-02-01 18:16:07 +01:00
parent e0d9f79399
commit b35d601ab7

View File

@ -2422,7 +2422,7 @@ fn resolve_elided_lifetimes(&mut self, lifetime_refs: Vec<&'tcx hir::Lifetime>)
_ => break,
}
}
break Some(e);
break Some(&e[..]);
}
Elide::Forbid => break None,
};
@ -2452,7 +2452,7 @@ fn resolve_elided_lifetimes(&mut self, lifetime_refs: Vec<&'tcx hir::Lifetime>)
lifetime_refs.len(),
&lifetime_names,
lifetime_spans,
error.map(|p| &p[..]).unwrap_or(&[]),
error.unwrap_or(&[]),
);
err.emit();
}