about summary refs log tree commit diff
path: root/src/test/ui/async-await
AgeCommit message (Collapse)AuthorLines
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-10/+6
2020-04-01Hide `task_context` when lowering bodyJonas Schievink-0/+56
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-4/+5
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
2020-03-24Add test for #66312Tyler Mandry-0/+26
Closes #66312. This issue was fixed by #68884.
2020-03-24save/restore `pessimistic_yield` when entering bodiesNiko Matsakis-0/+23
This flag is used to make the execution order around `+=` operators pessimistic. Failure to save/restore the flag was causing independent async blocks to effect one another, leading to strange ICEs and failed assumptions.
2020-03-23Update testsJohn Kåre Alsaker-73/+148
2020-03-21Rollup merge of #69033 - jonas-schievink:resume-with-context, r=tmandryMazdak Farrokhzad-2/+15
Use generator resume arguments in the async/await lowering This removes the TLS requirement from async/await and enables it in `#![no_std]` crates. Closes https://github.com/rust-lang/rust/issues/56974 I'm not confident the HIR lowering is completely correct, there seem to be quite a few undocumented invariants in there. The `async-std` and tokio test suites are passing with these changes though.
2020-03-18Rollup merge of #69837 - jonas-schievink:gen-discr-opt, r=tmandryMazdak Farrokhzad-17/+17
Use smaller discriminants for generators Closes https://github.com/rust-lang/rust/issues/69815 I'm not yet sure about the runtime performance impact of this, so I'll try running this on some benchmarks (if I can find any). (Update: No impact on the benchmarks I've measured on) * [x] Add test with a generator that has exactly 256 total states * [x] Add test with a generator that has more than 256 states so that it needs to use a u16 discriminant * [x] Add tests for the size of `Option<[generator]>` * [x] Add tests for the `discriminant_value` intrinsic in all cases
2020-03-17Test that async/await compiles with `#![no_std]`Jonas Schievink-0/+13
2020-03-17Make async/await lowering use resume argumentsJonas Schievink-2/+2
2020-03-15Rollup merge of #70011 - petrochenkov:asyncice, r=CentrilMazdak Farrokhzad-0/+13
def_collector: Fully visit async functions We forgot to visit attributes previously, it caused ICEs. Special treatment of async functions is also moved from `visit_item` to `visit_fn` to reuse more of the default visitor. Fixes https://github.com/rust-lang/rust/issues/67778.
2020-03-15def_collector: Fully visit async functionsVadim Petrochenkov-0/+13
2020-03-14Use smaller discriminants for generatorsJonas Schievink-17/+17
2020-03-12update testsMark Mansi-4/+4
2020-03-12Rollup merge of #69722 - estebank:negative-impl-span-ast, r=CentrilMazdak Farrokhzad-2/+2
Tweak output for invalid negative impl AST errors Use more accurate spans for negative `impl` errors. r? @Centril
2020-03-09Rollup merge of #69842 - JohnTitor:more-tests, r=CentrilMazdak Farrokhzad-0/+17
Add more regression tests Closes #54239 Closes #57200 Closes #57201 Closes #60473 Closes #64620 Closes #67166 r? @Centril
2020-03-09Add test for issue-54239Yuki Okushi-0/+17
2020-03-08Rollup merge of #69120 - spunit262:invalid-sugar-suggest, r=matthewjasperMazdak Farrokhzad-4/+1
Don't give invalid suggestion on desugared span.
2020-03-06Further tweak spans in ast validation errorsEsteban Küber-2/+2
2020-02-26Auto merge of #67742 - mark-i-m:describe-it, r=matthewjasperbors-4/+4
Generalized article_and_description r? @matthewjasper The logic of finding the right word and article to print seems to be repeated elsewhere... this is an experimental method to unify this logic...
2020-02-24parse: use `parse_item_common` in `parse_assoc_item_`.Mazdak Farrokhzad-0/+5
2020-02-22update some testsMark Mansi-4/+4
2020-02-14Fix tests after rebaseMatthew Jasper-1/+12
2020-02-14Update testsMatthew Jasper-10/+1
2020-02-13ast_validation: tweak diagnostic outputMazdak Farrokhzad-6/+6
2020-02-13parser: move `ban_async_in_2015` to `fn` parsing & improve it.Mazdak Farrokhzad-0/+36
2020-02-13parser: fuse free `fn` parsing together.Mazdak Farrokhzad-18/+14
2020-02-13IsAsync -> enum Async { Yes { span: Span, .. }, No }Mazdak Farrokhzad-3/+9
use new span for better diagnostics.
2020-02-12Don't give invalid suggestion on desugared span.spunit262-4/+1
2020-02-09--bless --compare-mode=nllMatthias Prechtl-1/+1
2020-02-06Rollup merge of #68524 - jonas-schievink:generator-resume-arguments, r=ZoxcDylan DPC-3/+3
Generator Resume Arguments cc https://github.com/rust-lang/rust/issues/43122 and https://github.com/rust-lang/rust/issues/56974 Blockers: * [x] Fix miscompilation when resume argument is live across a yield point (https://github.com/rust-lang/rust/pull/68524#issuecomment-578459069) * [x] Fix 10% compile time regression in `await-call-tree` benchmarks (https://github.com/rust-lang/rust/pull/68524#issuecomment-578487162) * [x] Fix remaining 1-3% regression (https://github.com/rust-lang/rust/pull/68524#issuecomment-579566255) - resolved (https://github.com/rust-lang/rust/pull/68524#issuecomment-581144901) * [x] Make dropck rules account for resume arguments (https://github.com/rust-lang/rust/pull/68524#issuecomment-578541137) Follow-up work: * Change async/await desugaring to make use of this feature * Rewrite [`box_region.rs`](https://github.com/rust-lang/rust/blob/3d8778d767f0dde6fe2bc9459f21ead8e124d8cb/src/librustc_data_structures/box_region.rs) to use resume arguments (this shows up in profiles too)
2020-02-05Fix testEsteban Küber-0/+2
2020-02-05Account for `fn()` types in lifetime suggestionsEsteban Küber-5/+3
2020-02-05Use spans for input borrowed types unrelated to return typeEsteban Küber-1/+5
2020-02-02Add a resume type parameter to `Generator`Jonas Schievink-3/+3
2020-02-02compiletest: error if `compile-fail` header in ui test.Tyler Lanphear-18/+12
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-4/+4
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-25Auto merge of #68269 - csmoe:temp, r=estebankbors-1/+43
Suggest to shorten temporary borrow from raw pointer Closes https://github.com/rust-lang/rust/issues/65436 r? @estebank cc @tmandry
2020-01-24Normalise notes with the/isvarkor-4/+4
2020-01-23Make pointers to statics internalMatthew Jasper-0/+33
2020-01-20Fix UI testMark Rousskov-31/+8
fmt::Formatter is still not Send/Sync, but the UI test emitted two errors, for the dyn Write and the Void inside Formatter. As of this PR, the Void is now gone, but the dyn Write remains.
2020-01-19update test ui for raw-ptr borrow inside generatorcsmoe-1/+43
2020-01-16When trait bounds are missing for return values, point at themEsteban Küber-2/+11
2020-01-16Rollup merge of #68096 - varkor:diagnostic-cleanup, r=CentrilDylan DPC-3/+3
Clean up some diagnostics by making them more consistent In general: - Diagnostic should start with a lowercase letter. - Diagnostics should not end with a full stop. - Ellipses contain three dots. - Backticks should encode Rust code. I also reworded a couple of messages to make them read more clearly. It might be sensible to create a style guide for diagnostics, so these informal conventions are written down somewhere, after which we could audit the existing diagnostics. r? @Centril
2020-01-15update async-await send/sync testcsmoe-0/+5
2020-01-12Diagnostics should not end with a full stopvarkor-3/+3
2020-01-10Rollup merge of #66463 - estebank:point-at-closure-and-opaque-types, r=CentrilMazdak Farrokhzad-0/+15
Point at opaque and closure type definitions in type errors Fixes #57266, fixes #67117.
2020-01-09Update testsVadim Petrochenkov-2/+43
2020-01-08review comment: wordingEsteban Küber-4/+4
2020-01-08Point at the def span of trait refs E0277Esteban Küber-0/+3