about summary refs log tree commit diff
path: root/tests/ui/coroutine
AgeCommit message (Collapse)AuthorLines
2023-12-18Add a test demonstrating that RFC's note on diverging returns is subsumed by ↵Michael Goulet-0/+20
just inferring unit as ret type
2023-12-18Make sure all kinds of generators only return unitMichael Goulet-0/+52
2023-12-18Ensure `yield` expressions desugar correctly in async generatorsMichael Goulet-0/+17
2023-12-14Rollup merge of #118948 - compiler-errors:noop, r=eholkJubilee-19/+5
Use the `Waker::noop` API in tests Avoids the need to duplicate this code over and over again r? eholk
2023-12-14Use the Waker::noop API in testsMichael Goulet-19/+5
2023-12-14update use of feature flagslcnr-5/+5
2023-12-13Rollup merge of #118871 - tmiasko:coroutine-maybe-uninit-fields, ↵Matthias Krüger-0/+37
r=compiler-errors Coroutine variant fields can be uninitialized Wrap coroutine variant fields in MaybeUninit to indicate that they might be uninitialized. Otherwise an uninhabited field will make the entire variant uninhabited and introduce undefined behaviour. The analogous issue in the prefix of coroutine layout was addressed by 6fae7f807146e400fa2bbd1c44768d9bcaa57c4c.
2023-12-12Actually parse async gen blocks correctlyMichael Goulet-0/+14
2023-12-12Coroutine variant fields can be uninitializedTomasz Miąsko-0/+37
Wrap coroutine variant fields in MaybeUninit to indicate that they might be uninitialized. Otherwise an uninhabited field will make the entire variant uninhabited and introduce undefined behaviour. The analogous issue in the prefix of coroutine layout was addressed by 6fae7f807146e400fa2bbd1c44768d9bcaa57c4c.
2023-12-10remove redundant importssurechen-5/+2
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-12-08Make async generators fused by defaultMichael Goulet-0/+4
2023-12-08Add testsMichael Goulet-10/+132
2023-12-08Support async gen fnMichael Goulet-13/+7
2023-12-04Address code review feedbackEric Holk-0/+19
2023-12-04Merge Async and Gen into CoroutineKindEric Holk-0/+2
2023-12-04Add a basic test for gen fnEric Holk-0/+18
2023-12-04Make async gen fn an errorEric Holk-0/+19
2023-12-04gate gen fn behind gen_blocksEric Holk-3/+5
2023-11-28Fix coroutine validation for mixed panic strategyTomasz Miąsko-0/+24
Validation introduced in #113124 allows UnwindAction::Continue and TerminatorKind::Resume to occur only in functions with ABI that can unwind. The function ABI depends on the panic strategy, which can vary across crates. Usually MIR is built and validated in the same crate. The coroutine drop glue thus far was an exception. As a result validation could fail when mixing different panic strategies. Avoid the problem by executing AbortUnwindingCalls along with the validation.
2023-11-24Manual find replace updatesNilstrieb-1/+1
2023-11-24Show number in error message even for one errorNilstrieb-36/+36
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-22Allow defining opaques in check_coroutine_obligationsMichael Goulet-0/+17
2023-11-17Rollup merge of #117338 - workingjubilee:asmjs-meets-thanatos, r=b-naberMatthias Krüger-2/+0
Remove asmjs Fulfills [MCP 668](https://github.com/rust-lang/compiler-team/issues/668). `asmjs-unknown-emscripten` does not work as-specified, and lacks essential upstream support for generating asm.js, so it should not exist at all.
2023-11-13rename `ReLateBound` to `ReBound`lcnr-1/+1
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-11-08generator layout: ignore fake borrowslcnr-0/+34
2023-11-02dropck_outlives check generator witness needs_droplcnr-37/+10
2023-10-30Only run panic tests on targets that can unwindOli Scherer-1/+2
2023-10-30Add a custom panic message for resuming `gen` blocks after they panickedOli Scherer-0/+37
2023-10-30Talk about `gen fn` in diagnostics about `gen fn`Oli Scherer-3/+3
2023-10-28Remove asmjs from testsJubilee Young-2/+0
2023-10-27Fuse `gen` blocksOli Scherer-19/+2
2023-10-27Use targetted diagnostic for borrow across yield errorOli Scherer-2/+2
2023-10-27Prevent generators from being movableOli Scherer-0/+28
2023-10-27Handle `move` generatorsOli Scherer-0/+98
2023-10-27Feature gate coroutine `yield` usageOli Scherer-5/+25
2023-10-27Demonstrate issue with `yield` checksOli Scherer-2/+15
2023-10-27Feature gate `gen` blocks, even in 2024 editionOli Scherer-5/+5
2023-10-27Basic generators workOli Scherer-0/+18
2023-10-27Make `gen` blocks implement the `Iterator` traitOli Scherer-0/+78
2023-10-27Add gen blocks to ast and do some broken ast loweringOli Scherer-10/+10
2023-10-26Reserve `gen` keyword for `gen {}` blocks and `gen fn` in 2024 editionOli Scherer-0/+78
2023-10-20Rename `generator` folderOli Scherer-0/+5490