about summary refs log tree commit diff
path: root/src/test/ui/generator
AgeCommit message (Collapse)AuthorLines
2021-08-16Use note to point at bound introducing requirementEsteban Küber-41/+63
2021-08-16Don't mark `if_let_guard` as an incomplete featureLéo Lanteri Thauvin-1/+0
2021-08-15Report nicer errors for HRTB NLL errors from queriesMatthew Jasper-6/+16
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-1/+1
2021-07-27Remove min_tait and full_tait stderr dangling filesSantiago Pastorino-44/+0
2021-07-27Make all tests use type_alias_impl_trait feature instead of minSantiago Pastorino-7/+20
2021-07-27Use type_alias_impl_trait instead of min in compiler and libSantiago Pastorino-27/+7
2021-07-20Auto merge of #87141 - spastorino:remove_impl_trait_in_bindings, r=oli-obkbors-79/+23
Remove impl trait in bindings Closes #86729 r? `@oli-obk`
2021-07-19Various diagnostics clean ups/tweaksEsteban Küber-1/+5
* Always point at macros, including derive macros * Point at non-local items that introduce a trait requirement * On private associated item, point at definition
2021-07-18Remove impl_trait_in_bindings feature flagSantiago Pastorino-79/+23
2021-07-06Revert "Revert "Update tests""bjorn3-5/+5
This reverts commit 715c68fe90c6f1d0b3004ad18f16e0811f209992.
2021-06-18Lint for unused borrows as part of UNUSED_MUST_USEhi-rustin-3/+3
2021-06-12Pretty print generator witness only in `-Zverbose` modeTomasz Miąsko-4/+4
In release build of deeply-nested-async benchmark the size of `no-opt.bc` file is reduced from 46MB to 62kB.
2021-06-07Revert "Update tests"bjorn3-5/+5
This reverts commit c76b1b031753fc08a18a3906d828683476c1e595.
2021-05-30Update testsbjorn3-5/+5
2021-05-27Test THIR unsafeck for unsafe ops in closuresLeSeulArtichaut-0/+3
2021-05-24Replace more "NULL" with "null"LeSeulArtichaut-1/+1
2021-05-20Check for raw pointer dereference in THIR unsafeckLeSeulArtichaut-1/+15
2021-05-12Don't suggest adding `'static` lifetime to argumentsAaron Hill-3/+0
Fixes #69350 This is almost always the wrong this to do
2021-05-02Change 'NULL' to 'null'Brent Kerby-1/+1
2021-05-01Closure capture borrow diagnostics for disjoint capturesChris Pardy-1/+1
2021-04-06Always mention `Box::pin` when dealing with `!Unpin`Esteban Küber-0/+2
2021-04-02Auto merge of #80828 - SNCPlay42:opaque-projections, r=estebankbors-3/+3
Fix expected/found order on impl trait projection mismatch error fixes #68561 This PR adds a new `ObligationCauseCode` used when checking the concrete type of an impl trait satisfies its bounds, and checks for that cause code in the existing test to see if a projection's normalized type should be the "expected" or "found" type. The second commit adds a `peel_derives` to that test, which appears to be necessary in some cases (see projection-mismatch-in-impl-where-clause.rs, which would still give expected/found in the wrong order otherwise). This caused some other changes in diagnostics not involving impl trait, but they look correct to me.
2021-03-20Move some tests to more reasonable directories - 5Caio-0/+20
2021-03-16fix expected/found order on impl trait projection mismatchSNCPlay42-3/+3
2021-03-15Only allow tait defining uses in function and method return positionOli Scherer-11/+75
2021-03-15Replace `type_alias_impl_trait` by `min_type_alias_impl_trait` with no ↵Oli Scherer-3/+56
actual changes in behaviour This makes `type_alias_impl_trait` not actually do anything anymore
2021-03-12Make def_key and HIR parenting consistent.Camille GILLOT-5/+5
2021-02-19Rollup merge of #82245 - estebank:issue-78653, r=matthewjasperDylan DPC-0/+28
Do not ICE when evaluating locals' types of invalid `yield` When a `yield` is outside of a generator, check its value regardless to avoid an ICE while trying to get all locals' types in writeback. Fix #78653.
2021-02-17Do not ICE when evaluating locals' types of invalid `yield`Esteban Küber-0/+28
When a `yield` is outside of a generator, check its value regardless to avoid an ICE while trying to get all locals' types in writeback. Fix #78653.
2021-02-10Keep existing names of regions in placeholder_errorMatthew Jasper-4/+4
2021-02-09Remove unnecessary note on errorsMatthew Jasper-12/+0
Seeing the trait definition doesn't help with implementation not general enough errors, so don't make the error message larger to show it.
2021-02-06path trimming: ignore type aliasesDan Aloni-5/+5
2021-02-01Update ui testsJesus Rubio-0/+1
2021-01-15Rollup merge of #81008 - tmiasko:generator-layout-err, r=tmandryYuki Okushi-0/+37
Don't ICE when computing a layout of a generator tainted by errors Fixes #80998.
2021-01-14Don't ICE when computing a layout of a generator tainted by errorsTomasz Miąsko-0/+37
2021-01-14Encode optimized MIR of generators when emitting metadataTomasz Miąsko-0/+34
2021-01-12Provide more information for HRTB lifetime errors involving closuresEsteban Küber-2/+30
2020-12-06Add a few basic tests for if-let guardsLeSeulArtichaut-0/+11
2020-11-23Rename `optin_builtin_traits` to `auto_traits`Camelid-1/+1
They were originally called "opt-in, built-in traits" (OIBITs), but people realized that the name was too confusing and a mouthful, and so they were renamed to just "auto traits". The feature flag's name wasn't updated, though, so that's what this PR does. There are some other spots in the compiler that still refer to OIBITs, but I don't think changing those now is worth it since they are internal and not particularly relevant to this PR. Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.
2020-11-10Use Places to express closure/generator CapturesAman Arora-2/+2
Co-authored-by: Archer Zhang <archer.xn@gmail.com>
2020-10-26always record reference to binding in match if guardsSNCPlay42-1/+20
2020-10-22Explain where the closure return type was inferredAaron Hill-0/+5
Fixes #78193
2020-10-15Auto merge of #77873 - sexxi-goose:use_tuple_inference_for_closures, ↵bors-7/+7
r=nikomatsakis Replace tuple of infer vars for upvar_tys with single infer var This commit allows us to decide the number of captures required after completing capture ananysis, which is required as part of implementing RFC-2229. closes https://github.com/rust-lang/project-rfc-2229/issues/4 r? `@nikomatsakis`
2020-10-14switch the test to an actual MCVEDing Xiang Fei-14/+9
2020-10-14rustfmtDing Xiang Fei-1/+1
2020-10-14test derived from #74961Ding Xiang Fei-0/+29
2020-10-11traits diagnostics: Don't print closure/generator upvar_tys tupleAman Arora-4/+0
Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
2020-10-11Always return tupled_upvar_tys for Closure/Generator consituent tysAman Arora-0/+2
Depending on if upvar_tys inferred or not, we were returning either an inference variable which later resolves to a tuple or else the upvar tys themselves Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
2020-10-11Replace tuple of infer vars for upvar_tys with single infer varRoxane-7/+9
This commit allows us to decide the number of captures required after completing capture ananysis, which is required as part of implementing RFC-2229. Co-authored-by: Aman Arora <me@aman-arora.com> Co-authored-by: Jenny Wills <wills.jenniferg@gmail.com>