Skip to content

Commit

Permalink
Rollup merge of #110329 - aDotInTheVoid:json-inline-again, r=jyn514
Browse files Browse the repository at this point in the history
Improve tests for #110138

These should live in rustdoc-json, not rustdoc-ui, so we can run assertions, and not just check there's no ICE

CC #100515, as we never document this suite

r? rustdoc
  • Loading branch information
jyn514 authored Apr 26, 2023
2 parents ce30232 + e3de409 commit a1d4718
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//! Should not be inlined
/// Should not be inlined
pub enum O {
L = -1,
}
10 changes: 10 additions & 0 deletions tests/rustdoc-json/reexport/doc_inline_external_crate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Regression Test for https://github.com/rust-lang/rust/issues/110138
// aux-build: enum_with_discriminant.rs

#[doc(inline)]
pub extern crate enum_with_discriminant;

// @!has '$.index[*][?(@.docs == "Should not be inlined")]'
// @is '$.index[*][?(@.name == "enum_with_discriminant")].kind' '"extern_crate"'
// @set enum_with_discriminant = '$.index[*][?(@.name == "enum_with_discriminant")].id'
// @is '$.index[*][?(@.name == "doc_inline_external_crate")].inner.items[*]' $enum_with_discriminant
10 changes: 10 additions & 0 deletions tests/rustdoc-json/reexport/extern_crate_glob.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// aux-build: enum_with_discriminant.rs

extern crate enum_with_discriminant;

#[doc(inline)]
pub use enum_with_discriminant::*;

// @!has '$.index[*][?(@.docs == "Should not be inlined")]'
// @set use = '$.index[*][?(@.inner.name == "enum_with_discriminant")].id'
// @is '$.index[*][?(@.name == "extern_crate_glob")].inner.items[*]' $use
3 changes: 0 additions & 3 deletions tests/rustdoc-ui/intra-doc/auxiliary/inner-crate-enum.rs

This file was deleted.

8 changes: 0 additions & 8 deletions tests/rustdoc-ui/intra-doc/inline-external-enum.rs

This file was deleted.

0 comments on commit a1d4718

Please sign in to comment.