// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// STACK BY REF
// gdb-command:print *self
-// gdb-check:$1 = {x = 100}
+// gdbg-check:$1 = {x = 100}
+// gdbr-check:$1 = method_on_trait::Struct {x: 100}
// gdb-command:print arg1
// gdb-check:$2 = -1
// gdb-command:print arg2
// STACK BY VAL
// gdb-command:print self
-// gdb-check:$4 = {x = 100}
+// gdbg-check:$4 = {x = 100}
+// gdbr-check:$4 = method_on_trait::Struct {x: 100}
// gdb-command:print arg1
// gdb-check:$5 = -3
// gdb-command:print arg2
// OWNED BY REF
// gdb-command:print *self
-// gdb-check:$7 = {x = 200}
+// gdbg-check:$7 = {x = 200}
+// gdbr-check:$7 = method_on_trait::Struct {x: 200}
// gdb-command:print arg1
// gdb-check:$8 = -5
// gdb-command:print arg2
// OWNED BY VAL
// gdb-command:print self
-// gdb-check:$10 = {x = 200}
+// gdbg-check:$10 = {x = 200}
+// gdbr-check:$10 = method_on_trait::Struct {x: 200}
// gdb-command:print arg1
// gdb-check:$11 = -7
// gdb-command:print arg2
// OWNED MOVED
// gdb-command:print *self
-// gdb-check:$13 = {x = 200}
+// gdbg-check:$13 = {x = 200}
+// gdbr-check:$13 = method_on_trait::Struct {x: 200}
// gdb-command:print arg1
// gdb-check:$14 = -9
// gdb-command:print arg2
#![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
+#[derive(Copy, Clone)]
struct Struct {
- x: int
+ x: isize
}
trait Trait {
- fn self_by_ref(&self, arg1: int, arg2: int) -> int;
- fn self_by_val(self, arg1: int, arg2: int) -> int;
- fn self_owned(self: Box<Self>, arg1: int, arg2: int) -> int;
+ fn self_by_ref(&self, arg1: isize, arg2: isize) -> isize;
+ fn self_by_val(self, arg1: isize, arg2: isize) -> isize;
+ fn self_owned(self: Box<Self>, arg1: isize, arg2: isize) -> isize;
}
impl Trait for Struct {
- fn self_by_ref(&self, arg1: int, arg2: int) -> int {
+ fn self_by_ref(&self, arg1: isize, arg2: isize) -> isize {
zzz(); // #break
self.x + arg1 + arg2
}
- fn self_by_val(self, arg1: int, arg2: int) -> int {
+ fn self_by_val(self, arg1: isize, arg2: isize) -> isize {
zzz(); // #break
self.x + arg1 + arg2
}
- fn self_owned(self: Box<Struct>, arg1: int, arg2: int) -> int {
+ fn self_owned(self: Box<Struct>, arg1: isize, arg2: isize) -> isize {
zzz(); // #break
self.x + arg1 + arg2
}
let _ = stack.self_by_ref(-1, -2);
let _ = stack.self_by_val(-3, -4);
- let owned = box Struct { x: 200 };
+ let owned: Box<_> = box Struct { x: 200 };
let _ = owned.self_by_ref(-5, -6);
let _ = owned.self_by_val(-7, -8);
let _ = owned.self_owned(-9, -10);
}
fn zzz() {()}
-
-impl Copy for Struct {}
-