diff options
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, +{ +} |
