1
Fork 0

Replace &Vec<_>s with &[_]s

This commit is contained in:
Maybe Waffle 2022-06-03 20:42:42 +04:00
parent e40d5e83dc
commit afaa9854fa
14 changed files with 53 additions and 45 deletions

View file

@ -2448,7 +2448,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
&self,
span: Span,
base_t: Ty<'tcx>,
) -> Option<(&Vec<ty::FieldDef>, SubstsRef<'tcx>)> {
) -> Option<(&[ty::FieldDef], SubstsRef<'tcx>)> {
debug!("get_field_candidates(span: {:?}, base_t: {:?}", span, base_t);
for (base_t, _) in self.autoderef(span, base_t) {

View file

@ -2039,7 +2039,7 @@ fn should_do_rust_2021_incompatible_closure_captures_analysis(
/// - s2: Comma separated names of the variables being migrated.
fn migration_suggestion_for_2229(
tcx: TyCtxt<'_>,
need_migrations: &Vec<NeededMigration>,
need_migrations: &[NeededMigration],
) -> (String, String) {
let need_migrations_variables = need_migrations
.iter()