rust/tests
bors c86f3ac24f Auto merge of #120717 - compiler-errors:cap-closure-kind, r=oli-obk
For async closures, cap closure kind, get rid of `by_mut_body`

Right now we have three `AsyncFn*` traits, and three corresponding futures that are returned by the `call_*` functions for them. This is fine, but it is a bit excessive, since the future returned by `AsyncFn` and `AsyncFnMut` are identical. Really, the only distinction we need to make with these bodies is "by ref" and "by move".

This PR removes `AsyncFn::CallFuture` and renames `AsyncFnMut::CallMutFuture` to `AsyncFnMut::CallRefFuture`. This simplifies MIR building for async closures, since we don't need to build an extra "by mut" body, but just a "by move" body which is materially different.

We need to do a bit of delicate handling of the ClosureKind for async closures, since we need to "cap" it to `AsyncFnMut` in some cases when we only care about what body we're looking for.

This also fixes a bug where `<{async closure} as Fn>::call` was returning a body that takes the async-closure receiver *by move*.

This also helps align the `AsyncFn` traits to the `LendingFn` traits' eventual designs.
2024-03-20 11:40:45 +00:00
..
assembly Rollup merge of #121953 - jhorstmann:assembly-tests-for-masked-simd-instructions, r=workingjubilee 2024-03-12 09:03:59 -07:00
auxiliary
codegen Auto merge of #122375 - rcvalle:rust-cfi-break-tests-into-smaller-files, r=compiler-errors 2024-03-19 02:17:52 +00:00
codegen-units [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
coverage coverage: Enable branch coverage in the branch coverage tests 2024-03-14 17:19:06 +11:00
coverage-run-rustdoc [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
debuginfo Auto merge of #121885 - reitermarkus:generic-nonzero-inner, r=oli-obk,wesleywiser 2024-03-17 02:27:52 +00:00
incremental Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
mir-opt Fix ABI for FnMut/Fn impls for async closures 2024-03-19 16:59:24 -04:00
pretty Re-bless tests/pretty 2024-02-22 16:04:05 +00:00
run-make Update the minimum external LLVM to 17 2024-03-17 10:11:04 -07:00
run-make-fulldeps Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
run-pass-valgrind Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
rustdoc tests 2024-03-14 14:51:01 +01:00
rustdoc-gui [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-js Rollup merge of #122247 - notriddle:notriddle/search-unbox-limit, r=GuillaumeGomez 2024-03-14 15:44:32 +01:00
rustdoc-js-std rustdoc-search: add search query syntax Fn(T) -> U 2024-03-11 22:27:22 -07:00
rustdoc-json [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-ui Auto merge of #122029 - estebank:drive-by-ui-test, r=oli-obk 2024-03-19 22:11:59 +00:00
ui Auto merge of #120717 - compiler-errors:cap-closure-kind, r=oli-obk 2024-03-20 11:40:45 +00:00
ui-fulldeps Rollup merge of #122405 - celinval:smir-new-const, r=oli-obk 2024-03-14 11:09:58 +01:00
COMPILER_TESTS.md