Restrict access to crate_name.
Also remove original_crate_name, which had the exact same implementation
This commit is contained in:
parent
5d9f96ab27
commit
10fb4b2fe5
19 changed files with 23 additions and 30 deletions
|
@ -1,12 +1,11 @@
|
|||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_middle::hir::map as hir_map;
|
||||
use rustc_middle::ty::subst::Subst;
|
||||
use rustc_middle::ty::{
|
||||
self, Binder, Predicate, PredicateKind, ToPredicate, Ty, TyCtxt, WithConstness,
|
||||
};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
use rustc_trait_selection::traits;
|
||||
|
||||
|
@ -388,11 +387,6 @@ fn param_env_reveal_all_normalized(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamE
|
|||
tcx.param_env(def_id).with_reveal_all_normalized(tcx)
|
||||
}
|
||||
|
||||
fn original_crate_name(tcx: TyCtxt<'_>, crate_num: CrateNum) -> Symbol {
|
||||
assert_eq!(crate_num, LOCAL_CRATE);
|
||||
tcx.crate_name
|
||||
}
|
||||
|
||||
fn instance_def_size_estimate<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
instance_def: ty::InstanceDef<'tcx>,
|
||||
|
@ -538,7 +532,6 @@ pub fn provide(providers: &mut ty::query::Providers) {
|
|||
param_env,
|
||||
param_env_reveal_all_normalized,
|
||||
trait_of_item,
|
||||
original_crate_name,
|
||||
instance_def_size_estimate,
|
||||
issue33140_self_ty,
|
||||
impl_defaultness,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue