This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Print void types correctly in Rust


*** TEST RESULTS FOR COMMIT 921d8f549f9e35d3f83c7b1a381146a7dc1246f4 ***

Author: Manish Goregaokar <manish@mozilla.com>
Branch: master
Commit: 921d8f549f9e35d3f83c7b1a381146a7dc1246f4

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]