summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2025-01-10 14:32:29 -0700
committerMichael Howell <michael@notriddle.com>2025-01-11 15:04:48 -0700
commit916cfbcd3ed95a737b5a62103bbc4118ffe1eb2b (patch)
tree19e7b4dd49fc7fe181599f462d19783577417e78 /tests/rustdoc
parent336209eef13882bd1e211b24779584cb7ef911eb (diff)
downloadrust-916cfbcd3ed95a737b5a62103bbc4118ffe1eb2b.tar.gz
rust-916cfbcd3ed95a737b5a62103bbc4118ffe1eb2b.zip
rustdoc: use import stability marker in display
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/inline_local/staged-inline.rs18
1 files changed, 18 insertions, 0 deletions
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;