about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-08-05 19:56:59 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-08-07 23:17:52 +1000
commit1ce5effac2ced66e44b4b7f320bf8810f654a319 (patch)
tree7fc553c4bbfd0fe5bc2271bb569c500325993b4c
parente5fb4c4359de527c6807b64cd7855c9fb1b3176a (diff)
downloadrust-1ce5effac2ced66e44b4b7f320bf8810f654a319.tar.gz
rust-1ce5effac2ced66e44b4b7f320bf8810f654a319.zip
testsuite: add explanation to a Note, and remove duplicated code.
Fixes #7302.
-rw-r--r--src/test/run-pass/rcvr-borrowed-to-region.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/test/run-pass/rcvr-borrowed-to-region.rs b/src/test/run-pass/rcvr-borrowed-to-region.rs
index 28396119596..46819027dad 100644
--- a/src/test/run-pass/rcvr-borrowed-to-region.rs
+++ b/src/test/run-pass/rcvr-borrowed-to-region.rs
@@ -12,7 +12,9 @@ trait get {
     fn get(self) -> int;
 }
 
-// FIXME #7302: Note: impl on a slice
+// Note: impl on a slice; we're checking that the pointers below
+// correctly get borrowed to `&`. (similar to impling for `int`, with
+// `&self` instead of `self`.)
 impl<'self> get for &'self int {
     fn get(self) -> int {
         return *self;
@@ -34,11 +36,6 @@ pub fn main() {
     info!("y=%d", y);
     assert_eq!(y, 6);
 
-    let x = ~6;
-    let y = x.get();
-    info!("y=%d", y);
-    assert_eq!(y, 6);
-
     let x = &6;
     let y = x.get();
     info!("y=%d", y);