diff options
| author | Markus Westerlind <markus.westerlind@imperva.com> | 2020-01-09 07:45:29 +0100 |
|---|---|---|
| committer | Markus Westerlind <markus.westerlind@imperva.com> | 2020-01-09 07:45:29 +0100 |
| commit | 898ed636a3f44e3aa0156c1bb5ebc86b08aef5fa (patch) | |
| tree | 11df9edf642d401daf1f39e350fa3a76d1aee6da /src | |
| parent | a5657dbc43d84133bd95e5de178d68634973b1b3 (diff) | |
| download | rust-898ed636a3f44e3aa0156c1bb5ebc86b08aef5fa.tar.gz rust-898ed636a3f44e3aa0156c1bb5ebc86b08aef5fa.zip | |
Fix copy_from_slice which should be extend_from_slice
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/ty/structural_impls.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ 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) |
