diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-03 18:44:02 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-15 18:13:27 +0000 |
| commit | e3ac1fa81abd321abe193f491ed06c7d388f68fe (patch) | |
| tree | f3c465579965ba4d01cef6aa639e8844e1a265a2 /tests/rustdoc | |
| parent | 4d30011f6c616be074ba655a75e5d55441232bbb (diff) | |
| download | rust-e3ac1fa81abd321abe193f491ed06c7d388f68fe.tar.gz rust-e3ac1fa81abd321abe193f491ed06c7d388f68fe.zip | |
Add RTN support to rustdoc
Diffstat (limited to 'tests/rustdoc')
| -rw-r--r-- | tests/rustdoc/return-type-notation.rs | 18 |
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, +{ +} |
