about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-12-28 18:42:04 +0000
committerMichael Goulet <michael@errs.io>2024-12-31 01:08:43 +0000
commitaac741a465a865576ce7ff0ddde4c16f1da64f62 (patch)
tree6ec9a9837588671e1af9931d2992228519151cee /tests/rustdoc
parent7f75bfa1ad4e9a9d33a179a90603001515e91991 (diff)
downloadrust-aac741a465a865576ce7ff0ddde4c16f1da64f62.tar.gz
rust-aac741a465a865576ce7ff0ddde4c16f1da64f62.zip
Unsafe binder support in rustdoc
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/auxiliary/unsafe-binder-dep.rs4
-rw-r--r--tests/rustdoc/unsafe-binder.rs15
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/rustdoc/auxiliary/unsafe-binder-dep.rs b/tests/rustdoc/auxiliary/unsafe-binder-dep.rs
new file mode 100644
index 00000000000..65aa9032fed
--- /dev/null
+++ b/tests/rustdoc/auxiliary/unsafe-binder-dep.rs
@@ -0,0 +1,4 @@
+#![feature(unsafe_binders)]
+#![allow(incomplete_features)]
+
+pub fn woof() -> unsafe<'a> &'a str { todo!() }
diff --git a/tests/rustdoc/unsafe-binder.rs b/tests/rustdoc/unsafe-binder.rs
new file mode 100644
index 00000000000..621c3dadc72
--- /dev/null
+++ b/tests/rustdoc/unsafe-binder.rs
@@ -0,0 +1,15 @@
+//@ aux-build:unsafe-binder-dep.rs
+
+#![feature(unsafe_binders)]
+#![allow(incomplete_features)]
+
+extern crate unsafe_binder_dep;
+
+//@ has 'unsafe_binder/fn.woof.html' //pre "fn woof() -> unsafe<'a> &'a str"
+pub use unsafe_binder_dep::woof;
+
+//@ has 'unsafe_binder/fn.meow.html' //pre "fn meow() -> unsafe<'a> &'a str"
+pub fn meow() -> unsafe<'a> &'a str { todo!() }
+
+//@ has 'unsafe_binder/fn.meow_squared.html' //pre "fn meow_squared() -> unsafe<'b, 'a> &'a &'b str"
+pub fn meow_squared() -> unsafe<'b, 'a> &'a &'b str { todo!() }