key: ty::ParamEnvAnd<'tcx, GlobalId<'tcx>>
) -> EvalToValTreeResult<'tcx> {
desc { "evaluate type-level constant" }
- remap_env_constness
}
/// Converts a type level constant value into `ConstValue`
/// field values or return `None` if constant is invalid.
///
/// Use infallible `TyCtxt::destructure_const` when you know that constant is valid.
- query try_destructure_const(key: ty::ParamEnvAnd<'tcx, ty::Const<'tcx>>) -> Option<mir::DestructuredConst<'tcx>> {
+ query try_destructure_const(key: ty::Const<'tcx>) -> Option<mir::DestructuredConst<'tcx>> {
desc { "destructure type level constant"}
}
remap_env_constness
}
- /// Dereference a constant reference or raw pointer and turn the result into a constant
- /// again.
- query deref_const(
- key: ty::ParamEnvAnd<'tcx, ty::Const<'tcx>>
- ) -> ty::Const<'tcx> {
- desc { "deref constant" }
- remap_env_constness
- }
-
/// Dereference a constant reference or raw pointer and turn the result into a constant
/// again.
query deref_mir_constant(
desc { "looking up late bound vars" }
}
- query lifetime_scope_map(_: LocalDefId) -> Option<FxHashMap<ItemLocalId, LifetimeScopeForPath>> {
- storage(ArenaCacheSelector<'tcx>)
- desc { "finds the lifetime scope for an HirId of a PathSegment" }
- }
-
query visibility(def_id: DefId) -> ty::Visibility {
desc { |tcx| "computing visibility of `{}`", tcx.def_path_str(def_id) }
separate_provide_extern
query upvars_mentioned(def_id: DefId) -> Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>> {
desc { |tcx| "collecting upvars mentioned in `{}`", tcx.def_path_str(def_id) }
}
- query maybe_unused_trait_import(def_id: LocalDefId) -> bool {
- desc { |tcx| "maybe_unused_trait_import for `{}`", tcx.def_path_str(def_id.to_def_id()) }
+ query maybe_unused_trait_imports(_: ()) -> &'tcx FxIndexSet<LocalDefId> {
+ desc { "fetching potentially unused trait imports" }
}
query maybe_unused_extern_crates(_: ()) -> &'tcx [(LocalDefId, Span)] {
desc { "looking up all possibly unused extern crates" }