We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d320de commit e6b993eCopy full SHA for e6b993e
src/functions/serialization.rs
@@ -39,16 +39,19 @@ fn format_def_id(def_id: &DefId) -> String {
39
#[derive(Debug, Serialize)]
40
pub struct Callee {
41
def_id: String,
42
+ file: String,
43
func: String,
44
}
45
46
impl Callee {
47
fn new(inst: &Instance, tcx: TyCtxt, src_map: &SourceMap) -> Self {
- let def_id = format_def_id(&inst.def.def_id());
48
+ let inst_def = &inst.def;
49
+ let def_id = format_def_id(&inst_def.def_id());
50
+ let file = inst_def.span().get_filename();
51
let func = inst
52
.body()
53
.map(|body| super::source_code_with(body.span, tcx, src_map))
54
.unwrap_or_default();
- Callee { def_id, func }
55
+ Callee { def_id, file, func }
56
57
0 commit comments