2024-02-22 12:10:29 +00:00
|
|
|
//@ compile-flags:-g
|
2025-07-31 14:56:49 +00:00
|
|
|
//@ disable-gdb-pretty-printers
|
2025-10-02 23:56:27 +02:00
|
|
|
//@ ignore-backends: gcc
|
2014-07-09 14:46:09 +02:00
|
|
|
|
|
|
|
|
// === GDB TESTS ===================================================================================
|
|
|
|
|
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:run
|
|
|
|
|
|
|
|
|
|
// gdb-command:print x
|
|
|
|
|
// gdb-check:$1 = 0.5
|
|
|
|
|
// gdb-command:print y
|
|
|
|
|
// gdb-check:$2 = 10
|
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
|
|
// gdb-command:print *x
|
|
|
|
|
// gdb-check:$3 = 29
|
|
|
|
|
// gdb-command:print *y
|
|
|
|
|
// gdb-check:$4 = 110
|
|
|
|
|
// gdb-command:continue
|
2013-08-15 18:24:05 +02:00
|
|
|
|
2014-07-09 14:46:09 +02:00
|
|
|
|
|
|
|
|
// === LLDB TESTS ==================================================================================
|
|
|
|
|
|
|
|
|
|
// lldb-command:run
|
|
|
|
|
|
2024-03-15 15:05:57 +01:00
|
|
|
// lldb-command:v x
|
2024-08-18 17:00:33 -04:00
|
|
|
// lldb-check:[...] 0.5
|
2024-03-15 15:05:57 +01:00
|
|
|
// lldb-command:v y
|
2024-08-18 17:00:33 -04:00
|
|
|
// lldb-check:[...] 10
|
2014-07-09 14:46:09 +02:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
2024-03-15 15:05:57 +01:00
|
|
|
// lldb-command:v *x
|
2024-08-18 17:00:33 -04:00
|
|
|
// lldb-check:[...] 29
|
2024-03-15 15:05:57 +01:00
|
|
|
// lldb-command:v *y
|
2024-08-18 17:00:33 -04:00
|
|
|
// lldb-check:[...] 110
|
2014-07-09 14:46:09 +02:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
2013-08-15 18:24:05 +02:00
|
|
|
fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) {
|
|
|
|
|
|
2015-02-01 12:44:15 -05:00
|
|
|
let closure = |x, y| {
|
2014-07-09 14:46:09 +02:00
|
|
|
zzz(); // #break
|
2013-08-15 18:24:05 +02:00
|
|
|
(y, x)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
closure(a, b)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2015-01-25 22:05:03 +01:00
|
|
|
some_generic_fun(0.5f64, 10);
|
2015-02-15 09:52:21 +01:00
|
|
|
some_generic_fun(&29, Box::new(110));
|
2013-08-15 18:24:05 +02:00
|
|
|
}
|
|
|
|
|
|
2014-07-09 14:46:09 +02:00
|
|
|
fn zzz() { () }
|