Skip to content

Commit a996418

Browse files
authored
Rollup merge of rust-lang#110146 - bvanjoi:relative-110138, r=notriddle
fix(doc): do not parse inline when output is json for external crate relative rust-lang#110138
2 parents 75a4625 + c127020 commit a996418

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

src/librustdoc/clean/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,8 @@ fn clean_extern_crate<'tcx>(
23812381
Some(l) => attr::list_contains_name(&l, sym::inline),
23822382
None => false,
23832383
}
2384-
});
2384+
})
2385+
&& !cx.output_format.is_json();
23852386

23862387
let krate_owner_def_id = krate.owner_id.to_def_id();
23872388
if please_inline {

src/librustdoc/clean/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ impl Variant {
20192019

20202020
#[derive(Clone, Debug)]
20212021
pub(crate) struct Discriminant {
2022-
// In the case of cross crate re-exports, we don't have the nessesary information
2022+
// In the case of cross crate re-exports, we don't have the necessary information
20232023
// to reconstruct the expression of the discriminant, only the value.
20242024
pub(super) expr: Option<BodyId>,
20252025
pub(super) value: DefId,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub enum O {
2+
L = -1,
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// check-pass
2+
// aux-build: inner-crate-enum.rs
3+
// compile-flags:-Z unstable-options --output-format json
4+
5+
#[doc(inline)]
6+
pub extern crate inner_crate_enum;
7+
8+
fn main() {}

0 commit comments

Comments
 (0)