rust/compiler
bors 59096cdad0 Auto merge of #119061 - compiler-errors:async-gen-abi, r=wesleywiser
Desugar `yield` in `async gen` correctly, ensure `gen` always returns unit

1. Ensure `async gen` blocks desugar `yield $expr` to `task_context = yield async_gen_ready($expr)`. Previously we were not assigning the `task_context` correctly, meaning that `yield` expressions in async generators returned type `ResumeTy` instead of `()`, and that we were not storing the `task_context`  (which is probably unsound if we were reading the old task-context which has an invalidated borrow or something...)
2. Ensure that all `(async?) gen` blocks and `(async?) gen` fns return unit. Previously we were only checking this for `gen fn`, meaning that `gen {}` and `async gen {}` and `async gen fn` were allowed to return values that weren't unit. This is why #119058 was an ICE rather than an E0308.

Fixes #119058.
2023-12-19 00:42:50 +00:00
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Annotate panic! reasons during enum layout 2023-12-15 02:21:31 -08:00
rustc_arena rustc_arena: add alloc_str 2023-12-05 17:52:51 -08:00
rustc_ast Rollup merge of #118880 - GearsDatapacks:issue-118859-fix, r=compiler-errors 2023-12-17 21:29:59 +01:00
rustc_ast_lowering Auto merge of #119061 - compiler-errors:async-gen-abi, r=wesleywiser 2023-12-19 00:42:50 +00:00
rustc_ast_passes Auto merge of #117818 - fmease:properly-reject-defaultness-on-free-consts, r=cjgillot 2023-12-18 11:59:34 +00:00
rustc_ast_pretty Add better ICE messages for some undescriptive panics 2023-12-15 00:50:55 -05:00
rustc_attr Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_baked_icu_data Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_borrowck Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_builtin_macros Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_codegen_cranelift Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_codegen_gcc Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_codegen_llvm Auto merge of #119069 - matthiaskrgr:rollup-xxk4m30, r=matthiaskrgr 2023-12-18 08:03:22 +00:00
rustc_codegen_ssa Auto merge of #119069 - matthiaskrgr:rollup-xxk4m30, r=matthiaskrgr 2023-12-18 08:03:22 +00:00
rustc_const_eval Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_data_structures NFC don't convert types to identical types 2023-12-15 23:56:24 +01:00
rustc_driver Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver_impl Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_error_codes Remove edition umbrella features. 2023-12-10 13:03:28 -08:00
rustc_error_messages Remove rustc_error_messages/messages.ftl. 2023-11-26 08:37:27 +11:00
rustc_errors Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_expand Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_feature Remove edition umbrella features. 2023-12-10 13:03:28 -08:00
rustc_fluent_macro Add a useful comment. 2023-11-26 08:38:02 +11:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz remove unused pub fn 2023-11-23 14:11:02 +03:00
rustc_hir Rollup merge of #119004 - matthiaskrgr:conv, r=compiler-errors 2023-12-15 21:33:00 -08:00
rustc_hir_analysis Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_hir_pretty Rollup merge of #118396 - compiler-errors:ast-lang-items, r=cjgillot 2023-12-15 14:08:15 -08:00
rustc_hir_typeck Auto merge of #119061 - compiler-errors:async-gen-abi, r=wesleywiser 2023-12-19 00:42:50 +00:00
rustc_incremental Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
rustc_index Replace no_ord_impl with orderable. 2023-11-22 18:38:17 +11:00
rustc_index_macros Put backticks around some attributes in doc comments. 2023-11-27 09:37:01 +11:00
rustc_infer Rename Session::span_diagnostic as Session::dcx. 2023-12-18 16:06:21 +11:00
rustc_interface Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_lexer Rename some unescaping functions. 2023-12-13 14:17:50 +11:00
rustc_lint Rename Session::span_diagnostic as Session::dcx. 2023-12-18 16:06:21 +11:00
rustc_lint_defs Remove the lint outright 2023-12-16 01:28:06 +00:00
rustc_llvm Rollup merge of #118941 - krasimirgg:llvm-cov, r=nikic 2023-12-18 17:03:11 +01:00
rustc_log rustc_log: provide a way to init logging based on the values, not names, of the env vars 2023-11-11 15:24:33 +01:00
rustc_macros Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_metadata Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_middle Check FnPtr/FnDef built-in fn traits correctly with effects 2023-12-18 20:28:06 +00:00
rustc_mir_build Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_mir_dataflow NFC don't convert types to identical types 2023-12-15 23:56:24 +01:00
rustc_mir_transform Auto merge of #119069 - matthiaskrgr:rollup-xxk4m30, r=matthiaskrgr 2023-12-18 08:03:22 +00:00
rustc_monomorphize Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_next_trait_solver Opportunistically resolve region var in canonicalizer 2023-12-15 05:02:37 +00:00
rustc_parse Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_parse_format Auto merge of #117819 - fmease:rustc_parse_format-stable-rustc, r=Nilstrieb 2023-11-15 14:55:35 +00:00
rustc_passes Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_pattern_analysis NFC: do not clone types that are copy 2023-12-15 23:19:51 +01:00
rustc_privacy resolve: Replace visibility table in resolver outputs with query feeding 2023-12-18 02:26:55 +03:00
rustc_query_impl QueryContext: rename try_collect_active_jobs -> collect_active_jobs and change it's return type from Option<QueryMap> to QueryMap 2023-11-27 18:13:15 +03:00
rustc_query_system Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_resolve Rename Session::span_diagnostic as Session::dcx. 2023-12-18 16:06:21 +11:00
rustc_serialize Call FileEncoder::finish in rmeta encoding 2023-11-22 22:49:22 -05:00
rustc_session Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
rustc_smir Auto merge of #119000 - celinval:smir-cstr, r=ouz-a 2023-12-17 08:18:17 +00:00
rustc_span Add better ICE messages for some undescriptive panics 2023-12-15 00:50:55 -05:00
rustc_symbol_mangling Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
rustc_target Move rustc_codegen_ssa target features to rustc_target 2023-12-14 14:40:55 +01:00
rustc_trait_selection Check FnPtr/FnDef built-in fn traits correctly with effects 2023-12-18 20:28:06 +00:00
rustc_traits add unused NormalizesTo predicate 2023-12-07 17:52:51 +01:00
rustc_transmute Update itertools to 0.11. 2023-11-22 08:13:21 +11:00
rustc_ty_utils Rollup merge of #118871 - tmiasko:coroutine-maybe-uninit-fields, r=compiler-errors 2023-12-13 18:03:33 +01:00
rustc_type_ir Auto merge of #118970 - aliemjay:rollup-or33al2, r=aliemjay 2023-12-15 08:51:00 +00:00
stable_mir Add a method to check if type is a CStr 2023-12-15 13:18:41 -08:00