Skip to content

Commit 86e23cc

Browse files
authored
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
2 parents fd4f4ad + b35d601 commit 86e23cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: compiler/rustc_resolve/src/late/lifetimes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
24152415
_ => break,
24162416
}
24172417
}
2418-
break Some(e);
2418+
break Some(&e[..]);
24192419
}
24202420
Elide::Forbid => break None,
24212421
};
@@ -2445,7 +2445,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
24452445
lifetime_refs.len(),
24462446
&lifetime_names,
24472447
lifetime_spans,
2448-
error.map(|p| &p[..]).unwrap_or(&[]),
2448+
error.unwrap_or(&[]),
24492449
);
24502450
err.emit();
24512451
}

0 commit comments

Comments
 (0)