From: Markus Westerlind Date: Thu, 9 Jan 2020 06:45:29 +0000 (+0100) Subject: Fix copy_from_slice which should be extend_from_slice X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=898ed636a3f44e3aa0156c1bb5ebc86b08aef5fa;p=rust.git Fix copy_from_slice which should be extend_from_slice --- 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)