mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #110329 - aDotInTheVoid:json-inline-again, r=jyn514
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
This commit is contained in:
commit
a1d47188a7
@ -0,0 +1,6 @@
|
||||
//! Should not be inlined
|
||||
|
||||
/// Should not be inlined
|
||||
pub enum O {
|
||||
L = -1,
|
||||
}
|
10
tests/rustdoc-json/reexport/doc_inline_external_crate.rs
Normal file
10
tests/rustdoc-json/reexport/doc_inline_external_crate.rs
Normal file
@ -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
tests/rustdoc-json/reexport/extern_crate_glob.rs
Normal file
10
tests/rustdoc-json/reexport/extern_crate_glob.rs
Normal file
@ -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
|
@ -1,3 +0,0 @@
|
||||
pub enum O {
|
||||
L = -1,
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
// check-pass
|
||||
// aux-build: inner-crate-enum.rs
|
||||
// compile-flags:-Z unstable-options --output-format json
|
||||
|
||||
#[doc(inline)]
|
||||
pub extern crate inner_crate_enum;
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user