]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/no-debug-attribute.rs
Rollup merge of #56044 - matthewjasper:function-param-drop-order, r=cramertj
[rust.git] / src / test / debuginfo / no-debug-attribute.rs
1 // ignore-lldb
2
3 // compile-flags:-g
4
5 // gdb-command:run
6
7 // gdb-command:info locals
8 // gdb-check:No locals.
9 // gdb-command:continue
10
11 // gdb-command:info locals
12 // gdb-check:abc = 10
13 // gdb-command:continue
14
15 #![allow(unused_variables)]
16 #![feature(no_debug)]
17 #![feature(omit_gdb_pretty_printer_section)]
18 #![omit_gdb_pretty_printer_section]
19
20 #[inline(never)]
21 fn id<T>(x: T) -> T {x}
22
23 fn function_with_debuginfo() {
24     let abc = 10_usize;
25     id(abc); // #break
26 }
27
28 #[no_debug]
29 fn function_without_debuginfo() {
30     let abc = -57i32;
31     id(abc); // #break
32 }
33
34 fn main() {
35     function_without_debuginfo();
36     function_with_debuginfo();
37 }