Skip to content

Commit

Permalink
Switch several crate-wide queries to use eval_always
Browse files Browse the repository at this point in the history
Closes #45238
  • Loading branch information
wesleywiser committed Oct 26, 2017
1 parent c1436c3 commit 8281e88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ define_dep_nodes!( <'tcx>

// Represents different phases in the compiler.
[] RegionScopeTree(DefId),
[] Coherence,
[] CoherenceInherentImplOverlapCheck,
[eval_always] Coherence,
[eval_always] CoherenceInherentImplOverlapCheck,
[] CoherenceCheckTrait(DefId),
[] PrivacyAccessLevels(CrateNum),
[eval_always] PrivacyAccessLevels(CrateNum),

// Represents the MIR for a fn; also used as the task node for
// things read/modify that MIR.
Expand All @@ -485,7 +485,7 @@ define_dep_nodes!( <'tcx>

[] Reachability,
[] MirKeys,
[] CrateVariances,
[eval_always] CrateVariances,

// Nodes representing bits of computed IR in the tcx. Each shared
// table in the tcx (or elsewhere) maps to one of these
Expand Down Expand Up @@ -515,7 +515,7 @@ define_dep_nodes!( <'tcx>
[] DtorckConstraint(DefId),
[] AdtDestructor(DefId),
[] AssociatedItemDefIds(DefId),
[] InherentImpls(DefId),
[eval_always] InherentImpls(DefId),
[] TypeckBodiesKrate,
[] TypeckTables(DefId),
[] HasTypeckTables(DefId),
Expand Down Expand Up @@ -584,7 +584,7 @@ define_dep_nodes!( <'tcx>
[] IsCompilerBuiltins(CrateNum),
[] HasGlobalAllocator(CrateNum),
[] ExternCrate(DefId),
[] LintLevels,
[eval_always] LintLevels,
[] Specializes { impl1: DefId, impl2: DefId },
[input] InScopeTraits(DefIndex),
[] ModuleExports(DefId),
Expand Down Expand Up @@ -643,7 +643,7 @@ define_dep_nodes!( <'tcx>
[] StabilityIndex,
[] AllCrateNums,
[] ExportedSymbols(CrateNum),
[] CollectAndPartitionTranslationItems,
[eval_always] CollectAndPartitionTranslationItems,
[] ExportName(DefId),
[] ContainsExternIndicator(DefId),
[] IsTranslatedFunction(DefId),
Expand Down
4 changes: 1 addition & 3 deletions src/librustc_privacy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1563,9 +1563,7 @@ pub fn provide(providers: &mut Providers) {
}

pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Rc<AccessLevels> {
tcx.dep_graph.with_ignore(|| { // FIXME
tcx.privacy_access_levels(LOCAL_CRATE)
})
tcx.privacy_access_levels(LOCAL_CRATE)
}

fn privacy_access_levels<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
Expand Down

0 comments on commit 8281e88

Please sign in to comment.