mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
Rollup merge of #81636 - LingMan:slice_not_vec, r=petrochenkov
Directly use `Option<&[T]>` instead of converting from `Option<&Vec<T>>` later on ```@rustbot``` modify labels +C-cleanup +T-compiler
This commit is contained in:
commit
86e23cc9f1
@ -2415,7 +2415,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||
_ => break,
|
||||
}
|
||||
}
|
||||
break Some(e);
|
||||
break Some(&e[..]);
|
||||
}
|
||||
Elide::Forbid => break None,
|
||||
};
|
||||
@ -2445,7 +2445,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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user