Skip to content

Commit

Permalink
Don't register reads for external items
Browse files Browse the repository at this point in the history
Presumably, this ICEs when translating an inlined item from another
crate. There shouldn't be a need to track dependencies in that case.
  • Loading branch information
jonas-schievink committed Jul 10, 2016
1 parent dd0505c commit 37d5c06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/librustc_trans/trans_item.rs
Expand Up @@ -111,7 +111,12 @@ impl<'a, 'tcx> TransItem<'tcx> {
tcx.map.local_def_id(node_id)
}
TransItem::Fn(instance) => {
instance.def
if instance.def.is_local() {
instance.def
} else {
// Translating an inlined item from another crate? Don't track anything.
return;
}
}
TransItem::DropGlue(_) => {
// Nothing to track for drop glue
Expand Down

0 comments on commit 37d5c06

Please sign in to comment.