Skip to content

Commit

Permalink
Fix outdated handling of GetLangItems
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Aug 5, 2018
1 parent 319b052 commit e5d5e6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/dep_node.rs
Expand Up @@ -617,7 +617,7 @@ define_dep_nodes!( <'tcx>
[] ExternModStmtCnum(DefId),
[input] GetLibFeatures,
[] DefinedLibFeatures(CrateNum),
[input] GetLangItems,
[eval_always] GetLangItems,
[] DefinedLangItems(CrateNum),
[] MissingLangItems(CrateNum),
[] VisibleParentMap,
Expand Down
10 changes: 1 addition & 9 deletions src/librustc/ty/context.rs
Expand Up @@ -2851,15 +2851,7 @@ pub fn provide(providers: &mut ty::query::Providers) {
};
providers.get_lang_items = |tcx, id| {
assert_eq!(id, LOCAL_CRATE);
// FIXME(#42293) Right now we insert a `with_ignore` node in the dep
// graph here to ignore the fact that `get_lang_items` below depends on
// the entire crate. For now this'll prevent false positives of
// recompiling too much when anything changes.
//
// Once red/green incremental compilation lands we should be able to
// remove this because while the crate changes often the lint level map
// will change rarely.
tcx.dep_graph.with_ignore(|| Lrc::new(middle::lang_items::collect(tcx)))
Lrc::new(middle::lang_items::collect(tcx))
};
providers.freevars = |tcx, id| tcx.gcx.freevars.get(&id).cloned();
providers.maybe_unused_trait_import = |tcx, id| {
Expand Down

0 comments on commit e5d5e6a

Please sign in to comment.