Rollup merge of #81284 - jyn514:impl-times, r=wesleywiser
Make `-Z time-passes` less noisy - Add the module name to `pre_AST_expansion_passes` and don't make it a verbose event (since it normally doesn't take very long, and it's emitted many times) - Don't make the following rustdoc events verbose; they're emitted many times. + build_extern_trait_impl + build_local_trait_impl + build_primitive_trait_impl + get_auto_trait_impls + get_blanket_trait_impls - Remove the `get_auto_trait_and_blanket_synthetic_impls` rustdoc event; it's wholly covered by get_{auto,blanket}_trait_impls and not very useful. I found this while working on https://github.com/rust-lang/rust/pull/81275 but it's independent of those changes.
This commit is contained in:
commit
bb6d1d3086
5 changed files with 35 additions and 24 deletions
|
@ -929,7 +929,9 @@ pub struct ExtCtxt<'a> {
|
|||
pub force_mode: bool,
|
||||
pub expansions: FxHashMap<Span, Vec<String>>,
|
||||
/// Called directly after having parsed an external `mod foo;` in expansion.
|
||||
pub(super) extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate)>,
|
||||
///
|
||||
/// `Ident` is the module name.
|
||||
pub(super) extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate, Ident)>,
|
||||
}
|
||||
|
||||
impl<'a> ExtCtxt<'a> {
|
||||
|
@ -937,7 +939,7 @@ impl<'a> ExtCtxt<'a> {
|
|||
sess: &'a Session,
|
||||
ecfg: expand::ExpansionConfig<'a>,
|
||||
resolver: &'a mut dyn ResolverExpand,
|
||||
extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate)>,
|
||||
extern_mod_loaded: Option<&'a dyn Fn(&ast::Crate, Ident)>,
|
||||
) -> ExtCtxt<'a> {
|
||||
ExtCtxt {
|
||||
sess,
|
||||
|
|
|
@ -1407,7 +1407,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
|
|||
proc_macros: vec![],
|
||||
};
|
||||
if let Some(extern_mod_loaded) = self.cx.extern_mod_loaded {
|
||||
extern_mod_loaded(&krate);
|
||||
extern_mod_loaded(&krate, ident);
|
||||
}
|
||||
|
||||
*old_mod = krate.module;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue