Skip to content

Commit dcde543

Browse files
committed
Auto merge of #141564 - fmease:perf-rustdoc-rm-auto-trait-synth, r=<try>
[perf ONLY] [gauge upper bound] rustdoc: Remove auto trait synthesis
2 parents 283db70 + ac6ef53 commit dcde543

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/librustdoc/clean/auto_trait.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::clean::{
1616
use crate::core::DocContext;
1717

1818
#[instrument(level = "debug", skip(cx))]
19+
#[allow(dead_code)]
1920
pub(crate) fn synthesize_auto_trait_impls<'tcx>(
2021
cx: &mut DocContext<'tcx>,
2122
item_def_id: DefId,

src/librustdoc/clean/utils.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use thin_vec::{ThinVec, thin_vec};
1414
use tracing::{debug, warn};
1515
use {rustc_ast as ast, rustc_hir as hir};
1616

17-
use crate::clean::auto_trait::synthesize_auto_trait_impls;
1817
use crate::clean::blanket_impl::synthesize_blanket_impls;
1918
use crate::clean::render_macro_matchers::render_macro_matcher;
2019
use crate::clean::{
@@ -476,17 +475,11 @@ pub(crate) fn synthesize_auto_trait_and_blanket_impls(
476475
cx: &mut DocContext<'_>,
477476
item_def_id: DefId,
478477
) -> impl Iterator<Item = Item> + use<> {
479-
let auto_impls = cx
480-
.sess()
481-
.prof
482-
.generic_activity("synthesize_auto_trait_impls")
483-
.run(|| synthesize_auto_trait_impls(cx, item_def_id));
484-
let blanket_impls = cx
485-
.sess()
478+
cx.sess()
486479
.prof
487480
.generic_activity("synthesize_blanket_impls")
488-
.run(|| synthesize_blanket_impls(cx, item_def_id));
489-
auto_impls.into_iter().chain(blanket_impls)
481+
.run(|| synthesize_blanket_impls(cx, item_def_id))
482+
.into_iter()
490483
}
491484

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

0 commit comments

Comments
 (0)