Skip to content

Commit

Permalink
Directly use Option<&[T]> instead of converting from `Option<&Vec<T…
Browse files Browse the repository at this point in the history
…>>` later on
  • Loading branch information
LingMan committed Feb 1, 2021
1 parent e0d9f79 commit b35d601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/late/lifetimes.rs
Expand Up @@ -2422,7 +2422,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
_ => break,
}
}
break Some(e);
break Some(&e[..]);
}
Elide::Forbid => break None,
};
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit b35d601

Please sign in to comment.