Skip to content

[perf ONLY] [gauge upper bound] rustdoc: Remove auto trait impl synthesis #141564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/librustdoc/clean/auto_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use crate::clean::{
use crate::core::DocContext;

#[instrument(level = "debug", skip(cx))]
#[allow(dead_code)]
pub(crate) fn synthesize_auto_trait_impls<'tcx>(
cx: &mut DocContext<'tcx>,
item_def_id: DefId,
Expand Down
13 changes: 3 additions & 10 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use thin_vec::{ThinVec, thin_vec};
use tracing::{debug, warn};
use {rustc_ast as ast, rustc_hir as hir};

use crate::clean::auto_trait::synthesize_auto_trait_impls;
use crate::clean::blanket_impl::synthesize_blanket_impls;
use crate::clean::render_macro_matchers::render_macro_matcher;
use crate::clean::{
Expand Down Expand Up @@ -495,17 +494,11 @@ pub(crate) fn synthesize_auto_trait_and_blanket_impls(
cx: &mut DocContext<'_>,
item_def_id: DefId,
) -> impl Iterator<Item = Item> + use<> {
let auto_impls = cx
.sess()
.prof
.generic_activity("synthesize_auto_trait_impls")
.run(|| synthesize_auto_trait_impls(cx, item_def_id));
let blanket_impls = cx
.sess()
cx.sess()
.prof
.generic_activity("synthesize_blanket_impls")
.run(|| synthesize_blanket_impls(cx, item_def_id));
auto_impls.into_iter().chain(blanket_impls)
.run(|| synthesize_blanket_impls(cx, item_def_id))
.into_iter()
}

/// If `res` has a documentation page associated, store it in the cache.
Expand Down
Loading