Open
Description
I'm using rustc from the Fedora COPR:
bapiya. rustc --version
rustc 1.7.0 (a5d1e7a59 2016-02-29)
Consider this program:
pub type Xty = fn() -> u32;
fn x() -> u32 {
return 57u32;
}
pub static AA: Xty = x;
fn main() {
println!("{}", AA());
}
I compile this with -g
and then look for the type Xty
in the DWARF using readelf. It isn't there:
bapiya. readelf -wi B1 | grep Xty
bapiya.
If I examine the type of AA
, it ends up here:
<1><14b>: Abbrev Number: 11 (DW_TAG_pointer_type)
<14c> DW_AT_type : <0x154>
<150> DW_AT_name : (indirect string, offset: 0x4b): fn() -> u32
<1><154>: Abbrev Number: 12 (DW_TAG_subroutine_type)
<155> DW_AT_type : <0x159>
[...]
That is, the typedef has been dropped.