summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-03-03 18:44:02 +0000
committerMichael Goulet <michael@errs.io>2025-03-15 18:13:27 +0000
commite3ac1fa81abd321abe193f491ed06c7d388f68fe (patch)
treef3c465579965ba4d01cef6aa639e8844e1a265a2 /tests/rustdoc
parent4d30011f6c616be074ba655a75e5d55441232bbb (diff)
downloadrust-e3ac1fa81abd321abe193f491ed06c7d388f68fe.tar.gz
rust-e3ac1fa81abd321abe193f491ed06c7d388f68fe.zip
Add RTN support to rustdoc
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/return-type-notation.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/rustdoc/return-type-notation.rs b/tests/rustdoc/return-type-notation.rs
new file mode 100644
index 00000000000..405e98eb28d
--- /dev/null
+++ b/tests/rustdoc/return-type-notation.rs
@@ -0,0 +1,18 @@
+//@ edition: 2021
+
+#![crate_type = "lib"]
+#![feature(return_type_notation)]
+
+pub trait Foo {
+    async fn bar();
+}
+
+//@ has "return_type_notation/fn.foo.html"
+//@ has - '//pre[@class="rust item-decl"]' "pub fn foo<T: Foo<bar(..): Send>>()"
+//@ has - '//pre[@class="rust item-decl"]' "where <T as Foo>::bar(..): 'static, T::bar(..): Sync"
+pub fn foo<T: Foo<bar(..): Send>>()
+where
+    <T as Foo>::bar(..): 'static,
+    T::bar(..): Sync,
+{
+}