Skip to content

Commit

Permalink
Auto merge of #1682 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
rustup; test swap of element with itself

Cc rust-lang/rust#80682
  • Loading branch information
bors committed Jan 22, 2021
2 parents 903bfd8 + 3990deb commit 6fdda8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0677d9729318441a1cdb0c74812ec4140fa4d35f
dc1eee2f256efbd1d3b50b6b090232f81cac6d72
6 changes: 6 additions & 0 deletions tests/run-pass/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ fn sort() {
v.sort();
}

fn swap() {
let mut v = vec![1, 2, 3, 4];
v.swap(2, 2);
}

fn main() {
assert_eq!(vec_reallocate().len(), 5);

Expand All @@ -161,4 +166,5 @@ fn main() {
push_str_ptr_stable();

sort();
swap();
}

0 comments on commit 6fdda8a

Please sign in to comment.