about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorOliver Middleton <olliemail27@gmail.com>2020-01-20 18:14:51 +0000
committerOliver Middleton <olliemail27@gmail.com>2020-01-20 18:14:51 +0000
commit3e0bfe1238e26ce57c2201172f0a4bb7cfbbba0a (patch)
tree61b2f411fe890e968f420581a2686b37b82f0ed5 /src/test
parent900811e43047fc5593f39b0363373530b02c87e0 (diff)
rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`s
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc/async-fn.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/rustdoc/async-fn.rs b/src/test/rustdoc/async-fn.rs
index 5f9708a3972..5a03e821e8a 100644
--- a/src/test/rustdoc/async-fn.rs
+++ b/src/test/rustdoc/async-fn.rs
@@ -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() {}
 }