]> git.lizzy.rs Git - rust.git/commitdiff
testsuite: add explanation to a Note, and remove duplicated code.
authorHuon Wilson <dbau.pp+github@gmail.com>
Mon, 5 Aug 2013 09:56:59 +0000 (19:56 +1000)
committerHuon Wilson <dbau.pp+github@gmail.com>
Wed, 7 Aug 2013 13:17:52 +0000 (23:17 +1000)
Fixes #7302.

src/test/run-pass/rcvr-borrowed-to-region.rs

index 28396119596b0d94fbe1ee8cf2a5901019fda8e3..46819027dad649719e9ab9da908260a5800ab863 100644 (file)
@@ -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);