Auto merge of #45944 - eddyb:provide, r=nikomatsakis
rustc_driver: expose a way to override query providers in CompileController. This API has been a long-time coming and will probably become the main method for custom drivers (that is, binaries other than `rustc` itself that use `librustc_driver`) to adapt the compiler's behavior.
This commit is contained in:
commit
3707db9405
11 changed files with 65 additions and 80 deletions
|
|
@ -842,14 +842,3 @@ pub fn provide(providers: &mut ty::maps::Providers) {
|
|||
..*providers
|
||||
};
|
||||
}
|
||||
|
||||
pub fn provide_extern(providers: &mut ty::maps::Providers) {
|
||||
*providers = ty::maps::Providers {
|
||||
is_object_safe: object_safety::is_object_safe_provider,
|
||||
specialization_graph_of: specialize::specialization_graph_provider,
|
||||
specializes: specialize::specializes,
|
||||
trans_fulfill_obligation: trans::trans_fulfill_obligation,
|
||||
vtable_methods,
|
||||
..*providers
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2605,17 +2605,6 @@ pub fn provide(providers: &mut ty::maps::Providers) {
|
|||
};
|
||||
}
|
||||
|
||||
pub fn provide_extern(providers: &mut ty::maps::Providers) {
|
||||
*providers = ty::maps::Providers {
|
||||
adt_sized_constraint,
|
||||
adt_dtorck_constraint,
|
||||
trait_impls_of: trait_def::trait_impls_of_provider,
|
||||
param_env,
|
||||
..*providers
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/// A map for the local crate mapping each type to a vector of its
|
||||
/// inherent impls. This is not meant to be used outside of coherence;
|
||||
/// rather, you should request the vector for a specific type via
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue