rust/compiler
bors 14c54b637b Auto merge of #107844 - Zeegomo:no-drop-and-rep, r=cjgillot
Desugaring of drop and replace at MIR build

This commit desugars the drop and replace deriving from an
assignment at MIR build, avoiding the construction of the
`DropAndReplace` terminator (which will be removed in a following PR).

In order to retain the same error messages for replaces a new
`DesugaringKind::Replace` variant is introduced.

The changes in the borrowck are also useful for future work in moving drop elaboration
before borrowck, as no `DropAndReplace` would be present there anymore.

Notes on test diffs:
*  `tests/ui/borrowck/issue-58776-borrowck-scans-children`: the assignment deriving from the desugaring kills the borrow.
*  `tests/ui/async-await/async-fn-size-uninit-locals.rs`, `tests/mir-opt/issue_41110.test.ElaborateDrops.after.mir`,  `tests/mir-opt/issue_41888.main.ElaborateDrops.after.mir`:  drop elaboration generates (or reads from) a useless drop flag due to an issue with the dataflow analysis. Will be fixed independently by https://github.com/rust-lang/rust/pull/106430.

See https://github.com/rust-lang/rust/pull/104488 for more context
2023-03-05 07:56:26 +00:00
..
rustc Add a new rustc_driver dylib to rexport rustc_driver_impl 2023-02-02 07:34:41 +01:00
rustc_abi Unify validity checks into a single query 2023-02-23 18:42:36 +00:00
rustc_apfloat
rustc_arena
rustc_ast Match unmatched backticks in comments in compiler/ 2023-03-03 08:39:00 +01:00
rustc_ast_lowering Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
rustc_ast_passes Remove allow(potential_query_instability) from ast_passes 2023-03-04 12:39:54 +00:00
rustc_ast_pretty Use ThinVec in various AST types. 2023-02-21 11:51:56 +11:00
rustc_attr errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
rustc_baked_icu_data update ICU4X to 1.1.0 2023-02-04 22:28:59 +01:00
rustc_borrowck Auto merge of #107844 - Zeegomo:no-drop-and-rep, r=cjgillot 2023-03-05 07:56:26 +00:00
rustc_builtin_macros Explain compile-time vs run-time difference in env!() error message 2023-02-28 16:44:59 +00:00
rustc_codegen_cranelift Unify all validity check intrinsics 2023-02-27 13:30:44 +00:00
rustc_codegen_gcc Use List::empty() instead of mk_substs(&[]). 2023-02-24 07:33:02 +11:00
rustc_codegen_llvm Rollup merge of #108599 - nikic:drop-init, r=cuviper 2023-03-03 20:06:27 +01:00
rustc_codegen_ssa Auto merge of #101550 - CraftSpider:link-dead-windows, r=wesleywiser 2023-03-05 02:00:58 +00:00
rustc_const_eval Rollup merge of #108669 - Nilstrieb:query-my-uninitness, r=compiler-errors 2023-03-04 15:24:39 +05:30
rustc_data_structures Auto merge of #108709 - matthiaskrgr:rollup-j2tjbyx, r=matthiaskrgr 2023-03-03 22:45:58 +00:00
rustc_driver Remove unneeded extern crate 2023-02-02 07:47:39 +01:00
rustc_driver_impl refactor: statically guarantee that current error codes are documented 2023-02-26 20:12:36 +13:00
rustc_error_codes refactor: statically guarantee that current error codes are documented 2023-02-26 20:12:36 +13:00
rustc_error_messages Handle selecting the default locale better 2023-02-23 01:14:10 +01:00
rustc_errors Properly colorize multi-part suggestions in the same line 2023-03-04 00:29:52 +00:00
rustc_expand rustc_expand: make proc-macro derive error translatable 2023-03-04 07:54:29 +02:00
rustc_feature Revert "Stabilize #![feature(target_feature_11)]" 2023-03-02 13:41:17 +01:00
rustc_fs_util
rustc_graphviz Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_hir Only look for param in generics if it actually comes from generics 2023-02-28 06:27:56 +00:00
rustc_hir_analysis Rollup merge of #108694 - est31:backticks_matchmaking_comments, r=Nilstrieb 2023-03-03 20:06:30 +01:00
rustc_hir_pretty Add ErrorGuaranteed to HIR ExprKind::Err 2023-02-25 19:46:36 +00:00
rustc_hir_typeck Auto merge of #108709 - matthiaskrgr:rollup-j2tjbyx, r=matthiaskrgr 2023-03-03 22:45:58 +00:00
rustc_incremental Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
rustc_index Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
rustc_infer field is not used outside the crate 2023-03-04 07:01:08 +02:00
rustc_interface Match end user facing unmatched backticks in compiler/ 2023-03-03 08:39:36 +01:00
rustc_lexer Rustdoc-ify LiteralKind note 2023-03-03 08:39:36 +01:00
rustc_lint Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
rustc_lint_defs Rollup merge of #108363 - cjgillot:unused-crate, r=WaffleLapkin 2023-02-27 18:48:49 +01:00
rustc_llvm Rollup merge of #108599 - nikic:drop-init, r=cuviper 2023-03-03 20:06:27 +01:00
rustc_log Rollup merge of #107895 - matthiaskrgr:cl, r=compiler-errors 2023-02-11 17:18:44 +01:00
rustc_macros Emit the enum discriminant separately for the Encodable macro 2023-02-25 01:04:56 +01:00
rustc_metadata Auto merge of #101550 - CraftSpider:link-dead-windows, r=wesleywiser 2023-03-05 02:00:58 +00:00
rustc_middle Auto merge of #108732 - Dylan-DPC:rollup-dy1l8sx, r=Dylan-DPC 2023-03-04 11:44:02 +00:00
rustc_mir_build Auto merge of #107844 - Zeegomo:no-drop-and-rep, r=cjgillot 2023-03-05 07:56:26 +00:00
rustc_mir_dataflow Auto merge of #108250 - nnethercote:rename-interner-funcs, r=compiler-errors 2023-02-25 13:55:26 +00:00
rustc_mir_transform Auto merge of #107844 - Zeegomo:no-drop-and-rep, r=cjgillot 2023-03-05 07:56:26 +00:00
rustc_monomorphize Rename many interner functions. 2023-02-24 07:32:24 +11:00
rustc_parse Rollup merge of #108715 - chenyukang:yukang/cleanup-parser-delims, r=compiler-errors 2023-03-04 20:48:17 +01:00
rustc_parse_format Replace some thens with some then_somes 2023-02-16 15:26:03 +00:00
rustc_passes Match unmatched backticks in comments in compiler/ 2023-03-03 08:39:00 +01:00
rustc_plugin_impl errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
rustc_privacy Auto merge of #108324 - notriddle:notriddle/assoc-fn-method, r=compiler-errors,davidtwco,estebank,oli-obk 2023-02-23 00:19:12 +00:00
rustc_query_impl Match unmatched backticks in comments in compiler/ 2023-03-03 08:39:00 +01:00
rustc_query_system Fix a race in the query system 2023-02-28 07:47:58 +01:00
rustc_resolve Match unmatched backticks in comments in compiler/ 2023-03-03 08:39:00 +01:00
rustc_serialize Emit the enum discriminant separately for the Encodable macro 2023-02-25 01:04:56 +01:00
rustc_session Rollup merge of #108405 - Nilstrieb:lazy-crate-name-optimization-fuel, r=WaffleLapkin 2023-03-04 15:24:37 +05:30
rustc_smir
rustc_span Auto merge of #107844 - Zeegomo:no-drop-and-rep, r=cjgillot 2023-03-05 07:56:26 +00:00
rustc_symbol_mangling Rename many interner functions. 2023-02-24 07:32:24 +11:00
rustc_target Auto merge of #106476 - keith:ks/add-sanitizer-support-for-modern-ios-platforms, r=badboy 2023-02-18 05:58:41 +00:00
rustc_trait_selection Auto merge of #108709 - matthiaskrgr:rollup-j2tjbyx, r=matthiaskrgr 2023-03-03 22:45:58 +00:00
rustc_traits Add mk_canonical_var_infos_from_iter. 2023-02-24 07:33:02 +11:00
rustc_transmute Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
rustc_ty_utils Feed queries on impl side for RPITITs when using lower_impl_trait_in_trait_to_assoc_ty 2023-03-02 16:48:49 -03:00
rustc_type_ir make first component of dyn* use pointer layout+type, and adjust DynStar comment 2023-02-18 19:24:55 +00:00