rust/compiler
Aman Arora 3488082582 Compute mutability of closure captures
When `capture_disjoint_fields` is not enabled, checking if the root variable
binding is mutable would suffice.

However with the feature enabled, the captured place might be mutable
because it dereferences a mutable reference.

This PR computes the mutability of each capture after capture analysis
in rustc_typeck. We store this in `ty::CapturedPlace` and then use
`ty::CapturedPlace::mutability` in mir_build and borrow_check.
2021-01-29 15:37:40 -05:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat Backport another LLVM commit to rustc_apfloat 2020-10-04 02:02:25 +02:00
rustc_arena stabilize min_const_generics 2020-12-26 18:24:10 +01:00
rustc_ast Refactor token collection to capture trailing token immediately 2021-01-22 00:33:03 -05:00
rustc_ast_lowering Rollup merge of #81249 - cjgillot:issue-79537, r=oli-obk 2021-01-23 20:16:07 +01:00
rustc_ast_passes Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_pretty Remove unused dependency 2021-01-23 10:30:38 +01:00
rustc_attr Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_builtin_macros Rollup merge of #80855 - m-ou-se:assert-2021, r=petrochenkov 2021-01-24 22:09:53 +01:00
rustc_codegen_cranelift Rollup merge of #81333 - RalfJung:const-err-simplify, r=oli-obk 2021-01-29 09:17:38 +09:00
rustc_codegen_llvm Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3 2021-01-29 09:17:20 +09:00
rustc_codegen_ssa Rollup merge of #81333 - RalfJung:const-err-simplify, r=oli-obk 2021-01-29 09:17:38 +09:00
rustc_data_structures Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_driver Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_error_codes Fix spelling in documentation for error E0207 2021-01-24 20:31:42 +01:00
rustc_errors Avoid describing a method as 'not found' when bounds are unsatisfied 2021-01-26 23:59:50 -05:00
rustc_expand Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS lint 2021-01-28 08:51:43 -05:00
rustc_feature Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_fs_util Optimize away a fs::metadata call. 2021-01-06 08:33:15 -08:00
rustc_graphviz remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
rustc_hir Auto merge of #81393 - pnkfelix:issue-81296-make-weak-item-traversal-deterministic, r=estebank 2021-01-27 00:19:45 +00:00
rustc_hir_pretty Add loop head span to hir 2021-01-21 21:41:46 -08:00
rustc_incremental Auto merge of #80957 - tgnottingham:direct_serialize_depgraph, r=michaelwoerister 2021-01-19 19:36:41 +00:00
rustc_index Switch compiler/ to intra-doc links 2020-12-18 15:22:51 -05:00
rustc_infer Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis 2021-01-28 15:09:02 +09:00
rustc_interface Pre-canoncalize ExternLocation::ExactPaths 2021-01-29 11:02:12 +01:00
rustc_lexer Return EOF_CHAR constant instead of magic char. 2021-01-07 13:20:04 +01:00
rustc_lint Rollup merge of #81176 - camsteffen:qpath-res, r=oli-obk 2021-01-29 09:17:32 +09:00
rustc_lint_defs Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS lint 2021-01-28 08:51:43 -05:00
rustc_llvm Use probe-stack=inline-asm in LLVM 11+ 2021-01-14 22:49:16 -05:00
rustc_macros Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_metadata Pre-canoncalize ExternLocation::ExactPaths 2021-01-29 11:02:12 +01:00
rustc_middle Compute mutability of closure captures 2021-01-29 15:37:40 -05:00
rustc_mir Compute mutability of closure captures 2021-01-29 15:37:40 -05:00
rustc_mir_build Compute mutability of closure captures 2021-01-29 15:37:40 -05:00
rustc_parse Point only at generic arguments when they are unexpected 2021-01-26 15:59:43 -08:00
rustc_parse_format rustc_parse_format: Fix character indices in find_skips 2021-01-17 17:40:58 +03:00
rustc_passes Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis 2021-01-28 15:09:02 +09:00
rustc_plugin_impl Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
rustc_privacy Review changes 2021-01-16 18:56:37 -05:00
rustc_query_system Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_resolve Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS lint 2021-01-28 08:51:43 -05:00
rustc_save_analysis Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_serialize rustc_serialize: fix incorrect signed LEB128 decoding 2021-01-11 12:13:26 -08:00
rustc_session Pre-canoncalize ExternLocation::ExactPaths 2021-01-29 11:02:12 +01:00
rustc_span Rollup merge of #81277 - flip1995:from_diag_items, r=matthewjasper 2021-01-28 15:09:08 +09:00
rustc_symbol_mangling Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
rustc_target Auto merge of #81493 - JohnTitor:rollup-sa4m4zh, r=JohnTitor 2021-01-29 00:58:43 +00:00
rustc_trait_selection Auto merge of #81055 - matthewjasper:non-fatal-overflow, r=nikomatsakis 2021-01-28 18:57:10 +00:00
rustc_traits Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
rustc_ty_utils Infallible version of def_span. 2021-01-23 13:35:22 +01:00
rustc_type_ir Move a few more types to rustc_type_ir 2021-01-18 21:06:12 +01:00
rustc_typeck Compute mutability of closure captures 2021-01-29 15:37:40 -05:00