diff options
| author | mark <markm@cs.wisc.edu> | 2022-01-23 00:11:13 -0600 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2022-01-23 00:11:13 -0600 |
| commit | cf382de0cc268e6af8d37d31323bf36d0099ade3 (patch) | |
| tree | bef7a6bf124fdc140456da09363edb6935b0df9c /src/librustdoc/html/render | |
| parent | ecf72996eda4f8af19b0ca7235c6f62e0245a313 (diff) | |
| download | rust-cf382de0cc268e6af8d37d31323bf36d0099ade3.tar.gz rust-cf382de0cc268e6af8d37d31323bf36d0099ade3.zip | |
Remove DiagnosticBuilder.quiet
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/span_map.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs index 586f34cd2c8..731e18b1eec 100644 --- a/src/librustdoc/html/render/span_map.rs +++ b/src/librustdoc/html/render/span_map.rs @@ -134,11 +134,13 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> { if let Some(hir_id) = segment.hir_id { let hir = self.tcx.hir(); let body_id = hir.enclosing_body_owner(hir_id); - let typeck_results = self.tcx.sess.with_disabled_diagnostic(|| { - self.tcx.typeck_body( - hir.maybe_body_owned_by(body_id).expect("a body which isn't a body"), - ) - }); + // FIXME: this is showing error messages for parts of the code that are not + // compiled (because of cfg)! + // + // See discussion in https://github.com/rust-lang/rust/issues/69426#issuecomment-1019412352 + let typeck_results = self.tcx.typeck_body( + hir.maybe_body_owned_by(body_id).expect("a body which isn't a body"), + ); if let Some(def_id) = typeck_results.type_dependent_def_id(expr.hir_id) { self.matches.insert( segment.ident.span, |
