rust/compiler
bors c0b15cc6ed Auto merge of #77242 - ecstatic-morse:dataflow-switch-int, r=jonas-schievink
Replace `discriminant_switch_effect` with more general version

#68528 added a new edge-specific effect for `SwitchInt` terminators, `discriminant_switch_effect`, to the dataflow framework. While this accomplished the short-term goal of making drop elaboration more precise, it wasn't really useful in other contexts: It only supported `SwitchInt`s on the discriminant of an `enum` and did not allow effects to be applied along the "otherwise" branch. In const-propagation, for example, arbitrary edge-specific effects for the targets of a `SwitchInt` can be used to remember the value a `match` scrutinee must have in each arm.

This PR replaces `discriminant_switch_effect` with a more general `switch_int_edge_effects` method. The new method has a slightly different interface from the other edge-specific effect methods (e.g. `call_return_effect`). This divergence is explained in the new method's documentation, and reading the changes to the various dataflow impls as well as `direction.rs` should further clarify things. This PR should not change behavior.
2020-09-27 21:54:49 +00:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_arena Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
rustc_ast tidy 2020-09-23 22:08:30 +02:00
rustc_ast_lowering simplfy condition in ItemLowerer::with_trait_impl_ref() 2020-09-16 23:09:57 +02:00
rustc_ast_passes use matches!() macro for simple if let conditions 2020-09-18 20:28:35 +02:00
rustc_ast_pretty Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
rustc_attr Allow multiple allow_internal_unstable attributes 2020-09-25 15:19:46 +02:00
rustc_builtin_macros Auto merge of #76485 - estebank:format_arg_capture_spans, r=davidtwco 2020-09-26 10:05:49 +00:00
rustc_codegen_llvm Rollup merge of #76839 - lzutao:mips-asm, r=Amanieu 2020-09-27 18:37:20 +02:00
rustc_codegen_ssa Rollup merge of #77208 - mati865:late-link-args-order, r=petrochenkov 2020-09-27 01:53:23 +02:00
rustc_data_structures Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
rustc_driver /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_error_codes Rollup merge of #76973 - lzutao:unstably-const-assume, r=oli-obk 2020-09-25 19:42:29 +02:00
rustc_errors /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_expand Remove redundant #![feature(...)] 's from compiler/ 2020-09-17 07:58:45 +02:00
rustc_feature Use proper issue for `const_fn_floating_point_arithmetic` 2020-09-25 10:39:11 -07:00
rustc_fs_util mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
rustc_graphviz /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_hir Auto merge of #76955 - jyn514:refactor-diagnostics, r=euclio 2020-09-27 08:12:29 +00:00
rustc_hir_pretty mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
rustc_incremental /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_index cache types during normalization 2020-09-19 17:27:13 +02:00
rustc_infer Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk 2020-09-26 12:58:34 +02:00
rustc_interface PR feedback 2020-09-17 12:18:09 +02:00
rustc_lexer Fix typo in rustc_lexer docs 2020-09-21 05:43:39 +02:00
rustc_lint Separate `private_intra_doc_links` and `broken_intra_doc_links` into separate lints 2020-09-27 09:58:29 -04:00
rustc_llvm Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
rustc_macros Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
rustc_metadata Auto merge of #77118 - exrook:stability-generic-parameters-2, r=varkor 2020-09-27 12:51:21 +00:00
rustc_middle Auto merge of #77118 - exrook:stability-generic-parameters-2, r=varkor 2020-09-27 12:51:21 +00:00
rustc_mir Auto merge of #77242 - ecstatic-morse:dataflow-switch-int, r=jonas-schievink 2020-09-27 21:54:49 +00:00
rustc_mir_build Auto merge of #70743 - oli-obk:eager_const_to_pat_conversion, r=eddyb 2020-09-26 06:44:28 +00:00
rustc_parse pretty-print-reparse hack: Remove an impossible case 2020-09-26 20:27:14 +03:00
rustc_parse_format /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_passes Auto merge of #77229 - tmiasko:liveness, r=lcnr 2020-09-27 19:38:01 +00:00
rustc_plugin_impl /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_privacy /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_query_system update the version of itertools and parking_lot 2020-09-12 08:26:53 +02:00
rustc_resolve /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_save_analysis /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_serialize /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_session Rollup merge of #77262 - bugadani:redundant-comment, r=Dylan-DPC 2020-09-27 18:37:28 +02:00
rustc_span Rollup merge of #77263 - bugadani:cleanup, r=lcnr 2020-09-27 18:37:29 +02:00
rustc_symbol_mangling Implement `Display` for `DisambiguatedDefPathData` and `DefPathData` 2020-09-25 22:46:15 +01:00
rustc_target Rollup merge of #76839 - lzutao:mips-asm, r=Amanieu 2020-09-27 18:37:20 +02:00
rustc_trait_selection Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk 2020-09-26 12:58:34 +02:00
rustc_traits Upgrade chalk to 0.28.0 2020-09-24 20:54:33 +02:00
rustc_ty Rollup merge of #77155 - lcnr:ImplSource, r=ecstatic-morse 2020-09-25 19:42:48 +02:00
rustc_typeck Auto merge of #77118 - exrook:stability-generic-parameters-2, r=varkor 2020-09-27 12:51:21 +00:00