Replace &Vec<_>s with &[_]s
This commit is contained in:
@@ -146,11 +146,13 @@ impl<'tcx, 'a> GeneratorData<'tcx, 'a> {
|
||||
/// that are live across the yield of this generator
|
||||
fn get_generator_interior_types(
|
||||
&self,
|
||||
) -> ty::Binder<'tcx, &Vec<GeneratorInteriorTypeCause<'tcx>>> {
|
||||
) -> ty::Binder<'tcx, &[GeneratorInteriorTypeCause<'tcx>]> {
|
||||
match self {
|
||||
GeneratorData::Local(typeck_result) => typeck_result.generator_interior_types.as_ref(),
|
||||
GeneratorData::Local(typeck_result) => {
|
||||
typeck_result.generator_interior_types.as_deref()
|
||||
}
|
||||
GeneratorData::Foreign(generator_diagnostic_data) => {
|
||||
generator_diagnostic_data.generator_interior_types.as_ref()
|
||||
generator_diagnostic_data.generator_interior_types.as_deref()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -773,7 +773,7 @@ pub struct PlaceholderReplacer<'me, 'tcx> {
|
||||
mapped_regions: BTreeMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_types: BTreeMap<ty::PlaceholderType, ty::BoundTy>,
|
||||
mapped_consts: BTreeMap<ty::PlaceholderConst<'tcx>, ty::BoundVar>,
|
||||
universe_indices: &'me Vec<Option<ty::UniverseIndex>>,
|
||||
universe_indices: &'me [Option<ty::UniverseIndex>],
|
||||
current_index: ty::DebruijnIndex,
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ impl<'me, 'tcx> PlaceholderReplacer<'me, 'tcx> {
|
||||
mapped_regions: BTreeMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_types: BTreeMap<ty::PlaceholderType, ty::BoundTy>,
|
||||
mapped_consts: BTreeMap<ty::PlaceholderConst<'tcx>, ty::BoundVar>,
|
||||
universe_indices: &'me Vec<Option<ty::UniverseIndex>>,
|
||||
universe_indices: &'me [Option<ty::UniverseIndex>],
|
||||
value: T,
|
||||
) -> T {
|
||||
let mut replacer = PlaceholderReplacer {
|
||||
|
||||
Reference in New Issue
Block a user