Use more slicing and slice interning over iterable interning

This commit is contained in:
León Orell Valerian Liehr
2025-06-13 01:14:41 +02:00
parent a58fdd18a2
commit 3a31f62421
2 changed files with 2 additions and 3 deletions

View File

@@ -588,7 +588,7 @@ impl<'tcx> GenericArgs<'tcx> {
}
pub fn truncate_to(&self, tcx: TyCtxt<'tcx>, generics: &ty::Generics) -> GenericArgsRef<'tcx> {
tcx.mk_args_from_iter(self.iter().take(generics.count()))
tcx.mk_args(&self[..generics.count()])
}
pub fn print_as_list(&self) -> String {