about summary refs log tree commit diff
path: root/tests/ui/async-await/async-fn
AgeCommit message (Collapse)AuthorLines
2025-09-10Restore the test intention of several MBE trait bound modifier testsLeón Orell Valerian Liehr-12/+13
2025-08-22On E0277, point at type that doesn't implement boundEsteban Küber-1/+5
When encountering an unmet trait bound, point at local type that doesn't implement the trait: ``` error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied --> $DIR/issue-64855.rs:9:19 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `Foo` is not implemented for `Bar<T>` --> $DIR/issue-64855.rs:9:1 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^ ```
2025-07-05Rename tests named with `mbe` to use `macro` insteadJosh Triplett-4/+4
Most macro tests use `macro` in the name, making it easy to find and run tests relevant to macros. However, a few use `mbe` instead. Rename those to say `macro`.
2025-06-30Unconditionally run `check_item_type` on all itemsOli Scherer-8/+8
2025-05-26Add missing edition directives for async-await testsLukas Wirth-4/+6
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-1/+4
2025-02-25Don't suggest constraining unstable associated typesMichael Goulet-0/+29
2025-01-26Compiler: Finalize dyn compatibility renamingLeón Orell Valerian Liehr-1/+1
2025-01-22Refactor dyn-compatibility error and suggestionsTaylor Cramer-9/+6
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc #132713 cc #133267
2024-12-13Stabilize async closuresMichael Goulet-35/+5
2024-12-05Stabilize noop_wakerEric Holk-1/+1
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
2024-12-02Gate async fn trait bound modifier on async_trait_boundsMichael Goulet-26/+26
2024-12-02Move tests back to using AsyncFnMichael Goulet-5/+7
2024-11-30Do not create trait object type if missing associated typesMichael Goulet-51/+2
2024-11-22Stabilize the 2024 editionEric Huss-2/+2
2024-11-03use backticks instead of single quotes when reporting "use of unstable ↵dianne-4/+4
library feature" This is consistent with all other diagnostics I could find containing features and enables the use of `DiagSymbolList` for generalizing diagnostics for unstable library features to multiple features.
2024-10-04Bless ui tests.Camille GILLOT-4/+4
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-4/+4
2024-08-19Fix wrong argument for `get_fn_decl`Wafarm-0/+43
2024-07-25Rollup merge of #127054 - compiler-errors:bound-ordering, r=fmeaseMatthias Krüger-1/+1
Reorder trait bound modifiers *after* `for<...>` binder in trait bounds This PR suggests changing the grammar of trait bounds from: ``` [CONSTNESS] [ASYNCNESS] [?] [BINDER] [TRAIT_PATH] const async ? for<'a> Sized ``` to ``` ([BINDER] [CONSTNESS] [ASYNCNESS] | [?]) [TRAIT_PATH] ``` i.e., either ``` ? Sized ``` or ``` for<'a> const async Sized ``` (but not both) ### Why? I think it's strange that the binder applies "more tightly" than the `?` trait polarity. This becomes even weirder when considering that we (or at least, I) want to have `async` trait bounds expressed like: ``` where T: for<'a> async Fn(&'a ()) -> i32, ``` and not: ``` where T: async for<'a> Fn(&'a ()) -> i32, ``` ### Fallout No crates on crater use this syntax, presumably because it's literally useless. This will require modifying the reference grammar, though. ### Alternatives If this is not desirable, then we can alternatively keep parsing `for<'a>` after the `?` but deprecate it with either an FCW (or an immediate hard error), and begin parsing `for<'a>` *before* the `?`.
2024-07-23Gate AsyncFn* under async_closure featureMichael Goulet-2/+24
2024-07-10Reorder modifiers and polarity to be *after* binder in trait boundsMichael Goulet-1/+1
2024-05-29Use parenthetical notation for `Fn` traitsEsteban Küber-1/+1
Always use the `Fn(T) -> R` format when printing closure traits instead of `Fn<(T,), Output = R>`. Fix #67100: ``` error[E0277]: expected a `Fn()` closure, found `F` --> file.rs:6:13 | 6 | call_fn(f) | ------- ^ expected an `Fn()` closure, found `F` | | | required by a bound introduced by this call | = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `call_fn` --> file.rs:1:15 | 1 | fn call_fn<F: Fn() -> ()>(f: &F) { | ^^^^^^^^^^ required by this bound in `call_fn` help: consider further restricting this bound | 5 | fn call_any<F: std::any::Any + Fn()>(f: &F) { | ++++++ ```
2024-03-19Only split by-ref/by-move futures for async closuresMichael Goulet-55/+5
2024-03-10Ignore tests w/ current/next revisions from compare-mode=next-solverMichael Goulet-0/+2
2024-02-27Flesh out a few more testsMichael Goulet-0/+12
2024-02-27Also support `fnptr(): async Fn` in codegenMichael Goulet-0/+31
2024-02-21Rollup merge of #121044 - compiler-errors:mbe-async-trait-bounds, r=fmeaseLeón Orell Valerian Liehr-4/+141
Support async trait bounds in macros r? fmease This is similar to your work on const trait bounds. This theoretically regresses `impl async $ident:ident` in macros, but I doubt this is occurring in practice.
2024-02-20Support async trait bounds in macrosMichael Goulet-4/+141
2024-02-20Fix stray trait mismatch in resolve_associated_item for AsyncFnMichael Goulet-1/+26
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-12/+12
2024-02-08Prefer AsyncFn* over Fn* for coroutine-closuresMichael Goulet-0/+24
2024-02-06Regular closures now built-in impls for AsyncFn*Michael Goulet-1/+1
2024-01-31Error on incorrect item kind in async boundMichael Goulet-0/+47
2024-01-31Better error message in ed 2015Michael Goulet-21/+51
2024-01-31Add testsMichael Goulet-0/+183
2024-01-31Add async bound modifier to enable async Fn boundsMichael Goulet-0/+14
2023-12-25select AsyncFn traits during overloaded call opMichael Goulet-1/+1
2023-12-25Add AsyncFn family of traitsMichael Goulet-0/+16