From 916cfbcd3ed95a737b5a62103bbc4118ffe1eb2b Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 10 Jan 2025 14:32:29 -0700 Subject: rustdoc: use import stability marker in display --- tests/rustdoc/inline_local/staged-inline.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/rustdoc/inline_local/staged-inline.rs (limited to 'tests/rustdoc') diff --git a/tests/rustdoc/inline_local/staged-inline.rs b/tests/rustdoc/inline_local/staged-inline.rs new file mode 100644 index 00000000000..f2131ad5f94 --- /dev/null +++ b/tests/rustdoc/inline_local/staged-inline.rs @@ -0,0 +1,18 @@ +// https://github.com/rust-lang/rust/issues/135078 +#![crate_name = "foo"] +#![feature(staged_api)] +#![stable(feature = "v1", since="1.0.0")] + +#[stable(feature = "v1", since="1.0.0")] +pub mod ffi { + #[stable(feature = "core_ffi", since="1.99.0")] + //@ has "foo/ffi/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.99.0" + //@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.0.0" + pub struct CStr; +} + +#[stable(feature = "v1", since = "1.0.0")] +#[doc(inline)] +//@ has "foo/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.0.0" +//@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.99.0" +pub use ffi::CStr; -- cgit 1.4.1-3-g733a5