]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/borrowck-nested-calls.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / run-pass / borrowck-nested-calls.rs
index 50e9b6d81b5175626c4f5b68c26459ca9b0671fd..fa50eaa6a88c1d914dadaf48466a72e744765ff3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,23 +8,23 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-test #5074 nested method calls
+// ignore-test FIXME (#6268) nested method calls
 
 // Test that (safe) nested calls with `&mut` receivers are permitted.
 
-struct Foo {a: uint, b: uint}
+struct Foo {a: usize, b: usize}
 
 impl Foo {
-    pub fn inc_a(&mut self, v: uint) { self.a += v; }
+    pub fn inc_a(&mut self, v: usize) { self.a += v; }
 
-    pub fn next_b(&mut self) -> uint {
+    pub fn next_b(&mut self) -> usize {
         let b = self.b;
         self.b += 1;
         b
     }
 }
 
-fn main() {
+pub fn main() {
     let mut f = Foo {a: 22, b: 23};
     f.inc_a(f.next_b());
     assert_eq!(f.a, 22+23);