Skip to content

Commit

Permalink
Move test from rustdoc-ui to rustdoc-json
Browse files Browse the repository at this point in the history
  • Loading branch information
aDotInTheVoid committed Apr 14, 2023
1 parent 3e565f1 commit e3de409
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 e3de409

Please sign in to comment.