Skip to content

Rollup of 9 pull requests #41522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a42c025
Add bootstrap support for android
malbarbo Apr 18, 2017
c49d090
Specify behavior of `write_all` for `ErrorKind::Interrupted` errors
tbu- Apr 21, 2017
2111aff
Add Vec::splice and String::splice
SimonSapin Apr 8, 2017
b85e2e4
Update splice impl
mattico Apr 8, 2017
cec00ba
Improve splice docs and tests
mattico Apr 8, 2017
c3baa8c
Use Vec::splice impl in string::Splice::drop()
mattico Apr 8, 2017
7b86ba0
Add splice to the unstable book.
mattico Apr 8, 2017
f852e3f
use the word 'length' in Vec::len's docs
steveklabnik Apr 24, 2017
feae5a0
Add Splice forget test
mattico Apr 24, 2017
009f45f
Run tests for the cargo submodule in tree
alexcrichton Apr 18, 2017
bd5e56c
Pass `--format-version 1` to `cargo metadata`.
kennytm Apr 17, 2017
3c8118d
Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin.
kennytm Apr 17, 2017
ec4c9b9
Force link with an absolute rpath when using sanitizer on macOS.
kennytm Apr 20, 2017
957d51a
Fix a copy-paste error in `Instant::sub_duration`
tbu- Apr 24, 2017
70e6739
Adds rust-windbg.cmd script
AndrewGaspar Feb 20, 2017
a765dca
Add internal accessor methods to io::{Chain, Take}.
SergioBenitez Apr 22, 2017
aab87e3
Add more_io_inner_methods feature to unstable book.
SergioBenitez Apr 22, 2017
76397ae
Reference tracking issue for more_io_inner_methods.
SergioBenitez Apr 24, 2017
c168d8b
Add cautions to io::get_mut method documentation.
SergioBenitez Apr 24, 2017
2ac3d6a
Rollup merge of #39983 - AndrewGaspar:rust-windbg, r=brson
frewsxcv Apr 25, 2017
5947cec
Rollup merge of #40434 - mattico:splice-update, r=alexcrichton
frewsxcv Apr 25, 2017
fc37cc0
Rollup merge of #41352 - kennytm:macos-sanitizers, r=alexcrichton
frewsxcv Apr 25, 2017
05cf1dd
Rollup merge of #41362 - alexcrichton:run-cargot-ests, r=aturon
frewsxcv Apr 25, 2017
429f8ff
Rollup merge of #41370 - malbarbo:android-bootstrap, r=alexcrichton
frewsxcv Apr 25, 2017
ee274be
Rollup merge of #41442 - tbu-:pr_writeall_interrupted, r=aturon
frewsxcv Apr 25, 2017
4318c48
Rollup merge of #41463 - SergioBenitez:master, r=alexcrichton
frewsxcv Apr 25, 2017
f2ebe4c
Rollup merge of #41500 - steveklabnik:gh37866, r=frewsxcv
frewsxcv Apr 25, 2017
c63aca0
Rollup merge of #41518 - tbu-:pr_fix_cp_error, r=sfackler
frewsxcv Apr 25, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Splice forget test
  • Loading branch information
mattico committed Apr 24, 2017
commit feae5a08a2d5d8db14a4b99a050dbc14a6bffb2a
7 changes: 7 additions & 0 deletions src/libcollections/tests/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,13 @@ fn test_splice_unbounded() {
assert_eq!(t, "12345");
}

#[test]
fn test_splice_forget() {
let mut s = String::from("12345");
::std::mem::forget(s.splice(2..4, "789"));
assert_eq!(s, "12345");
}

#[test]
fn test_extend_ref() {
let mut a = "foo".to_string();
Expand Down
8 changes: 8 additions & 0 deletions src/libcollections/tests/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,14 @@ fn test_splice_unbounded() {
assert_eq!(t, &[1, 2, 3, 4, 5]);
}

#[test]
fn test_splice_forget() {
let mut v = vec![1, 2, 3, 4, 5];
let a = [10, 11, 12];
::std::mem::forget(v.splice(2..4, a.iter().cloned()));
assert_eq!(v, &[1, 2]);
}

#[test]
fn test_into_boxed_slice() {
let xs = vec![1, 2, 3];
Expand Down