1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // ignore-android: FIXME(#10381)
14 // debugger:rbreak zzz
19 // debugger:print *self
20 // check:$1 = {100, -100.5}
21 // debugger:print arg1
23 // debugger:print arg2
29 // debugger:print self
30 // check:$4 = {100, -100.5}
31 // debugger:print arg1
33 // debugger:print arg2
39 // debugger:print *self
40 // check:$7 = {200, -200.5}
41 // debugger:print arg1
43 // debugger:print arg2
49 // debugger:print self
50 // check:$10 = {200, -200.5}
51 // debugger:print arg1
53 // debugger:print arg2
59 // debugger:print *self
60 // check:$13 = {200, -200.5}
61 // debugger:print arg1
63 // debugger:print arg2
67 struct TupleStruct(int, f64);
71 fn self_by_ref(&self, arg1: int, arg2: int) -> int {
76 fn self_by_val(self, arg1: int, arg2: int) -> int {
81 fn self_owned(~self, arg1: int, arg2: int) -> int {
88 let stack = TupleStruct(100, -100.5);
89 let _ = stack.self_by_ref(-1, -2);
90 let _ = stack.self_by_val(-3, -4);
92 let owned = ~TupleStruct(200, -200.5);
93 let _ = owned.self_by_ref(-5, -6);
94 let _ = owned.self_by_val(-7, -8);
95 let _ = owned.self_owned(-9, -10);