Skip to content

Commit 5027a79

Browse files
michaelwoeristernikomatsakis
authored andcommitted
Add missing entries for enum variants in trans::CrateContext::external_srcs.
1 parent 6fdeecf commit 5027a79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_trans/trans/inline.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ fn instantiate_inline(ccx: &CrateContext, fn_id: DefId) -> Option<DefId> {
9797
for (ast_v, ty_v) in ast_vs.iter().zip(ty_vs.iter()) {
9898
if ty_v.did == fn_id { my_id = ast_v.node.data.id(); }
9999
ccx.external().borrow_mut().insert(ty_v.did, Some(ast_v.node.data.id()));
100+
ccx.external_srcs().borrow_mut().insert(ast_v.node.data.id(), ty_v.did);
100101
}
101102
}
102103
hir::ItemStruct(ref struct_def, _) => {
@@ -105,6 +106,7 @@ fn instantiate_inline(ccx: &CrateContext, fn_id: DefId) -> Option<DefId> {
105106
non-tuple struct")
106107
} else {
107108
ccx.external().borrow_mut().insert(fn_id, Some(struct_def.id()));
109+
ccx.external_srcs().borrow_mut().insert(struct_def.id(), fn_id);
108110
my_id = struct_def.id();
109111
}
110112
}

0 commit comments

Comments
 (0)