about summary refs log tree commit diff
path: root/src/libcollectionstest/string.rs
diff options
context:
space:
mode:
authorJohannes Oertel <johannes.oertel@uni-due.de>2015-06-03 12:38:42 +0200
committerJohannes Oertel <johannes.oertel@uni-due.de>2015-06-08 12:05:33 +0200
commitb36ed7d2edf68453c0344eb3cd55281e48c96ecb (patch)
treee1bda74459df66821d1182fb397048f24e3829fa /src/libcollectionstest/string.rs
parenta5979be9fefe671fa81ec70720234602f8112bec (diff)
downloadrust-b36ed7d2edf68453c0344eb3cd55281e48c96ecb.tar.gz
rust-b36ed7d2edf68453c0344eb3cd55281e48c96ecb.zip
Implement RFC 839
Closes #25976.
Diffstat (limited to 'src/libcollectionstest/string.rs')
-rw-r--r--src/libcollectionstest/string.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcollectionstest/string.rs b/src/libcollectionstest/string.rs
index d4e2ebf4fd1..0e9559c55b0 100644
--- a/src/libcollectionstest/string.rs
+++ b/src/libcollectionstest/string.rs
@@ -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(|| {