-
- Downloads
Print void types correctly in Rust
Rust prefers to not specify the return type of a function when it is unit (`()`). The type is also referred to as "void" in debuginfo but not in actual usage, so we should never be printing "void" when the language is Rust. 2016-06-27 Manish Goregaokar <manish@mozilla.com> gdb/ChangeLog: * rust-lang.c (rust_print_type): Print unit types as "()" * rust-lang.c (rust_print_type): Omit return type for functions returning unit gdb/testsuite/ChangeLog: * gdb.rust/simple.rs: Add test for returning unit in a function * gdb.rust/simple.exp: Add expectation for functions returning unit
Showing
- gdb/ChangeLog 6 additions, 0 deletionsgdb/ChangeLog
- gdb/rust-lang.c 18 additions, 4 deletionsgdb/rust-lang.c
- gdb/testsuite/ChangeLog 5 additions, 0 deletionsgdb/testsuite/ChangeLog
- gdb/testsuite/gdb.rust/simple.exp 1 addition, 0 deletionsgdb/testsuite/gdb.rust/simple.exp
- gdb/testsuite/gdb.rust/simple.rs 7 additions, 0 deletionsgdb/testsuite/gdb.rust/simple.rs
Loading
Please register or sign in to comment