about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-05-23 18:36:22 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-05-27 17:32:31 -0700
commit58547d64887184550b31efce1551818b1a1525fa (patch)
tree6feefc2af11e146bf7f35e074ac9bd1d005565de
parent6c03fbfefd950f5a5d54b3b86f84657f9908f5ff (diff)
downloadrust-58547d64887184550b31efce1551818b1a1525fa.tar.gz
rust-58547d64887184550b31efce1551818b1a1525fa.zip
testsuite: Add working test for #5550
-rw-r--r--src/test/run-pass/issue-5550.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-5550.rs b/src/test/run-pass/issue-5550.rs
new file mode 100644
index 00000000000..54abc850532
--- /dev/null
+++ b/src/test/run-pass/issue-5550.rs
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let s: ~str = ~"foobar";
+    let mut t: &str = s;
+    t = t.slice(0, 3); // for master: str::view(t, 0, 3) maybe
+}