rust/tests/ui/rfcs
bors f4555ef5e1 Auto merge of #111752 - dingxiangfei2009:lower-or-pattern, r=cjgillot
Lower `Or` pattern without allocating place

cc `@azizghuloum` `@cjgillot`

Related to #111583 and #111644

While reviewing #111644, it occurs to me that while we directly lower conjunctive predicates, which are connected with `&&`, into the desirable control flow, today we don't directly lower the disjunctive predicates, which are connected with `||`, in the similar fashion. Instead, we allocate a place for the boolean temporary to hold the result of evaluating the `||` expression.

Usually I would expect optimization at later stages to "inline" the evaluation of boolean predicates into simple CFG, but #111583 is an example where `&&` is failing to be optimized away and the assembly shows that both the expensive operands are evaluated. Therefore, I would like to make a small change to make the CFG a bit more straight-forward without invoking the `as_temp` machinery, and plus avoid allocating the place to hold the boolean result as well.
2023-09-01 10:54:56 +00:00
..
rfc-0107-bind-by-move-pattern-guards Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-1014-stdout-existential-crisis Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-1445-restrict-constants-in-patterns Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-1623-static Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-1717-dllimport Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-1789-as-cell Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rfc-1857-stabilize-drop-order Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-1937-termination-trait Replace RPITIT current impl with new strategy that lowers as a GAT 2023-07-08 18:21:34 -03:00
rfc-2005-default-binding-mode Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
rfc-2008-non-exhaustive Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2027-object-safe-for-dispatch Only consider object candidates for object-safe dyn types 2023-08-15 01:01:44 +00:00
rfc-2091-track-caller Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2093-infer-outlives Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2126-crate-paths Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2126-extern-absolute-paths Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2151-raw-identifiers Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rfc-2175-or-if-while-let Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rfc-2294-if-let-guard Add more tests for if_let_guard 2023-08-24 16:29:08 +01:00
rfc-2302-self-struct-ctor Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2306-convert-id Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2361-dbg-macro Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2396-target_feature-11 Test and note unsafe ctor to fn ptr coercion 2023-08-30 15:09:40 -07:00
rfc-2397-do-not-recommend Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2421-unreserve-pure-offsetof-sizeof-alignof Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2457-non-ascii-idents Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
rfc-2497-if-let-chains lower bare boolean expression with if-construct 2023-08-30 17:24:11 +08:00
rfc-2528-type-changing-struct-update Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
rfc-2565-param-attrs Adjust UI tests for unit_bindings 2023-06-12 20:24:48 +08:00
rfc-2627-raw-dylib Rollup merge of #113754 - cjgillot:simplify-foreign, r=petrochenkov 2023-07-19 22:37:07 +05:30
rfc-2632-const-trait-impl Remove unnecessary select_obligations_where_possible and redundant errors 2023-08-26 19:35:54 +00:00
rfc-3348-c-string-literals add proc macro test 2023-07-23 10:09:43 +00:00