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
1 changed files with 2 additions and 2 deletions

View File

@ -2422,7 +2422,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
_ => break,
}
}
break Some(e);
break Some(&e[..]);
}
Elide::Forbid => break None,
};
@ -2452,7 +2452,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
lifetime_refs.len(),
&lifetime_names,
lifetime_spans,
error.map(|p| &p[..]).unwrap_or(&[]),
error.unwrap_or(&[]),
);
err.emit();
}