Skip to content

Commit

Permalink
Fix copy_from_slice which should be extend_from_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Jan 9, 2020
1 parent a5657db commit 898ed63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/ty/structural_impls.rs
Expand Up @@ -1078,7 +1078,7 @@ where
}) {
// 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)
Expand Down

0 comments on commit 898ed63

Please sign in to comment.