Implement RFC 839

Closes #25976.
This commit is contained in:
Johannes Oertel 2015-06-03 12:38:42 +02:00
parent a5979be9fe
commit b36ed7d2ed
22 changed files with 291 additions and 1 deletions

View file

@ -365,6 +365,14 @@ fn test_drain() {
assert_eq!(t, "");
}
#[test]
fn test_extend_ref() {
let mut a = "foo".to_string();
a.extend(&['b', 'a', 'r']);
assert_eq!(&a, "foobar");
}
#[bench]
fn bench_with_capacity(b: &mut Bencher) {
b.iter(|| {