rust/tests/ui/async-await
bors f2299490c1 Auto merge of #108106 - the8472:layout-opt, r=wesleywiser
Improve niche placement by trying two strategies and picking the better result

Fixes #104807
Fixes #105371

Determining which sort order is better requires calculating the struct size (so we can calculate the niche offset). But that in turn depends on the field order, so happens after sorting. So the simple way to solve that is to run the whole thing twice and pick the better result.

1st commit is just code motion, the meat is in the later ones.
2023-04-29 08:55:04 +00:00
..
auxiliary Add test 2023-01-19 15:46:08 +00:00
await-keyword
drop-order
future-sizes bless tests 2023-04-27 22:29:04 +02:00
in-trait Don't duplicate anonymous lifetimes for async fn in traits 2023-04-28 20:21:03 +00:00
issues Add regression test for #107280 2023-03-01 21:58:27 +09:00
multiple-lifetimes Label opaque type for 'captures lifetime' error message 2023-03-03 05:02:34 +00:00
return-type-notation Don't duplicate anonymous lifetimes for async fn in traits 2023-04-28 20:21:03 +00:00
track-caller Remove identity_future indirection 2023-03-08 15:37:14 +01:00
argument-patterns.rs
async-assoc-fn-anon-lifetimes.rs
async-await-let-else.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
async-await-let-else.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
async-await-let-else.drop-tracking.stderr
async-await-let-else.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
async-await-let-else.no-drop-tracking.stderr
async-await-let-else.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
async-await.rs
async-block-control-flow-static-semantics.rs
async-block-control-flow-static-semantics.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
async-borrowck-escaping-block-error.fixed
async-borrowck-escaping-block-error.rs
async-borrowck-escaping-block-error.stderr
async-borrowck-escaping-closure-error.rs
async-borrowck-escaping-closure-error.stderr
async-closure-matches-expr.rs
async-closure.rs
async-error-span.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
async-error-span.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
async-error-span.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
async-error-span.rs Bless tests. 2023-01-27 20:10:17 +00:00
async-fn-elided-impl-lifetime-parameter.rs
async-fn-nonsend.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
async-fn-nonsend.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
async-fn-nonsend.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
async-fn-nonsend.rs Bless tests. 2023-01-27 20:10:17 +00:00
async-fn-nonsend.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
async-fn-path-elision.rs
async-fn-path-elision.stderr Introduce ReError 2023-02-09 10:26:49 +00:00
async-fn-send-uses-nonsend.rs
async-fn-size-moved-locals.rs
async-fn-size-uninit-locals.rs
async-fn-size.rs
async-is-unwindsafe.rs
async-is-unwindsafe.stderr
async-matches-expr.rs
async-trait-fn.current.stderr Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests 2023-03-17 16:01:53 -03:00
async-trait-fn.next.stderr Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests 2023-03-17 16:01:53 -03:00
async-trait-fn.rs Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests 2023-03-17 16:01:53 -03:00
async-trait-fn.stderr Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests 2023-03-17 16:01:53 -03:00
async-unsafe-fn-call-in-safe.mir.stderr
async-unsafe-fn-call-in-safe.rs
async-unsafe-fn-call-in-safe.thir.stderr
async-with-closure.rs
await-into-future.rs
await-sequence.rs Add a test case for #102383 2023-01-12 11:58:24 -08:00
await-unsize.rs
bound-normalization.rs
conditional-and-guaranteed-initialization.rs
default-struct-update.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
dont-print-desugared-async.rs
dont-print-desugared-async.stderr
dont-suggest-await-on-method-return-mismatch.rs
dont-suggest-await-on-method-return-mismatch.stderr
dont-suggest-missing-await.rs
dont-suggest-missing-await.stderr fix: improve the suggestion on future not awaited 2023-02-13 16:23:23 +01:00
drop-and-assign.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-track-bad-field-in-fru.rs
drop-track-bad-field-in-fru.stderr
drop-track-field-assign-nonsend.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
drop-track-field-assign-nonsend.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-track-field-assign-nonsend.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-track-field-assign-nonsend.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-track-field-assign.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-tracking-unresolved-typeck-results.rs
drop-tracking-unresolved-typeck-results.stderr
edition-deny-async-fns-2015.current.stderr Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests 2023-03-17 16:01:53 -03:00
edition-deny-async-fns-2015.next.stderr Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests 2023-03-17 16:01:53 -03:00
edition-deny-async-fns-2015.rs Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests 2023-03-17 16:01:53 -03:00
expansion-in-attrs.rs
feature-async-closure.rs
feature-async-closure.stderr
feature-gate-async_fn_in_trait.rs
feature-gate-async_fn_in_trait.stderr
feature-self-return-type.rs
feature-self-return-type.stderr Extend and use hir::Node::body_id 2023-04-19 19:13:45 +00:00
field-assign-nonsend.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
field-assign-nonsend.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
field-assign-nonsend.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
field-assign-nonsend.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
field-assign.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
futures-api.rs
generator-desc.rs
generator-desc.stderr Remove identity_future indirection 2023-03-08 15:37:14 +01:00
generator-not-future.rs
generator-not-future.stderr
generics-and-bounds.rs
incorrect-move-async-order-issue-79694.fixed
incorrect-move-async-order-issue-79694.rs
incorrect-move-async-order-issue-79694.stderr
interior-with-const-generic-expr.rs
issue-54239-private-type-triggers-lint.rs
issue-60709.rs
issue-61076.rs fix: improve the suggestion on future not awaited 2023-02-13 16:23:23 +01:00
issue-61076.stderr fix: improve the suggestion on future not awaited 2023-02-13 16:23:23 +01:00
issue-61452.rs
issue-61452.stderr
issue-61793.rs
issue-61949-self-return-type.rs
issue-61949-self-return-type.stderr Extend and use hir::Node::body_id 2023-04-19 19:13:45 +00:00
issue-62658.rs
issue-63832-await-short-temporary-lifetime-1.rs
issue-63832-await-short-temporary-lifetime.rs
issue-64130-1-sync.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-1-sync.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-1-sync.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-1-sync.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-1-sync.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-64130-2-send.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-2-send.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-2-send.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-2-send.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-2-send.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-64130-3-other.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-3-other.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-3-other.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-3-other.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-3-other.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-64130-4-async-move.drop-tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-64130-4-async-move.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-4-async-move.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-64130-non-send-future-diags.rs
issue-64130-non-send-future-diags.stderr
issue-64391.rs
issue-66312.rs
issue-66312.stderr
issue-66387-if-without-else.rs
issue-66387-if-without-else.stderr
issue-67252-unnamed-future.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-67252-unnamed-future.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-67252-unnamed-future.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-67252-unnamed-future.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-67651.rs
issue-67651.stderr
issue-67765-async-diagnostic.rs
issue-67765-async-diagnostic.stderr
issue-68112.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-68112.drop_tracking.stderr Add rustc_on_unimplemented on Sync for cell types 2023-01-19 21:09:25 +01:00
issue-68112.no_drop_tracking.stderr Add rustc_on_unimplemented on Sync for cell types 2023-01-19 21:09:25 +01:00
issue-68112.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-68523-start.rs
issue-68523-start.stderr
issue-68523.rs
issue-68523.stderr
issue-69446-fnmut-capture.rs
issue-69446-fnmut-capture.stderr
issue-70594.rs
issue-70594.stderr
issue-70818.drop_tracking_mir.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-70818.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-70818.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-70818.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-70818.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-70935-complex-spans.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-70935-complex-spans.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-70935-complex-spans.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-70935-complex-spans.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-71137.rs
issue-71137.stderr
issue-72442.rs
issue-72442.stderr
issue-72470-llvm-dominate.rs
issue-72590-type-error-sized.rs
issue-72590-type-error-sized.stderr
issue-73050.rs
issue-73137.rs
issue-73541-1.rs
issue-73541-1.stderr
issue-73541-2.rs
issue-73541-2.stderr
issue-73541-3.rs
issue-73541-3.stderr
issue-73541.rs
issue-73541.stderr
issue-73741-type-err-drop-tracking.drop_tracking_mir.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-73741-type-err-drop-tracking.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-73741-type-err-drop-tracking.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-73741-type-err-drop-tracking.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-73741-type-err-drop-tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-73741-type-err.rs
issue-73741-type-err.stderr
issue-74047.rs
issue-74047.stderr Make missing impl item suggestions more obvious that they're missing 2023-04-19 17:57:37 +00:00
issue-74072-lifetime-name-annotations.rs
issue-74072-lifetime-name-annotations.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-74497-lifetime-in-opaque.rs
issue-74497-lifetime-in-opaque.stderr
issue-75785-confusing-named-region.rs
issue-75785-confusing-named-region.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-76547.rs
issue-76547.stderr
issue-77993-2.rs
issue-77993-2.stderr
issue-84841.rs
issue-84841.stderr
issue-86507.drop_tracking_mir.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-86507.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-86507.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-86507.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-93197.rs
issue-93648.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-98634.rs Tweak E0271 wording 2023-01-30 21:51:35 +00:00
issue-98634.stderr fix: improve the suggestion on future not awaited 2023-02-13 16:23:23 +01:00
issue-101715.rs
issue-101715.stderr
issue-105501.rs
issue-107036.rs Add test 2023-01-19 15:46:08 +00:00
issue-108572.rs feat: impl better help for .poll() not found on impl Future 2023-03-05 09:34:00 +13:00
issue-108572.stderr feat: impl better help for .poll() not found on impl Future 2023-03-05 09:34:00 +13:00
large_moves.attribute.stderr Remove identity_future indirection 2023-03-08 15:37:14 +01:00
large_moves.option.stderr Remove identity_future indirection 2023-03-08 15:37:14 +01:00
large_moves.rs Remove identity_future indirection 2023-03-08 15:37:14 +01:00
missed-capture-issue-107414.rs Add test 2023-04-03 20:45:02 +02:00
move-part-await-return-rest-struct.rs
move-part-await-return-rest-tuple.rs
mutually-recursive-async-impl-trait-type.drop_tracking_mir.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
mutually-recursive-async-impl-trait-type.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
mutually-recursive-async-impl-trait-type.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
mutually-recursive-async-impl-trait-type.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
mutually-recursive-async-impl-trait-type.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
nested-in-impl.rs
no-async-const.rs
no-async-const.stderr
no-const-async.rs Remove identity_future indirection 2023-03-08 15:37:14 +01:00
no-const-async.stderr Remove identity_future indirection 2023-03-08 15:37:14 +01:00
no-move-across-await-struct.rs
no-move-across-await-struct.stderr
no-move-across-await-tuple.rs
no-move-across-await-tuple.stderr
no-non-guaranteed-initialization.rs
no-non-guaranteed-initialization.stderr
no-params-non-move-async-closure.rs
no-params-non-move-async-closure.stderr
no-std.rs
no-unsafe-async.rs
no-unsafe-async.stderr
non-trivial-drop.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
partial-drop-partial-reinit.drop_tracking.stderr
partial-drop-partial-reinit.no_drop_tracking.stderr
partial-drop-partial-reinit.rs
partial-initialization-across-await.rs
partial-initialization-across-await.stderr
pin-needed-to-poll-2.rs
pin-needed-to-poll-2.stderr Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented 2023-04-12 18:03:11 -04:00
pin-needed-to-poll.rs
pin-needed-to-poll.stderr
proper-span-for-type-error.fixed
proper-span-for-type-error.rs
proper-span-for-type-error.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
recursive-async-impl-trait-type.drop_tracking_mir.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
recursive-async-impl-trait-type.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
recursive-async-impl-trait-type.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
recursive-async-impl-trait-type.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
recursive-async-impl-trait-type.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
repeat_count_const_in_async_fn.rs
return-ty-raw-ptr-coercion.rs
return-ty-unsize-coercion.rs
send-bound-async-closure.rs Bless tests. 2023-01-27 20:10:17 +00:00
suggest-missing-await-closure.fixed
suggest-missing-await-closure.rs
suggest-missing-await-closure.stderr fix: improve the suggestion on future not awaited 2023-02-13 16:23:23 +01:00
suggest-missing-await.rs
suggest-missing-await.stderr fix: improve the suggestion on future not awaited 2023-02-13 16:23:23 +01:00
suggest-switching-edition-on-await-cargo.rs
suggest-switching-edition-on-await-cargo.stderr
suggest-switching-edition-on-await.rs
suggest-switching-edition-on-await.stderr
task-context-arg.rs Preserve argument indexes when inlining MIR 2023-04-11 11:07:48 +10:00
try-on-option-in-async.rs
try-on-option-in-async.stderr
type-parameter-send.rs
unnecessary-await.rs
unnecessary-await.stderr
unreachable-lint-1.rs
unreachable-lint-1.stderr
unreachable-lint.rs
unresolved_type_param.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
unresolved_type_param.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
unresolved_type_param.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
unresolved_type_param.rs Bless tests. 2023-01-27 20:10:17 +00:00
unresolved_type_param.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
unused-lifetime.rs
unused-lifetime.stderr