Skip to content

Commit 66d7216

Browse files
committed
trip const_to_alloc query
1 parent 1114ab6 commit 66d7216

File tree

5 files changed

+2
-22
lines changed

5 files changed

+2
-22
lines changed

src/librustc/dep_graph/dep_node.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ use traits::query::{
7575
CanonicalPredicateGoal, CanonicalTypeOpProvePredicateGoal, CanonicalTypeOpNormalizeGoal,
7676
};
7777
use ty::{TyCtxt, FnSig, Instance, InstanceDef,
78-
ParamEnv, ParamEnvAnd, Predicate, PolyFnSig, PolyTraitRef, Ty, self};
78+
ParamEnv, ParamEnvAnd, Predicate, PolyFnSig, PolyTraitRef, Ty};
7979
use ty::subst::Substs;
8080

8181
// erase!() just makes tokens go away. It's used to specify which macro argument
@@ -632,7 +632,6 @@ define_dep_nodes!( <'tcx>
632632
// queries). Making them anonymous avoids hashing the result, which
633633
// may save a bit of time.
634634
[anon] EraseRegionsTy { ty: Ty<'tcx> },
635-
[anon] ConstToAllocation { val: &'tcx ty::Const<'tcx> },
636635

637636
[input] Freevars(DefId),
638637
[input] MaybeUnusedTraitImport(DefId),

src/librustc/ty/query/config.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,6 @@ impl<'tcx> QueryDescription<'tcx> for queries::super_predicates_of<'tcx> {
198198
}
199199
}
200200

201-
impl<'tcx> QueryDescription<'tcx> for queries::const_to_allocation<'tcx> {
202-
fn describe(_tcx: TyCtxt, val: &'tcx ty::Const<'tcx>) -> String {
203-
format!("converting constant `{:?}` to an allocation", val)
204-
}
205-
}
206-
207201
impl<'tcx> QueryDescription<'tcx> for queries::erase_regions_ty<'tcx> {
208202
fn describe(_tcx: TyCtxt, ty: Ty<'tcx>) -> String {
209203
format!("erasing regions from `{:?}`", ty)

src/librustc/ty/query/mod.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use middle::exported_symbols::{SymbolExportLevel, ExportedSymbol};
3030
use mir::interpret::ConstEvalResult;
3131
use mir::mono::{CodegenUnit, Stats};
3232
use mir;
33-
use mir::interpret::{GlobalId, Allocation};
33+
use mir::interpret::GlobalId;
3434
use session::{CompileResult, CrateDisambiguator};
3535
use session::config::OutputFilenames;
3636
use traits::{self, Vtable};
@@ -286,11 +286,6 @@ define_queries! { <'tcx>
286286
/// other items (such as enum variant explicit discriminants).
287287
[] fn const_eval: const_eval_dep_node(ty::ParamEnvAnd<'tcx, GlobalId<'tcx>>)
288288
-> ConstEvalResult<'tcx>,
289-
290-
/// Converts a constant value to a constant allocation
291-
[] fn const_to_allocation: const_to_allocation(
292-
&'tcx ty::Const<'tcx>
293-
) -> &'tcx Allocation,
294289
},
295290

296291
TypeChecking {
@@ -706,12 +701,6 @@ fn erase_regions_ty<'tcx>(ty: Ty<'tcx>) -> DepConstructor<'tcx> {
706701
DepConstructor::EraseRegionsTy { ty }
707702
}
708703

709-
fn const_to_allocation<'tcx>(
710-
val: &'tcx ty::Const<'tcx>,
711-
) -> DepConstructor<'tcx> {
712-
DepConstructor::ConstToAllocation { val }
713-
}
714-
715704
fn type_param_predicates<'tcx>((item_id, param_id): (DefId, DefId)) -> DepConstructor<'tcx> {
716705
DepConstructor::TypeParamPredicates {
717706
item_id,

src/librustc/ty/query/plumbing.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,6 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
10621062
DepKind::FulfillObligation |
10631063
DepKind::VtableMethods |
10641064
DepKind::EraseRegionsTy |
1065-
DepKind::ConstToAllocation |
10661065
DepKind::NormalizeProjectionTy |
10671066
DepKind::NormalizeTyAfterErasingRegions |
10681067
DepKind::ImpliedOutlivesBounds |

src/librustc_mir/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ pub fn provide(providers: &mut Providers) {
9393
shim::provide(providers);
9494
transform::provide(providers);
9595
providers.const_eval = interpret::const_eval_provider;
96-
providers.const_to_allocation = interpret::const_to_allocation_provider;
9796
providers.check_match = hair::pattern::check_match;
9897
}
9998

0 commit comments

Comments
 (0)