Print fn name and type in dump_allocs.

This commit is contained in:
Scott Olson 2017-02-06 12:48:10 -08:00
parent b36d8085a7
commit 097db58f30

View File

@ -418,9 +418,9 @@ pub fn dump_allocs(&self, mut allocs: Vec<AllocId>) {
let alloc = match (self.alloc_map.get(&id), self.functions.get(&id)) {
(Some(a), None) => a,
(None, Some(_)) => {
// FIXME: print function name
trace!("{} function pointer", msg);
(None, Some(fn_def)) => {
let name = ty::tls::with(|tcx| tcx.item_path_str(fn_def.def_id));
trace!("{} function pointer: {}: {}", msg, name, fn_def.sig);
continue;
},
(None, None) => {