diff options
| author | bors <bors@rust-lang.org> | 2024-11-06 16:22:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-06 16:22:16 +0000 |
| commit | 116fc31c5c82b7767c87101164a1afa3faea97fd (patch) | |
| tree | 9c9b4acc92af6c1e03d5c51f05e771d9ce3425cc /tests | |
| parent | 4d215e2426d52ca8d1af166d5f6b5e172afbff67 (diff) | |
| parent | 7d8ca6d4fc650535480dda4faffa8078e2b1206c (diff) | |
| download | rust-116fc31c5c82b7767c87101164a1afa3faea97fd.tar.gz rust-116fc31c5c82b7767c87101164a1afa3faea97fd.zip | |
Auto merge of #132697 - compiler-errors:async-closure-sugar, r=fmease
Clean middle generics using paren sugar if trait has `#[rustc_paren_sugar]` That is to say, generalize the `Fn()` paren sugar handling to *any* trait that is marked with `rustc_paren_sugar`. This means that `AsyncFn` is also covered here. r? fmease
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs | 1 | ||||
| -rw-r--r-- | tests/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs b/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs index 346f7120b5b..d301c355994 100644 --- a/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs +++ b/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs @@ -22,6 +22,7 @@ extern crate assoc_item_trait_bounds as aux; //@ has - '//*[@id="associatedtype.Out12"]' "type Out12: for<'w> Helper<B<'w> = Cow<'w, str>, A<'w> = bool>" //@ has - '//*[@id="associatedtype.Out13"]' "type Out13: for<'fst, 'snd> Aid<'snd, Result<'fst> = &'fst mut str>" //@ has - '//*[@id="associatedtype.Out14"]' "type Out14<P: Copy + Eq, Q: ?Sized>" +//@ has - '//*[@id="associatedtype.Out15"]' "type Out15: AsyncFnMut(i32) -> bool" // // Snapshots: // Check that we don't render any where-clauses for the following associated types since diff --git a/tests/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs b/tests/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs index 551e97a2fa9..56708ec9310 100644 --- a/tests/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs +++ b/tests/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs @@ -1,3 +1,7 @@ +#![feature(async_closure)] + +use std::ops::AsyncFnMut; + pub trait Main { type Item; @@ -16,6 +20,7 @@ pub trait Main { type Out12: for<'w> Helper<B<'w> = std::borrow::Cow<'w, str>, A<'w> = bool>; type Out13: for<'fst, 'snd> Aid<'snd, Result<'fst> = &'fst mut str>; type Out14<P: Copy + Eq, Q: ?Sized>; + type Out15: AsyncFnMut(i32) -> bool; fn make<F>(_: F, _: impl FnMut(&str) -> bool) where |
