summary refs log tree commit diff
path: root/src/test/ui/generator
AgeCommit message (Collapse)AuthorLines
2018-03-25Rollup merge of #49194 - Zoxc:unsafe-generator, r=cramertjkennytm-48/+20
Make resuming generators unsafe instead of the creation of immovable generators cc @withoutboats Fixes #47787
2018-03-21use subtyping when we create a closure instead of for upvar typesNiko Matsakis-3/+3
We used to make the upvar types in the closure `==` but that was stronger than we needed. Subtyping suffices, since we are copying the upvar value into the closure field. This in turn allows us to infer smaller lifetimes in captured values in some cases (like the example here), avoiding errors.
2018-03-21Make resuming generators unsafe instead of the creation of immovable ↵John Kåre Alsaker-48/+20
generators. Fixes #47787
2018-03-16Rollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebankkennytm-10/+8
Add crate name to "main function not found" error message. Fixes #44798 and rust-lang/cargo#4948. I was wondering if it might be cleaner to update the ui tests to add a simple `fn main() {}` for the unrelated tests. Let me know if you would prefer that.
2018-03-15Auto merge of #48138 - estebank:issue-45092, r=nikomatsakisbors-4/+4
Reword E0044 and message for `!Send` types - Reword E0044 help. - Change error message for types that don't implement `Send` CC #45092, #46678, #24909, #33307.
2018-03-14Reword E0044 and message for `!Send` typesEsteban Küber-4/+4
- Reword E0044 help. - Change error message for types that don't implement `Send`
2018-03-14Add empty main() to tests where it is missing.Eric Huss-10/+8
2018-03-14Add crate name to "main function not found" error message.Eric Huss-2/+2
Fixes #44798 and rust-lang/cargo#4948.
2018-03-14update testsGuillaume Gomez-22/+22
2018-02-26Update UI testsVadim Petrochenkov-7/+7
2018-02-26Update UI testsVadim Petrochenkov-61/+61
2018-02-25Update ui testsGuillaume Gomez-0/+22
2018-02-09Fix visitation order of calls so that it matches execution order. Fixes #48048John Kåre Alsaker-0/+33
2018-01-30Allow access of the state field before the generator transform. Fixes ↵John Kåre Alsaker-18/+18
#47482, #46476
2018-01-29Require yield types to be sizedJohn Kåre Alsaker-0/+43
2018-01-29Make `yield_in_scope_for_expr` work with patterns. Fixes #47758John Kåre Alsaker-0/+33
2018-01-23Port borrows across yield check to MIR borrowckJohn Kåre Alsaker-0/+54
2018-01-23Add dropck testJohn Kåre Alsaker-0/+44
2018-01-23Fix yield-while-local-borrowed.rs testJohn Kåre Alsaker-8/+42
2018-01-23Make immovable generators unsafeJohn Kåre Alsaker-0/+27
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-4/+97
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2018-01-15On E0283, point at method with the requirementsEsteban Küber-2/+10
On required type annotation diagnostic error, point at method with the requirements if the span is available.
2017-12-14Point at var in short lived borrowsEsteban Küber-8/+10
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-5/+5
2017-09-20add proofs and fix postorder traversalAriel Ben-Yehuda-4/+4
I don't think the "quasi-postorder" travesal could cause any issues, but there's no reason for it to stay broken.
2017-09-20Only consider yields coming after the expressions when computing generator ↵John Kåre Alsaker-34/+0
interiors
2017-08-17Fix more UI testsAlex Crichton-1/+1
2017-08-17Fix UI testsAlex Crichton-10/+2
2017-08-14Choose another error codeAlex Crichton-1/+1
2017-08-12Fix UI testAlex Crichton-4/+4
2017-08-09Add UI test outputsAlex Crichton-0/+89
2017-08-09Initial pass review commentsAlex Crichton-0/+120
2017-07-29Use a free error codeAlex Crichton-5/+5
2017-07-28Fix more tests with `GeneratorState` renameAlex Crichton-4/+4
2017-07-28update references due to removing tabsNiko Matsakis-2/+2
2017-07-28Remove tabsJohn Kåre Alsaker-6/+6
2017-07-28Fix tidy errorsJohn Kåre Alsaker-8/+8
2017-07-28change how we report `err_out_of_scope` borrowck errorsNiko Matsakis-0/+349
Also, remove the explicit code detecting borrows over a yield. It turns out not to be necessary -- any such borrow winds up with a lifetime that is part of the generator type, and therefore which will outlive the generator expression itself, which yields an `err_out_of_scope`. So instead we intercept those errors and display them in a nicer way.