]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/visit_ast.rs
Rollup merge of #100409 - jsha:highlight-lighter, r=GuillaumeGomez
[rust.git] / src / librustdoc / visit_ast.rs
index ac934f6925d0bd24082fb1cd688ee6d15d43ad2c..ca7a20bf3688a934fd2a36a937c253e8f40f0b5f 100644 (file)
@@ -190,6 +190,10 @@ fn maybe_inline_local(
     ) -> bool {
         debug!("maybe_inline_local res: {:?}", res);
 
+        if self.cx.output_format.is_json() {
+            return false;
+        }
+
         let tcx = self.cx.tcx;
         let Some(res_did) = res.opt_def_id() else {
             return false;