rust/compiler
bors 1af55d19c7 Auto merge of #89933 - est31:let_else, r=michaelwoerister
Adopt let_else across the compiler

This performs a substitution of code following the pattern:

```
let <id> = if let <pat> = ... { identity } else { ... : ! };
```

To simplify it to:

```
let <pat> = ... { identity } else { ... : ! };
```

By adopting the `let_else` feature (cc #87335).

The PR also updates the syn crate because the currently used version of the crate doesn't support `let_else` syntax yet.

Note: Generally I'm the person who *removes* usages of unstable features from the compiler, not adds more usages of them, but in this instance I think it hopefully helps the feature get stabilized sooner and in a better state. I have written a [comment](https://github.com/rust-lang/rust/issues/87335#issuecomment-944846205) on the tracking issue about my experience and what I feel could be improved before stabilization of `let_else`.
2021-10-19 14:41:39 +00:00
..
rustc Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_apfloat Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_arena Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_ast Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser 2021-10-18 08:13:30 +02:00
rustc_ast_lowering Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_ast_passes Some "parenthesis" and "parentheses" fixes 2021-10-17 12:04:01 +02:00
rustc_ast_pretty Some "parenthesis" and "parentheses" fixes 2021-10-17 12:04:01 +02:00
rustc_attr Correct typo 2021-10-16 13:36:05 -07:00
rustc_borrowck Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_builtin_macros rustc_span: Ident::invalid -> Ident::empty 2021-10-17 23:20:30 +03:00
rustc_codegen_cranelift Remove alloc::prelude 2021-10-15 01:41:31 +02:00
rustc_codegen_gcc Remove alloc::prelude 2021-10-15 01:41:31 +02:00
rustc_codegen_llvm Remap ssa RealPredicate to llvm RealPredicate 2021-10-12 11:55:45 +02:00
rustc_codegen_ssa Adopt let_else across the compiler 2021-10-16 07:18:05 +02:00
rustc_const_eval Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_data_structures Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_driver Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_error_codes Member constraints already covered all of E0482 already, so that error never occurred anymore 2021-10-18 15:50:56 +00:00
rustc_errors Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_expand Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_feature Revert "Stabilize arbitrary_enum_discriminant" 2021-10-14 10:57:56 -04:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_hir Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_hir_pretty Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_incremental Adopt let_else across the compiler 2021-10-16 07:18:05 +02:00
rustc_index Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_infer Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_interface Enable AutoFDO. 2021-10-06 19:36:52 +00:00
rustc_lexer Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_lint Rollup merge of #89987 - pierwill:fix-85526-docs-hidden-assoc, r=GuillaumeGomez 2021-10-18 08:13:28 +02:00
rustc_lint_defs Add feature gate to non_exhaustive_omitted_patterns lint 2021-10-08 17:40:39 -04:00
rustc_llvm RustWrapper: adapt for an LLVM API change 2021-10-18 09:48:47 +02:00
rustc_macros Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_metadata Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_middle Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_mir_build Adopt let_else across the compiler 2021-10-16 07:18:05 +02:00
rustc_mir_dataflow Adopt let_else across the compiler 2021-10-16 07:18:05 +02:00
rustc_mir_transform Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_monomorphize Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_parse Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser 2021-10-18 08:13:30 +02:00
rustc_parse_format Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_passes Use Ancestory to check default fn in const impl instead of comparing idents 2021-10-11 18:19:54 +01:00
rustc_plugin_impl Move rustc_middle::middle::cstore to rustc_session. 2021-10-03 16:08:51 +02:00
rustc_privacy Auto merge of #89405 - GuillaumeGomez:fix-clippy-lints, r=cjgillot 2021-10-02 10:52:09 +00:00
rustc_query_impl Remove built-in cache_hit tracking 2021-10-11 16:33:49 -04:00
rustc_query_system Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_resolve Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_save_analysis Auto merge of #89266 - cjgillot:session-ich, r=michaelwoerister 2021-10-05 09:45:11 +00:00
rustc_serialize Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_session Rollup merge of #89476 - cjgillot:expn-id, r=petrochenkov 2021-10-07 20:26:14 -07:00
rustc_span Rollup merge of #89956 - JohnTitor:suggest-case-insensitive-match-names, r=estebank 2021-10-19 05:40:53 +02:00
rustc_symbol_mangling Remove re-export. 2021-10-03 16:08:54 +02:00
rustc_target Auto merge of #90040 - nbdd0121:issue-90038, r=oli-obk 2021-10-19 08:13:35 +00:00
rustc_trait_selection Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00
rustc_traits Move some outlives bounds things from rustc_trait_selection to rustc_typeck 2021-10-15 12:14:19 -04:00
rustc_ty_utils Remove various unused feature gates 2021-10-02 19:09:18 +02:00
rustc_type_ir Add two inline annotations for hot functions 2021-10-03 12:43:43 -04:00
rustc_typeck Auto merge of #89933 - est31:let_else, r=michaelwoerister 2021-10-19 14:41:39 +00:00