From 898ed636a3f44e3aa0156c1bb5ebc86b08aef5fa Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Thu, 9 Jan 2020 07:45:29 +0100 Subject: [PATCH] Fix copy_from_slice which should be extend_from_slice --- src/librustc/ty/structural_impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index 385c8eeb4b8..783164d2806 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -1078,7 +1078,7 @@ fn fold_list<'tcx, F, T>( }) { // An element changed, prepare to intern the resulting list let mut new_list = SmallVec::<[_; 8]>::with_capacity(list.len()); - new_list.copy_from_slice(&list[..i]); + new_list.extend_from_slice(&list[..i]); new_list.push(new_t); new_list.extend(iter.map(|t| t.fold_with(folder))); intern(folder.tcx(), &new_list) -- 2.44.0