diff options
| author | Michael Goulet <michael@errs.io> | 2024-12-28 18:42:04 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-12-31 01:08:43 +0000 |
| commit | aac741a465a865576ce7ff0ddde4c16f1da64f62 (patch) | |
| tree | 6ec9a9837588671e1af9931d2992228519151cee /tests/rustdoc | |
| parent | 7f75bfa1ad4e9a9d33a179a90603001515e91991 (diff) | |
| download | rust-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.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/unsafe-binder.rs | 15 |
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!() } |
