]> git.lizzy.rs Git - rust.git/blobdiff - src/test/rustdoc/async-fn.rs
Rollup merge of #68945 - mjbshaw:once_is_completed, r=LukasKalbertodt
[rust.git] / src / test / rustdoc / async-fn.rs
index 5f9708a39722a6532521e8df3cd95d9d29fbcb13..5a03e821e8a2ff637b7adbc2117dd987652ba04a 100644 (file)
@@ -15,6 +15,11 @@ pub async fn baz<T>(a: T) -> T {
     a
 }
 
+// @has async_fn/fn.qux.html '//pre[@class="rust fn"]' 'pub async unsafe fn qux() -> char'
+pub async unsafe fn qux() -> char {
+    '⚠'
+}
+
 trait Bar {}
 
 impl Bar for () {}
@@ -26,8 +31,10 @@ pub async fn quux() -> impl Bar {
 
 // @has async_fn/struct.Foo.html
 // @matches - '//code' 'pub async fn f\(\)$'
+// @matches - '//code' 'pub async unsafe fn g\(\)$'
 pub struct Foo;
 
 impl Foo {
     pub async fn f() {}
+    pub async unsafe fn g() {}
 }