We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e72ea1d commit 6806486Copy full SHA for 6806486
src/librustdoc/passes/collect_trait_impls.rs
@@ -19,6 +19,12 @@ pub(crate) const COLLECT_TRAIT_IMPLS: Pass = Pass {
19
};
20
21
pub(crate) fn collect_trait_impls(mut krate: Crate, cx: &mut DocContext<'_>) -> Crate {
22
+ // We need to check if there are errors before running this pass because it would crash when
23
+ // we try to get auto and blanket implementations.
24
+ if cx.tcx.sess.diagnostic().has_errors_or_lint_errors().is_some() {
25
+ return krate;
26
+ }
27
+
28
let synth_impls = cx.sess().time("collect_synthetic_impls", || {
29
let mut synth = SyntheticImplCollector { cx, impls: Vec::new() };
30
synth.visit_crate(&krate);
0 commit comments