Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.
This commit is contained in:
parent
f25811e34b
commit
f07100afc8
74 changed files with 99 additions and 96 deletions
|
|
@ -38,7 +38,7 @@ pub struct Compiler {
|
|||
pub(crate) crate_name: Option<String>,
|
||||
pub(crate) register_lints: Option<Box<dyn Fn(&Session, &mut LintStore) + Send + Sync>>,
|
||||
pub(crate) override_queries:
|
||||
Option<fn(&Session, &mut ty::query::Providers<'_>, &mut ty::query::Providers<'_>)>,
|
||||
Option<fn(&Session, &mut ty::query::Providers, &mut ty::query::Providers)>,
|
||||
}
|
||||
|
||||
impl Compiler {
|
||||
|
|
@ -153,7 +153,7 @@ pub struct Config {
|
|||
///
|
||||
/// The second parameter is local providers and the third parameter is external providers.
|
||||
pub override_queries:
|
||||
Option<fn(&Session, &mut ty::query::Providers<'_>, &mut ty::query::Providers<'_>)>,
|
||||
Option<fn(&Session, &mut ty::query::Providers, &mut ty::query::Providers)>,
|
||||
|
||||
/// Registry of diagnostics codes.
|
||||
pub registry: Registry,
|
||||
|
|
|
|||
|
|
@ -719,7 +719,7 @@ pub fn prepare_outputs(
|
|||
Ok(outputs)
|
||||
}
|
||||
|
||||
pub fn default_provide(providers: &mut ty::query::Providers<'_>) {
|
||||
pub fn default_provide(providers: &mut ty::query::Providers) {
|
||||
providers.analysis = analysis;
|
||||
proc_macro_decls::provide(providers);
|
||||
plugin::build::provide(providers);
|
||||
|
|
@ -740,7 +740,7 @@ pub fn default_provide(providers: &mut ty::query::Providers<'_>) {
|
|||
rustc_codegen_ssa::provide(providers);
|
||||
}
|
||||
|
||||
pub fn default_provide_extern(providers: &mut ty::query::Providers<'_>) {
|
||||
pub fn default_provide_extern(providers: &mut ty::query::Providers) {
|
||||
rustc_metadata::provide_extern(providers);
|
||||
rustc_codegen_ssa::provide_extern(providers);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,6 @@ impl<'v> ItemLikeVisitor<'v> for Finder {
|
|||
fn visit_impl_item(&mut self, _impl_item: &hir::ImplItem<'_>) {}
|
||||
}
|
||||
|
||||
pub(crate) fn provide(providers: &mut Providers<'_>) {
|
||||
pub(crate) fn provide(providers: &mut Providers) {
|
||||
*providers = Providers { proc_macro_decls_static, ..*providers };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue