1
Fork 0

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