]> git.lizzy.rs Git - rust.git/commitdiff
Fix outdated handling of GetLangItems
authorvarkor <github@varkor.com>
Thu, 26 Jul 2018 22:44:36 +0000 (23:44 +0100)
committervarkor <github@varkor.com>
Sun, 5 Aug 2018 14:54:49 +0000 (15:54 +0100)
src/librustc/dep_graph/dep_node.rs
src/librustc/ty/context.rs

index f099325dfc12008238f92c16a732539f7465be8e..66d6a4346685819d8baec9385d23fd4d3f4b2b28 100644 (file)
@@ -617,7 +617,7 @@ pub fn fingerprint_needed_for_crate_hash(self) -> bool {
     [] ExternModStmtCnum(DefId),
     [input] GetLibFeatures,
     [] DefinedLibFeatures(CrateNum),
-    [input] GetLangItems,
+    [eval_always] GetLangItems,
     [] DefinedLangItems(CrateNum),
     [] MissingLangItems(CrateNum),
     [] VisibleParentMap,
index 21f482ecf39981c02a4360897db9f192fa14238e..a35bd3c012f3fa74be08cd9497fc01a560749116 100644 (file)
@@ -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| {