diff options
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/project.rs | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index d0f20022bfb..fd0732f51d5 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -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() } } } diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index 641b915f373..17e0fae9853 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -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 { |
