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 // min-lldb-version: 310
15 // === GDB TESTS ===================================================================================
19 // gdb-command:print self
20 // gdb-check:$1 = 1111
21 // gdb-command:continue
23 // gdb-command:print self
24 // gdbg-check:$2 = {x = 2222, y = 3333}
25 // gdbr-check:$2 = by_value_self_argument_in_trait_impl::Struct {x: 2222, y: 3333}
26 // gdb-command:continue
28 // gdb-command:print self
29 // gdbg-check:$3 = {__0 = 4444.5, __1 = 5555, __2 = 6666, __3 = 7777.5}
30 // gdbr-check:$3 = (4444.5, 5555, 6666, 7777.5)
31 // gdb-command:continue
34 // === LLDB TESTS ==================================================================================
38 // lldb-command:print self
39 // lldb-check:[...]$0 = 1111
40 // lldb-command:continue
42 // lldb-command:print self
43 // lldb-check:[...]$1 = Struct { x: 2222, y: 3333 }
44 // lldb-command:continue
46 // lldb-command:print self
47 // lldb-check:[...]$2 = (4444.5, 5555, 6666, 7777.5)
48 // lldb-command:continue
50 #![feature(omit_gdb_pretty_printer_section)]
51 #![omit_gdb_pretty_printer_section]
54 fn method(self) -> Self;
57 impl Trait for isize {
58 fn method(self) -> isize {
69 impl Trait for Struct {
70 fn method(self) -> Struct {
76 impl Trait for (f64, isize, isize, f64) {
77 fn method(self) -> (f64, isize, isize, f64) {
84 let _ = (1111 as isize).method();
85 let _ = Struct { x: 2222, y: 3333 }.method();
86 let _ = (4444.5, 5555, 6666, 7777.5).method();