about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen/pattern_type_symbols.rs3
-rw-r--r--tests/coverage/abort.cov-map26
-rw-r--r--tests/coverage/assert.cov-map31
-rw-r--r--tests/coverage/async.cov-map27
-rw-r--r--tests/coverage/branch/guard.cov-map14
-rw-r--r--tests/coverage/branch/if.cov-map28
-rw-r--r--tests/coverage/branch/lazy-boolean.cov-map170
-rw-r--r--tests/coverage/branch/match-arms.cov-map76
-rw-r--r--tests/coverage/branch/no-mir-spans.cov-map14
-rw-r--r--tests/coverage/branch/while.cov-map43
-rw-r--r--tests/coverage/closure_macro.cov-map8
-rw-r--r--tests/coverage/closure_macro_async.cov-map8
-rw-r--r--tests/coverage/condition/conditions.cov-map73
-rw-r--r--tests/coverage/conditions.cov-map508
-rw-r--r--tests/coverage/continue.cov-map18
-rw-r--r--tests/coverage/coroutine.cov-map18
-rw-r--r--tests/coverage/inline-dead.cov-map8
-rw-r--r--tests/coverage/inline.cov-map17
-rw-r--r--tests/coverage/issue-84561.cov-map192
-rw-r--r--tests/coverage/lazy_boolean.cov-map40
-rw-r--r--tests/coverage/loops_branches.cov-map223
-rw-r--r--tests/coverage/mcdc/condition-limit.cov-map154
-rw-r--r--tests/coverage/mcdc/if.cov-map262
-rw-r--r--tests/coverage/mcdc/inlined_expressions.cov-map13
-rw-r--r--tests/coverage/mcdc/nested_if.cov-map268
-rw-r--r--tests/coverage/mcdc/non_control_flow.cov-map143
-rw-r--r--tests/coverage/nested_loops.cov-map76
-rw-r--r--tests/coverage/overflow.cov-map31
-rw-r--r--tests/coverage/panic_unwind.cov-map31
-rw-r--r--tests/coverage/simple_match.cov-map20
-rw-r--r--tests/coverage/try_error_result.cov-map242
-rw-r--r--tests/coverage/unicode.cov-map24
-rw-r--r--tests/coverage/unused.cov-map20
-rw-r--r--tests/coverage/while_early_ret.cov-map19
-rw-r--r--tests/coverage/yield.cov-map24
-rw-r--r--tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff14
-rw-r--r--tests/ui/associated-consts/associated-const-type-parameter-pattern.rs8
-rw-r--r--tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr47
-rw-r--r--tests/ui/binding/const-param.rs2
-rw-r--r--tests/ui/binding/const-param.stderr7
-rw-r--r--tests/ui/binop/binary-op-on-fn-ptr-eq.rs3
-rw-r--r--tests/ui/box/unit/unique-ffi-symbols.rs3
-rw-r--r--tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs3
-rw-r--r--tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs3
-rw-r--r--tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr8
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-2.rs3
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-2.stderr8
-rw-r--r--tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr8
-rw-r--r--tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr8
-rw-r--r--tests/ui/consts/const-eval/ref_to_int_match.rs2
-rw-r--r--tests/ui/consts/const-extern-function.rs2
-rw-r--r--tests/ui/consts/const_in_pattern/cross-crate-fail.rs6
-rw-r--r--tests/ui/consts/const_in_pattern/cross-crate-fail.stderr28
-rw-r--r--tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr36
-rw-r--r--tests/ui/consts/const_in_pattern/issue-44333.stderr18
-rw-r--r--tests/ui/consts/const_in_pattern/issue-65466.rs2
-rw-r--r--tests/ui/consts/const_in_pattern/issue-65466.stderr12
-rw-r--r--tests/ui/consts/const_in_pattern/no-eq-branch-fail.rs3
-rw-r--r--tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr11
-rw-r--r--tests/ui/consts/const_in_pattern/reject_non_partial_eq.rs2
-rw-r--r--tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr12
-rw-r--r--tests/ui/consts/const_in_pattern/reject_non_structural.rs90
-rw-r--r--tests/ui/consts/const_in_pattern/reject_non_structural.stderr199
-rw-r--r--tests/ui/consts/const_refs_to_static_fail_invalid.rs6
-rw-r--r--tests/ui/consts/const_refs_to_static_fail_invalid.stderr20
-rw-r--r--tests/ui/consts/invalid-inline-const-in-match-arm.stderr2
-rw-r--r--tests/ui/consts/issue-43105.rs3
-rw-r--r--tests/ui/consts/issue-43105.stderr8
-rw-r--r--tests/ui/consts/issue-73976-polymorphic.rs4
-rw-r--r--tests/ui/consts/issue-73976-polymorphic.stderr22
-rw-r--r--tests/ui/consts/issue-78655.rs3
-rw-r--r--tests/ui/consts/issue-78655.stderr8
-rw-r--r--tests/ui/consts/issue-79137-toogeneric.rs2
-rw-r--r--tests/ui/consts/issue-79137-toogeneric.stderr11
-rw-r--r--tests/ui/consts/issue-87046.stderr3
-rw-r--r--tests/ui/consts/issue-89088.rs2
-rw-r--r--tests/ui/consts/issue-89088.stderr11
-rw-r--r--tests/ui/consts/match_ice.rs3
-rw-r--r--tests/ui/consts/match_ice.stderr11
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs12
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr26
-rw-r--r--tests/ui/consts/missing_assoc_const_type.rs5
-rw-r--r--tests/ui/consts/missing_assoc_const_type.stderr8
-rw-r--r--tests/ui/consts/transmute-size-mismatch-before-typeck.rs2
-rw-r--r--tests/ui/consts/transmute-size-mismatch-before-typeck.stderr8
-rw-r--r--tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs2
-rw-r--r--tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr10
-rw-r--r--tests/ui/cross-crate/const-cross-crate-extern.rs2
-rw-r--r--tests/ui/deriving/deriving-coerce-pointee-neg.rs6
-rw-r--r--tests/ui/deriving/deriving-coerce-pointee-neg.stderr8
-rw-r--r--tests/ui/extern/extern-compare-with-return-type.rs1
-rw-r--r--tests/ui/extern/extern-take-value.rs2
-rw-r--r--tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr14
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs1
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.rs1
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.stderr20
-rw-r--r--tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.rs1
-rw-r--r--tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr20
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr10
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other2.rs2
-rw-r--r--tests/ui/inline-const/const-match-pat-generic.rs4
-rw-r--r--tests/ui/inline-const/const-match-pat-generic.stderr8
-rw-r--r--tests/ui/inline-const/pat-match-fndef.stderr4
-rw-r--r--tests/ui/issues/issue-54696.rs2
-rw-r--r--tests/ui/lint/fn-ptr-comparisons-weird.rs15
-rw-r--r--tests/ui/lint/fn-ptr-comparisons-weird.stderr43
-rw-r--r--tests/ui/lint/fn-ptr-comparisons.fixed58
-rw-r--r--tests/ui/lint/fn-ptr-comparisons.rs58
-rw-r--r--tests/ui/lint/fn-ptr-comparisons.stderr171
-rw-r--r--tests/ui/match/issue-70972-dyn-trait.stderr7
-rw-r--r--tests/ui/match/issue-72896-non-partial-eq-const.rs2
-rw-r--r--tests/ui/match/issue-72896-non-partial-eq-const.stderr12
-rw-r--r--tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs2
-rw-r--r--tests/ui/parser/typed-self-param.rs14
-rw-r--r--tests/ui/parser/typed-self-param.stderr50
-rw-r--r--tests/ui/pattern/issue-115599.rs2
-rw-r--r--tests/ui/pattern/issue-115599.stderr11
-rw-r--r--tests/ui/pattern/issue-72565.stderr7
-rw-r--r--tests/ui/pattern/non-constant-in-const-path.stderr14
-rw-r--r--tests/ui/pattern/non-structural-match-types.stderr8
-rw-r--r--tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.rs2
-rw-r--r--tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr17
-rw-r--r--tests/ui/pattern/usefulness/consts-opaque.stderr72
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr17
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr17
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.stderr17
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.stderr17
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.stderr17
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.stderr17
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-not-structurally-matchable.stderr90
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs3
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr12
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs12
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.stderr38
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr18
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-6804-nan-match.stderr35
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.rs4
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr19
-rw-r--r--tests/ui/self/arbitrary-self-opaque.rs1
-rw-r--r--tests/ui/self/arbitrary-self-opaque.stderr14
-rw-r--r--tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs26
-rw-r--r--tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.stderr50
-rw-r--r--tests/ui/traits/bound/unknown-assoc-with-const-arg.rs2
-rw-r--r--tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr22
-rw-r--r--tests/ui/type-alias-impl-trait/bad-tait-no-substs.rs1
-rw-r--r--tests/ui/type-alias-impl-trait/bad-tait-no-substs.stderr22
-rw-r--r--tests/ui/type-alias-impl-trait/const_generic_type.infer.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/const_generic_type.no_infer.stderr16
-rw-r--r--tests/ui/type-alias-impl-trait/const_generic_type.rs1
-rw-r--r--tests/ui/type-alias-impl-trait/hkl_forbidden4.rs1
-rw-r--r--tests/ui/type-alias-impl-trait/hkl_forbidden4.stderr22
-rw-r--r--tests/ui/type-alias-impl-trait/nested-tait-inference3.rs1
-rw-r--r--tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr12
-rw-r--r--tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs1
-rw-r--r--tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr12
-rw-r--r--tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr7
-rw-r--r--tests/ui/type-alias-impl-trait/structural-match.stderr7
-rw-r--r--tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs2
-rw-r--r--tests/ui/type/pattern_types/bad_pat.rs3
-rw-r--r--tests/ui/type/pattern_types/bad_pat.stderr6
-rw-r--r--tests/ui/type/pattern_types/const_generics.rs3
-rw-r--r--tests/ui/type/pattern_types/derives.rs3
-rw-r--r--tests/ui/type/pattern_types/derives.stderr2
-rw-r--r--tests/ui/type/pattern_types/feature-gate-pattern_types.rs10
-rw-r--r--tests/ui/type/pattern_types/feature-gate-pattern_types.stderr20
-rw-r--r--tests/ui/type/pattern_types/feature-gate-pattern_types2.rs2
-rw-r--r--tests/ui/type/pattern_types/missing-is.rs2
-rw-r--r--tests/ui/type/pattern_types/range_patterns.rs3
-rw-r--r--tests/ui/type/pattern_types/range_patterns.stderr10
-rw-r--r--tests/ui/type/pattern_types/range_patterns_inherent_impls.rs3
-rw-r--r--tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr4
-rw-r--r--tests/ui/type/pattern_types/range_patterns_trait_impls.rs3
-rw-r--r--tests/ui/type/pattern_types/range_patterns_trait_impls2.rs3
-rw-r--r--tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr2
-rw-r--r--tests/ui/type/pattern_types/range_patterns_unusable.rs3
-rw-r--r--tests/ui/type/pattern_types/range_patterns_unusable.stderr2
-rw-r--r--tests/ui/type/pattern_types/range_patterns_unusable_math.rs3
-rw-r--r--tests/ui/type/pattern_types/range_patterns_unusable_math.stderr2
-rw-r--r--tests/ui/type/pattern_types/range_patterns_usage.rs3
-rw-r--r--tests/ui/type/pattern_types/unimplemented_pat.rs3
-rw-r--r--tests/ui/type/pattern_types/unimplemented_pat.stderr4
-rw-r--r--tests/ui/union/union-const-pat.stderr5
-rw-r--r--tests/ui/unpretty/expanded-exhaustive.rs2
-rw-r--r--tests/ui/unpretty/expanded-exhaustive.stdout2
192 files changed, 2862 insertions, 2100 deletions
diff --git a/tests/codegen/pattern_type_symbols.rs b/tests/codegen/pattern_type_symbols.rs
index a99b3efca41..b504a3508f9 100644
--- a/tests/codegen/pattern_type_symbols.rs
+++ b/tests/codegen/pattern_type_symbols.rs
@@ -4,8 +4,7 @@
 //@ compile-flags: -Csymbol-mangling-version=v0 -Copt-level=0 --crate-type=lib
 
 #![feature(pattern_types)]
-#![feature(core_pattern_types)]
-#![feature(core_pattern_type)]
+#![feature(pattern_type_macro)]
 
 use std::pat::pattern_type;
 
diff --git a/tests/coverage/abort.cov-map b/tests/coverage/abort.cov-map
index c121fa551dc..396edec275d 100644
--- a/tests/coverage/abort.cov-map
+++ b/tests/coverage/abort.cov-map
@@ -1,34 +1,34 @@
 Function name: abort::main
-Raw bytes (89): 0x[01, 01, 0a, 01, 27, 05, 09, 03, 0d, 22, 11, 03, 0d, 03, 0d, 22, 15, 03, 0d, 03, 0d, 05, 09, 0d, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 09, 00, 0a, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 30, 00, 31, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 30, 00, 31, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02]
+Raw bytes (89): 0x[01, 01, 0a, 07, 09, 01, 05, 03, 0d, 03, 13, 0d, 11, 03, 0d, 03, 1f, 0d, 15, 03, 0d, 05, 09, 0d, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 09, 00, 0a, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 30, 00, 31, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 30, 00, 31, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 10
-- expression 0 operands: lhs = Counter(0), rhs = Expression(9, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(8, Sub), rhs = Counter(4)
-- expression 4 operands: lhs = Expression(0, Add), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(0, Add), rhs = Expression(4, Add)
+- expression 4 operands: lhs = Counter(3), rhs = Counter(4)
 - expression 5 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 6 operands: lhs = Expression(8, Sub), rhs = Counter(5)
-- expression 7 operands: lhs = Expression(0, Add), rhs = Counter(3)
+- expression 6 operands: lhs = Expression(0, Add), rhs = Expression(7, Add)
+- expression 7 operands: lhs = Counter(3), rhs = Counter(5)
 - expression 8 operands: lhs = Expression(0, Add), rhs = Counter(3)
 - expression 9 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 13
 - Code(Counter(0)) at (prev + 13, 1) to (start + 1, 27)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
-    = (c0 + (c1 + c2))
+    = ((c0 + c1) + c2)
 - Code(Expression(8, Sub)) at (prev + 1, 12) to (start + 0, 25)
-    = ((c0 + (c1 + c2)) - c3)
+    = (((c0 + c1) + c2) - c3)
 - Code(Counter(4)) at (prev + 0, 26) to (start + 2, 10)
 - Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 10)
-    = (((c0 + (c1 + c2)) - c3) - c4)
+    = (((c0 + c1) + c2) - (c3 + c4))
 - Code(Expression(8, Sub)) at (prev + 2, 12) to (start + 0, 25)
-    = ((c0 + (c1 + c2)) - c3)
+    = (((c0 + c1) + c2) - c3)
 - Code(Counter(5)) at (prev + 0, 26) to (start + 0, 49)
 - Code(Expression(6, Sub)) at (prev + 0, 48) to (start + 0, 49)
-    = (((c0 + (c1 + c2)) - c3) - c5)
+    = (((c0 + c1) + c2) - (c3 + c5))
 - Code(Expression(8, Sub)) at (prev + 4, 12) to (start + 0, 25)
-    = ((c0 + (c1 + c2)) - c3)
+    = (((c0 + c1) + c2) - c3)
 - Code(Counter(1)) at (prev + 0, 26) to (start + 0, 49)
 - Code(Counter(2)) at (prev + 0, 48) to (start + 0, 49)
 - Code(Expression(9, Add)) at (prev + 1, 9) to (start + 0, 23)
diff --git a/tests/coverage/assert.cov-map b/tests/coverage/assert.cov-map
index b3cec390119..3bbf7a43e6d 100644
--- a/tests/coverage/assert.cov-map
+++ b/tests/coverage/assert.cov-map
@@ -1,29 +1,30 @@
 Function name: assert::main
-Raw bytes (65): 0x[01, 01, 08, 01, 1b, 05, 1f, 09, 0d, 03, 11, 16, 05, 03, 11, 05, 1f, 09, 0d, 09, 01, 09, 01, 01, 1b, 03, 02, 0b, 00, 18, 16, 01, 0c, 00, 1a, 05, 00, 1b, 02, 0a, 12, 02, 13, 00, 20, 09, 00, 21, 02, 0a, 0d, 02, 09, 00, 0a, 1b, 01, 09, 00, 17, 11, 02, 05, 01, 02]
+Raw bytes (67): 0x[01, 01, 09, 07, 0d, 0b, 09, 01, 05, 03, 11, 17, 11, 1b, 0d, 01, 09, 23, 0d, 05, 09, 09, 01, 09, 01, 01, 1b, 03, 02, 0b, 00, 18, 0e, 01, 0c, 00, 1a, 05, 00, 1b, 02, 0a, 12, 02, 13, 00, 20, 09, 00, 21, 02, 0a, 0d, 02, 09, 00, 0a, 1f, 01, 09, 00, 17, 11, 02, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 8
-- expression 0 operands: lhs = Counter(0), rhs = Expression(6, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+Number of expressions: 9
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 3 operands: lhs = Expression(0, Add), rhs = Counter(4)
-- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(1)
-- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(4)
-- expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(4)
+- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(3)
+- expression 6 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(3)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 9, 1) to (start + 1, 27)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
-    = (c0 + (c1 + (c2 + c3)))
-- Code(Expression(5, Sub)) at (prev + 1, 12) to (start + 0, 26)
-    = ((c0 + (c1 + (c2 + c3))) - c4)
+    = (((c0 + c1) + c2) + c3)
+- Code(Expression(3, Sub)) at (prev + 1, 12) to (start + 0, 26)
+    = ((((c0 + c1) + c2) + c3) - c4)
 - Code(Counter(1)) at (prev + 0, 27) to (start + 2, 10)
 - Code(Expression(4, Sub)) at (prev + 2, 19) to (start + 0, 32)
-    = (((c0 + (c1 + (c2 + c3))) - c4) - c1)
+    = (((c0 + c2) + c3) - c4)
 - Code(Counter(2)) at (prev + 0, 33) to (start + 2, 10)
 - Code(Counter(3)) at (prev + 2, 9) to (start + 0, 10)
-- Code(Expression(6, Add)) at (prev + 1, 9) to (start + 0, 23)
-    = (c1 + (c2 + c3))
+- Code(Expression(7, Add)) at (prev + 1, 9) to (start + 0, 23)
+    = ((c1 + c2) + c3)
 - Code(Counter(4)) at (prev + 2, 5) to (start + 1, 2)
 Highest counter ID seen: c4
 
diff --git a/tests/coverage/async.cov-map b/tests/coverage/async.cov-map
index 9a67cefcf98..c51bc6eb621 100644
--- a/tests/coverage/async.cov-map
+++ b/tests/coverage/async.cov-map
@@ -155,25 +155,25 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: async::i::{closure#0}
-Raw bytes (63): 0x[01, 01, 02, 07, 19, 11, 15, 0b, 01, 2d, 13, 04, 0c, 09, 05, 09, 00, 0a, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 0d, 00, 0e, 00, 17, 1d, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 19, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
+Raw bytes (63): 0x[01, 01, 02, 07, 15, 0d, 11, 0b, 01, 2d, 13, 04, 0c, 09, 05, 09, 00, 0a, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 11, 01, 09, 00, 0a, 19, 00, 0e, 00, 17, 1d, 00, 1b, 00, 20, 11, 00, 24, 00, 26, 15, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(6)
-- expression 1 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(5)
+- expression 1 operands: lhs = Counter(3), rhs = Counter(4)
 Number of file 0 mappings: 11
 - Code(Counter(0)) at (prev + 45, 19) to (start + 4, 12)
 - Code(Counter(2)) at (prev + 5, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 14) to (start + 0, 24)
 - Code(Counter(1)) at (prev + 0, 28) to (start + 0, 33)
 - Code(Counter(2)) at (prev + 0, 39) to (start + 0, 48)
-- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 10)
-- Code(Counter(3)) at (prev + 0, 14) to (start + 0, 23)
+- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 10)
+- Code(Counter(6)) at (prev + 0, 14) to (start + 0, 23)
 - Code(Counter(7)) at (prev + 0, 27) to (start + 0, 32)
-- Code(Counter(5)) at (prev + 0, 36) to (start + 0, 38)
-- Code(Counter(6)) at (prev + 1, 14) to (start + 0, 16)
+- Code(Counter(4)) at (prev + 0, 36) to (start + 0, 38)
+- Code(Counter(5)) at (prev + 1, 14) to (start + 0, 16)
 - Code(Expression(0, Add)) at (prev + 2, 1) to (start + 0, 2)
-    = ((c4 + c5) + c6)
+    = ((c3 + c4) + c5)
 Highest counter ID seen: c7
 
 Function name: async::j
@@ -243,22 +243,19 @@ Number of file 0 mappings: 5
 Highest counter ID seen: (none)
 
 Function name: async::l
-Raw bytes (37): 0x[01, 01, 04, 01, 07, 05, 09, 0f, 02, 09, 05, 05, 01, 52, 01, 01, 0c, 02, 02, 0e, 00, 10, 05, 01, 0e, 00, 10, 09, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
+Raw bytes (33): 0x[01, 01, 02, 01, 07, 05, 09, 05, 01, 52, 01, 01, 0c, 02, 02, 0e, 00, 10, 09, 01, 0e, 00, 10, 05, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Expression(0, Sub)
-- expression 3 operands: lhs = Counter(2), rhs = Counter(1)
 Number of file 0 mappings: 5
 - Code(Counter(0)) at (prev + 82, 1) to (start + 1, 12)
 - Code(Expression(0, Sub)) at (prev + 2, 14) to (start + 0, 16)
     = (c0 - (c1 + c2))
-- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 16)
 - Code(Counter(2)) at (prev + 1, 14) to (start + 0, 16)
-- Code(Expression(2, Add)) at (prev + 2, 1) to (start + 0, 2)
-    = ((c2 + c1) + (c0 - (c1 + c2)))
+- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 16)
+- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
 Highest counter ID seen: c2
 
 Function name: async::m
diff --git a/tests/coverage/branch/guard.cov-map b/tests/coverage/branch/guard.cov-map
index 0f33ed17a0a..1ba1c6e1228 100644
--- a/tests/coverage/branch/guard.cov-map
+++ b/tests/coverage/branch/guard.cov-map
@@ -1,5 +1,5 @@
 Function name: guard::branch_match_guard
-Raw bytes (85): 0x[01, 01, 06, 19, 0d, 05, 09, 0f, 15, 13, 11, 17, 0d, 05, 09, 0d, 01, 0c, 01, 01, 10, 1d, 03, 0b, 00, 0c, 15, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 19, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 02, 0a, 11, 03, 0e, 00, 0f, 1d, 00, 14, 00, 19, 20, 11, 09, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 17, 03, 0e, 02, 0a, 0b, 04, 01, 00, 02]
+Raw bytes (85): 0x[01, 01, 06, 19, 0d, 05, 09, 0f, 15, 13, 11, 17, 0d, 05, 09, 0d, 01, 0c, 01, 01, 10, 02, 03, 0b, 00, 0c, 15, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 19, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 02, 0a, 11, 03, 0e, 00, 0f, 02, 00, 14, 00, 19, 20, 11, 05, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 17, 03, 0e, 02, 0a, 0b, 04, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 6
@@ -11,7 +11,8 @@ Number of expressions: 6
 - expression 5 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 13
 - Code(Counter(0)) at (prev + 12, 1) to (start + 1, 16)
-- Code(Counter(7)) at (prev + 3, 11) to (start + 0, 12)
+- Code(Expression(0, Sub)) at (prev + 3, 11) to (start + 0, 12)
+    = (c6 - c3)
 - Code(Counter(5)) at (prev + 1, 20) to (start + 2, 10)
 - Code(Counter(3)) at (prev + 3, 14) to (start + 0, 15)
 - Code(Counter(6)) at (prev + 0, 20) to (start + 0, 25)
@@ -20,14 +21,15 @@ Number of file 0 mappings: 13
     false = (c6 - c3)
 - Code(Counter(3)) at (prev + 0, 29) to (start + 2, 10)
 - Code(Counter(4)) at (prev + 3, 14) to (start + 0, 15)
-- Code(Counter(7)) at (prev + 0, 20) to (start + 0, 25)
-- Branch { true: Counter(4), false: Counter(2) } at (prev + 0, 20) to (start + 0, 30)
+- Code(Expression(0, Sub)) at (prev + 0, 20) to (start + 0, 25)
+    = (c6 - c3)
+- Branch { true: Counter(4), false: Counter(1) } at (prev + 0, 20) to (start + 0, 30)
     true  = c4
-    false = c2
+    false = c1
 - Code(Counter(4)) at (prev + 0, 29) to (start + 2, 10)
 - Code(Expression(5, Add)) at (prev + 3, 14) to (start + 2, 10)
     = (c1 + c2)
 - Code(Expression(2, Add)) at (prev + 4, 1) to (start + 0, 2)
     = ((((c1 + c2) + c3) + c4) + c5)
-Highest counter ID seen: c7
+Highest counter ID seen: c6
 
diff --git a/tests/coverage/branch/if.cov-map b/tests/coverage/branch/if.cov-map
index 0ad78a720a7..bab982dd44c 100644
--- a/tests/coverage/branch/if.cov-map
+++ b/tests/coverage/branch/if.cov-map
@@ -1,12 +1,14 @@
 Function name: if::branch_and
-Raw bytes (56): 0x[01, 01, 04, 05, 09, 0d, 02, 11, 0f, 0d, 02, 08, 01, 2b, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 09, 00, 0d, 00, 0e, 20, 11, 0d, 00, 0d, 00, 0e, 11, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (60): 0x[01, 01, 06, 05, 09, 0b, 09, 05, 11, 13, 09, 17, 11, 05, 0d, 08, 01, 2b, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 09, 00, 0d, 00, 0e, 20, 0d, 11, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 6
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 1 operands: lhs = Counter(3), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(4), rhs = Expression(3, Add)
-- expression 3 operands: lhs = Counter(3), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(2)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(4)
+- expression 5 operands: lhs = Counter(1), rhs = Counter(3)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 43, 1) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 3, 8) to (start + 0, 9)
@@ -14,14 +16,14 @@ Number of file 0 mappings: 8
     true  = c2
     false = (c1 - c2)
 - Code(Counter(2)) at (prev + 0, 13) to (start + 0, 14)
-- Branch { true: Counter(4), false: Counter(3) } at (prev + 0, 13) to (start + 0, 14)
-    true  = c4
-    false = c3
-- Code(Counter(4)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(3, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c3 + (c1 - c2))
-- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c4 + (c3 + (c1 - c2)))
+- Branch { true: Counter(3), false: Counter(4) } at (prev + 0, 13) to (start + 0, 14)
+    true  = c3
+    false = c4
+- Code(Counter(3)) at (prev + 0, 15) to (start + 2, 6)
+- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c1 + c4) - c2)
+- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c1 + c3) + c4) - c2)
 Highest counter ID seen: c4
 
 Function name: if::branch_not
diff --git a/tests/coverage/branch/lazy-boolean.cov-map b/tests/coverage/branch/lazy-boolean.cov-map
index c2b6a5b8df2..decb847f60e 100644
--- a/tests/coverage/branch/lazy-boolean.cov-map
+++ b/tests/coverage/branch/lazy-boolean.cov-map
@@ -34,39 +34,49 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c2
 
 Function name: lazy_boolean::chain
-Raw bytes (149): 0x[01, 01, 13, 11, 07, 0b, 16, 15, 1a, 09, 0d, 05, 09, 05, 09, 09, 0d, 47, 25, 4b, 21, 19, 1d, 03, 19, 03, 19, 3e, 1d, 03, 19, 3e, 1d, 03, 19, 47, 25, 4b, 21, 19, 1d, 13, 01, 24, 01, 01, 10, 03, 04, 09, 00, 0a, 05, 00, 0d, 00, 12, 20, 09, 16, 00, 0d, 00, 12, 09, 00, 16, 00, 1b, 20, 0d, 1a, 00, 16, 00, 1b, 0d, 00, 1f, 00, 24, 20, 11, 15, 00, 1f, 00, 24, 11, 00, 28, 00, 2d, 03, 01, 05, 00, 11, 43, 03, 09, 00, 0a, 03, 00, 0d, 00, 12, 20, 19, 3e, 00, 0d, 00, 12, 3e, 00, 16, 00, 1b, 20, 1d, 3a, 00, 16, 00, 1b, 3a, 00, 1f, 00, 24, 20, 21, 25, 00, 1f, 00, 24, 25, 00, 28, 00, 2d, 43, 01, 05, 01, 02]
+Raw bytes (169): 0x[01, 01, 1d, 5b, 0d, 5f, 15, 05, 11, 05, 09, 09, 0d, 6f, 25, 73, 21, 19, 1d, 5b, 67, 5f, 15, 05, 11, 0d, 19, 5b, 67, 5f, 15, 05, 11, 0d, 19, 5b, 63, 5f, 15, 05, 11, 67, 1d, 0d, 19, 5b, 63, 5f, 15, 05, 11, 67, 1d, 0d, 19, 6f, 25, 73, 21, 19, 1d, 13, 01, 24, 01, 01, 10, 02, 04, 09, 00, 0a, 05, 00, 0d, 00, 12, 20, 09, 0e, 00, 0d, 00, 12, 09, 00, 16, 00, 1b, 20, 0d, 12, 00, 16, 00, 1b, 0d, 00, 1f, 00, 24, 20, 11, 15, 00, 1f, 00, 24, 11, 00, 28, 00, 2d, 02, 01, 05, 00, 11, 6b, 03, 09, 00, 0a, 02, 00, 0d, 00, 12, 20, 19, 32, 00, 0d, 00, 12, 32, 00, 16, 00, 1b, 20, 1d, 56, 00, 16, 00, 1b, 56, 00, 1f, 00, 24, 20, 21, 25, 00, 1f, 00, 24, 25, 00, 28, 00, 2d, 6b, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 19
-- expression 0 operands: lhs = Counter(4), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Expression(5, Sub)
-- expression 2 operands: lhs = Counter(5), rhs = Expression(6, Sub)
-- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 7 operands: lhs = Expression(17, Add), rhs = Counter(9)
-- expression 8 operands: lhs = Expression(18, Add), rhs = Counter(8)
-- expression 9 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 10 operands: lhs = Expression(0, Add), rhs = Counter(6)
-- expression 11 operands: lhs = Expression(0, Add), rhs = Counter(6)
-- expression 12 operands: lhs = Expression(15, Sub), rhs = Counter(7)
-- expression 13 operands: lhs = Expression(0, Add), rhs = Counter(6)
-- expression 14 operands: lhs = Expression(15, Sub), rhs = Counter(7)
-- expression 15 operands: lhs = Expression(0, Add), rhs = Counter(6)
-- expression 16 operands: lhs = Expression(17, Add), rhs = Counter(9)
-- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(8)
-- expression 18 operands: lhs = Counter(6), rhs = Counter(7)
+Number of expressions: 29
+- expression 0 operands: lhs = Expression(22, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(23, Add), rhs = Counter(5)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 5 operands: lhs = Expression(27, Add), rhs = Counter(9)
+- expression 6 operands: lhs = Expression(28, Add), rhs = Counter(8)
+- expression 7 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 8 operands: lhs = Expression(22, Add), rhs = Expression(25, Add)
+- expression 9 operands: lhs = Expression(23, Add), rhs = Counter(5)
+- expression 10 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 11 operands: lhs = Counter(3), rhs = Counter(6)
+- expression 12 operands: lhs = Expression(22, Add), rhs = Expression(25, Add)
+- expression 13 operands: lhs = Expression(23, Add), rhs = Counter(5)
+- expression 14 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 15 operands: lhs = Counter(3), rhs = Counter(6)
+- expression 16 operands: lhs = Expression(22, Add), rhs = Expression(24, Add)
+- expression 17 operands: lhs = Expression(23, Add), rhs = Counter(5)
+- expression 18 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 19 operands: lhs = Expression(25, Add), rhs = Counter(7)
+- expression 20 operands: lhs = Counter(3), rhs = Counter(6)
+- expression 21 operands: lhs = Expression(22, Add), rhs = Expression(24, Add)
+- expression 22 operands: lhs = Expression(23, Add), rhs = Counter(5)
+- expression 23 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 24 operands: lhs = Expression(25, Add), rhs = Counter(7)
+- expression 25 operands: lhs = Counter(3), rhs = Counter(6)
+- expression 26 operands: lhs = Expression(27, Add), rhs = Counter(9)
+- expression 27 operands: lhs = Expression(28, Add), rhs = Counter(8)
+- expression 28 operands: lhs = Counter(6), rhs = Counter(7)
 Number of file 0 mappings: 19
 - Code(Counter(0)) at (prev + 36, 1) to (start + 1, 16)
-- Code(Expression(0, Add)) at (prev + 4, 9) to (start + 0, 10)
-    = (c4 + ((c5 + (c2 - c3)) + (c1 - c2)))
+- Code(Expression(0, Sub)) at (prev + 4, 9) to (start + 0, 10)
+    = (((c1 + c4) + c5) - c3)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 18)
-- Branch { true: Counter(2), false: Expression(5, Sub) } at (prev + 0, 13) to (start + 0, 18)
+- Branch { true: Counter(2), false: Expression(3, Sub) } at (prev + 0, 13) to (start + 0, 18)
     true  = c2
     false = (c1 - c2)
 - Code(Counter(2)) at (prev + 0, 22) to (start + 0, 27)
-- Branch { true: Counter(3), false: Expression(6, Sub) } at (prev + 0, 22) to (start + 0, 27)
+- Branch { true: Counter(3), false: Expression(4, Sub) } at (prev + 0, 22) to (start + 0, 27)
     true  = c3
     false = (c2 - c3)
 - Code(Counter(3)) at (prev + 0, 31) to (start + 0, 36)
@@ -74,97 +84,87 @@ Number of file 0 mappings: 19
     true  = c4
     false = c5
 - Code(Counter(4)) at (prev + 0, 40) to (start + 0, 45)
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 0, 17)
-    = (c4 + ((c5 + (c2 - c3)) + (c1 - c2)))
-- Code(Expression(16, Add)) at (prev + 3, 9) to (start + 0, 10)
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 17)
+    = (((c1 + c4) + c5) - c3)
+- Code(Expression(26, Add)) at (prev + 3, 9) to (start + 0, 10)
     = (((c6 + c7) + c8) + c9)
-- Code(Expression(0, Add)) at (prev + 0, 13) to (start + 0, 18)
-    = (c4 + ((c5 + (c2 - c3)) + (c1 - c2)))
-- Branch { true: Counter(6), false: Expression(15, Sub) } at (prev + 0, 13) to (start + 0, 18)
+- Code(Expression(0, Sub)) at (prev + 0, 13) to (start + 0, 18)
+    = (((c1 + c4) + c5) - c3)
+- Branch { true: Counter(6), false: Expression(12, Sub) } at (prev + 0, 13) to (start + 0, 18)
     true  = c6
-    false = ((c4 + ((c5 + (c2 - c3)) + (c1 - c2))) - c6)
-- Code(Expression(15, Sub)) at (prev + 0, 22) to (start + 0, 27)
-    = ((c4 + ((c5 + (c2 - c3)) + (c1 - c2))) - c6)
-- Branch { true: Counter(7), false: Expression(14, Sub) } at (prev + 0, 22) to (start + 0, 27)
+    false = (((c1 + c4) + c5) - (c3 + c6))
+- Code(Expression(12, Sub)) at (prev + 0, 22) to (start + 0, 27)
+    = (((c1 + c4) + c5) - (c3 + c6))
+- Branch { true: Counter(7), false: Expression(21, Sub) } at (prev + 0, 22) to (start + 0, 27)
     true  = c7
-    false = (((c4 + ((c5 + (c2 - c3)) + (c1 - c2))) - c6) - c7)
-- Code(Expression(14, Sub)) at (prev + 0, 31) to (start + 0, 36)
-    = (((c4 + ((c5 + (c2 - c3)) + (c1 - c2))) - c6) - c7)
+    false = (((c1 + c4) + c5) - ((c3 + c6) + c7))
+- Code(Expression(21, Sub)) at (prev + 0, 31) to (start + 0, 36)
+    = (((c1 + c4) + c5) - ((c3 + c6) + c7))
 - Branch { true: Counter(8), false: Counter(9) } at (prev + 0, 31) to (start + 0, 36)
     true  = c8
     false = c9
 - Code(Counter(9)) at (prev + 0, 40) to (start + 0, 45)
-- Code(Expression(16, Add)) at (prev + 1, 5) to (start + 1, 2)
+- Code(Expression(26, Add)) at (prev + 1, 5) to (start + 1, 2)
     = (((c6 + c7) + c8) + c9)
 Highest counter ID seen: c9
 
 Function name: lazy_boolean::nested_mixed
-Raw bytes (155): 0x[01, 01, 16, 33, 1a, 09, 0d, 1e, 0d, 05, 09, 05, 09, 05, 09, 1e, 0d, 05, 09, 09, 0d, 33, 11, 09, 0d, 33, 11, 09, 0d, 19, 57, 1d, 21, 03, 15, 15, 19, 4a, 4e, 15, 19, 03, 15, 19, 57, 1d, 21, 13, 01, 31, 01, 01, 10, 03, 04, 09, 00, 0a, 05, 00, 0e, 00, 13, 20, 09, 1e, 00, 0e, 00, 13, 1e, 00, 17, 00, 1d, 20, 0d, 1a, 00, 17, 00, 1d, 33, 00, 23, 00, 28, 20, 11, 2e, 00, 23, 00, 28, 2e, 00, 2c, 00, 33, 03, 01, 05, 00, 11, 53, 03, 09, 00, 0a, 03, 00, 0e, 00, 13, 20, 15, 4e, 00, 0e, 00, 13, 15, 00, 17, 00, 1c, 20, 19, 4a, 00, 17, 00, 1c, 47, 00, 22, 00, 28, 20, 1d, 21, 00, 22, 00, 28, 1d, 00, 2c, 00, 33, 53, 01, 05, 01, 02]
+Raw bytes (141): 0x[01, 01, 0f, 05, 09, 05, 1f, 09, 0d, 09, 0d, 1f, 11, 09, 0d, 1f, 11, 09, 0d, 3b, 21, 19, 1d, 05, 15, 15, 19, 05, 19, 3b, 21, 19, 1d, 13, 01, 31, 01, 01, 10, 05, 04, 09, 00, 0a, 05, 00, 0e, 00, 13, 20, 09, 02, 00, 0e, 00, 13, 02, 00, 17, 00, 1d, 20, 0d, 06, 00, 17, 00, 1d, 1f, 00, 23, 00, 28, 20, 11, 1a, 00, 23, 00, 28, 1a, 00, 2c, 00, 33, 05, 01, 05, 00, 11, 37, 03, 09, 00, 0a, 05, 00, 0e, 00, 13, 20, 15, 2a, 00, 0e, 00, 13, 15, 00, 17, 00, 1c, 20, 19, 2e, 00, 17, 00, 1c, 32, 00, 22, 00, 28, 20, 1d, 21, 00, 22, 00, 28, 1d, 00, 2c, 00, 33, 37, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 22
-- expression 0 operands: lhs = Expression(12, Add), rhs = Expression(6, Sub)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 2 operands: lhs = Expression(7, Sub), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(3)
-- expression 7 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 8 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 9 operands: lhs = Expression(12, Add), rhs = Counter(4)
-- expression 10 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(4)
-- expression 12 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 13 operands: lhs = Counter(6), rhs = Expression(21, Add)
-- expression 14 operands: lhs = Counter(7), rhs = Counter(8)
-- expression 15 operands: lhs = Expression(0, Add), rhs = Counter(5)
-- expression 16 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 17 operands: lhs = Expression(18, Sub), rhs = Expression(19, Sub)
-- expression 18 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 19 operands: lhs = Expression(0, Add), rhs = Counter(5)
-- expression 20 operands: lhs = Counter(6), rhs = Expression(21, Add)
-- expression 21 operands: lhs = Counter(7), rhs = Counter(8)
+Number of expressions: 15
+- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(7, Add)
+- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(7, Add), rhs = Counter(4)
+- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(4)
+- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 8 operands: lhs = Expression(14, Add), rhs = Counter(8)
+- expression 9 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 10 operands: lhs = Counter(1), rhs = Counter(5)
+- expression 11 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 12 operands: lhs = Counter(1), rhs = Counter(6)
+- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(8)
+- expression 14 operands: lhs = Counter(6), rhs = Counter(7)
 Number of file 0 mappings: 19
 - Code(Counter(0)) at (prev + 49, 1) to (start + 1, 16)
-- Code(Expression(0, Add)) at (prev + 4, 9) to (start + 0, 10)
-    = ((c2 + c3) + ((c1 - c2) - c3))
+- Code(Counter(1)) at (prev + 4, 9) to (start + 0, 10)
 - Code(Counter(1)) at (prev + 0, 14) to (start + 0, 19)
-- Branch { true: Counter(2), false: Expression(7, Sub) } at (prev + 0, 14) to (start + 0, 19)
+- Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 14) to (start + 0, 19)
     true  = c2
     false = (c1 - c2)
-- Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 29)
+- Code(Expression(0, Sub)) at (prev + 0, 23) to (start + 0, 29)
     = (c1 - c2)
-- Branch { true: Counter(3), false: Expression(6, Sub) } at (prev + 0, 23) to (start + 0, 29)
+- Branch { true: Counter(3), false: Expression(1, Sub) } at (prev + 0, 23) to (start + 0, 29)
     true  = c3
-    false = ((c1 - c2) - c3)
-- Code(Expression(12, Add)) at (prev + 0, 35) to (start + 0, 40)
+    false = (c1 - (c2 + c3))
+- Code(Expression(7, Add)) at (prev + 0, 35) to (start + 0, 40)
     = (c2 + c3)
-- Branch { true: Counter(4), false: Expression(11, Sub) } at (prev + 0, 35) to (start + 0, 40)
+- Branch { true: Counter(4), false: Expression(6, Sub) } at (prev + 0, 35) to (start + 0, 40)
     true  = c4
     false = ((c2 + c3) - c4)
-- Code(Expression(11, Sub)) at (prev + 0, 44) to (start + 0, 51)
+- Code(Expression(6, Sub)) at (prev + 0, 44) to (start + 0, 51)
     = ((c2 + c3) - c4)
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 0, 17)
-    = ((c2 + c3) + ((c1 - c2) - c3))
-- Code(Expression(20, Add)) at (prev + 3, 9) to (start + 0, 10)
-    = (c6 + (c7 + c8))
-- Code(Expression(0, Add)) at (prev + 0, 14) to (start + 0, 19)
-    = ((c2 + c3) + ((c1 - c2) - c3))
-- Branch { true: Counter(5), false: Expression(19, Sub) } at (prev + 0, 14) to (start + 0, 19)
+- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 17)
+- Code(Expression(13, Add)) at (prev + 3, 9) to (start + 0, 10)
+    = ((c6 + c7) + c8)
+- Code(Counter(1)) at (prev + 0, 14) to (start + 0, 19)
+- Branch { true: Counter(5), false: Expression(10, Sub) } at (prev + 0, 14) to (start + 0, 19)
     true  = c5
-    false = (((c2 + c3) + ((c1 - c2) - c3)) - c5)
+    false = (c1 - c5)
 - Code(Counter(5)) at (prev + 0, 23) to (start + 0, 28)
-- Branch { true: Counter(6), false: Expression(18, Sub) } at (prev + 0, 23) to (start + 0, 28)
+- Branch { true: Counter(6), false: Expression(11, Sub) } at (prev + 0, 23) to (start + 0, 28)
     true  = c6
     false = (c5 - c6)
-- Code(Expression(17, Add)) at (prev + 0, 34) to (start + 0, 40)
-    = ((c5 - c6) + (((c2 + c3) + ((c1 - c2) - c3)) - c5))
+- Code(Expression(12, Sub)) at (prev + 0, 34) to (start + 0, 40)
+    = (c1 - c6)
 - Branch { true: Counter(7), false: Counter(8) } at (prev + 0, 34) to (start + 0, 40)
     true  = c7
     false = c8
 - Code(Counter(7)) at (prev + 0, 44) to (start + 0, 51)
-- Code(Expression(20, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = (c6 + (c7 + c8))
+- Code(Expression(13, Add)) at (prev + 1, 5) to (start + 1, 2)
+    = ((c6 + c7) + c8)
 Highest counter ID seen: c8
 
diff --git a/tests/coverage/branch/match-arms.cov-map b/tests/coverage/branch/match-arms.cov-map
index fd0366ee818..a93df9814ee 100644
--- a/tests/coverage/branch/match-arms.cov-map
+++ b/tests/coverage/branch/match-arms.cov-map
@@ -1,12 +1,12 @@
 Function name: match_arms::guards
-Raw bytes (88): 0x[01, 01, 08, 07, 15, 0b, 11, 0f, 0d, 00, 09, 17, 25, 1b, 21, 1f, 1d, 03, 19, 0c, 01, 30, 01, 01, 10, 29, 03, 0b, 00, 10, 19, 01, 11, 00, 29, 20, 19, 09, 00, 17, 00, 1b, 1d, 01, 11, 00, 29, 20, 1d, 0d, 00, 17, 00, 1b, 21, 01, 11, 00, 29, 20, 21, 11, 00, 17, 00, 1b, 25, 01, 11, 00, 29, 20, 25, 15, 00, 17, 00, 1b, 03, 01, 0e, 00, 18, 13, 03, 05, 01, 02]
+Raw bytes (88): 0x[01, 01, 08, 07, 00, 0b, 11, 0f, 0d, 05, 09, 17, 25, 1b, 21, 1f, 1d, 03, 19, 0c, 01, 30, 01, 01, 10, 29, 03, 0b, 00, 10, 19, 01, 11, 00, 29, 20, 19, 05, 00, 17, 00, 1b, 1d, 01, 11, 00, 29, 20, 1d, 09, 00, 17, 00, 1b, 21, 01, 11, 00, 29, 20, 21, 0d, 00, 17, 00, 1b, 25, 01, 11, 00, 29, 20, 25, 11, 00, 17, 00, 1b, 03, 01, 0e, 00, 18, 13, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 8
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(5)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Zero
 - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(4)
 - expression 2 operands: lhs = Expression(3, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Zero, rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 4 operands: lhs = Expression(5, Add), rhs = Counter(9)
 - expression 5 operands: lhs = Expression(6, Add), rhs = Counter(8)
 - expression 6 operands: lhs = Expression(7, Add), rhs = Counter(7)
@@ -15,81 +15,67 @@ Number of file 0 mappings: 12
 - Code(Counter(0)) at (prev + 48, 1) to (start + 1, 16)
 - Code(Counter(10)) at (prev + 3, 11) to (start + 0, 16)
 - Code(Counter(6)) at (prev + 1, 17) to (start + 0, 41)
-- Branch { true: Counter(6), false: Counter(2) } at (prev + 0, 23) to (start + 0, 27)
+- Branch { true: Counter(6), false: Counter(1) } at (prev + 0, 23) to (start + 0, 27)
     true  = c6
-    false = c2
+    false = c1
 - Code(Counter(7)) at (prev + 1, 17) to (start + 0, 41)
-- Branch { true: Counter(7), false: Counter(3) } at (prev + 0, 23) to (start + 0, 27)
+- Branch { true: Counter(7), false: Counter(2) } at (prev + 0, 23) to (start + 0, 27)
     true  = c7
-    false = c3
+    false = c2
 - Code(Counter(8)) at (prev + 1, 17) to (start + 0, 41)
-- Branch { true: Counter(8), false: Counter(4) } at (prev + 0, 23) to (start + 0, 27)
+- Branch { true: Counter(8), false: Counter(3) } at (prev + 0, 23) to (start + 0, 27)
     true  = c8
-    false = c4
+    false = c3
 - Code(Counter(9)) at (prev + 1, 17) to (start + 0, 41)
-- Branch { true: Counter(9), false: Counter(5) } at (prev + 0, 23) to (start + 0, 27)
+- Branch { true: Counter(9), false: Counter(4) } at (prev + 0, 23) to (start + 0, 27)
     true  = c9
-    false = c5
+    false = c4
 - Code(Expression(0, Add)) at (prev + 1, 14) to (start + 0, 24)
-    = ((((Zero + c2) + c3) + c4) + c5)
+    = ((((c1 + c2) + c3) + c4) + Zero)
 - Code(Expression(4, Add)) at (prev + 3, 5) to (start + 1, 2)
-    = ((((((((Zero + c2) + c3) + c4) + c5) + c6) + c7) + c8) + c9)
+    = ((((((((c1 + c2) + c3) + c4) + Zero) + c6) + c7) + c8) + c9)
 Highest counter ID seen: c10
 
 Function name: match_arms::match_arms
-Raw bytes (51): 0x[01, 01, 06, 05, 07, 0b, 11, 09, 0d, 13, 02, 17, 09, 11, 0d, 07, 01, 18, 01, 01, 10, 05, 03, 0b, 00, 10, 11, 01, 11, 00, 21, 0d, 01, 11, 00, 21, 09, 01, 11, 00, 21, 02, 01, 11, 00, 21, 0f, 03, 05, 01, 02]
+Raw bytes (45): 0x[01, 01, 03, 05, 07, 0b, 11, 09, 0d, 07, 01, 18, 01, 01, 10, 05, 03, 0b, 00, 10, 09, 01, 11, 00, 21, 0d, 01, 11, 00, 21, 11, 01, 11, 00, 21, 02, 01, 11, 00, 21, 05, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(1), rhs = Expression(1, Add)
 - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(4)
 - expression 2 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Expression(0, Sub)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(2)
-- expression 5 operands: lhs = Counter(4), rhs = Counter(3)
 Number of file 0 mappings: 7
 - Code(Counter(0)) at (prev + 24, 1) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 3, 11) to (start + 0, 16)
-- Code(Counter(4)) at (prev + 1, 17) to (start + 0, 33)
-- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 33)
 - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 33)
+- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 33)
+- Code(Counter(4)) at (prev + 1, 17) to (start + 0, 33)
 - Code(Expression(0, Sub)) at (prev + 1, 17) to (start + 0, 33)
     = (c1 - ((c2 + c3) + c4))
-- Code(Expression(3, Add)) at (prev + 3, 5) to (start + 1, 2)
-    = (((c4 + c3) + c2) + (c1 - ((c2 + c3) + c4)))
+- Code(Counter(1)) at (prev + 3, 5) to (start + 1, 2)
 Highest counter ID seen: c4
 
 Function name: match_arms::or_patterns
-Raw bytes (75): 0x[01, 01, 0d, 11, 0d, 05, 2f, 33, 11, 09, 0d, 09, 2a, 05, 2f, 33, 11, 09, 0d, 03, 27, 09, 2a, 05, 2f, 33, 11, 09, 0d, 09, 01, 25, 01, 01, 10, 05, 03, 0b, 00, 10, 11, 01, 11, 00, 12, 0d, 00, 1e, 00, 1f, 03, 00, 24, 00, 2e, 09, 01, 11, 00, 12, 2a, 00, 1e, 00, 1f, 27, 00, 24, 00, 2e, 23, 03, 05, 01, 02]
+Raw bytes (57): 0x[01, 01, 04, 09, 0d, 05, 0b, 03, 11, 05, 03, 09, 01, 25, 01, 01, 10, 05, 03, 0b, 00, 10, 09, 01, 11, 00, 12, 0d, 00, 1e, 00, 1f, 03, 00, 24, 00, 2e, 11, 01, 11, 00, 12, 06, 00, 1e, 00, 1f, 0e, 00, 24, 00, 2e, 05, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 13
-- expression 0 operands: lhs = Counter(4), rhs = Counter(3)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(11, Add)
-- expression 2 operands: lhs = Expression(12, Add), rhs = Counter(4)
-- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 4 operands: lhs = Counter(2), rhs = Expression(10, Sub)
-- expression 5 operands: lhs = Counter(1), rhs = Expression(11, Add)
-- expression 6 operands: lhs = Expression(12, Add), rhs = Counter(4)
-- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 8 operands: lhs = Expression(0, Add), rhs = Expression(9, Add)
-- expression 9 operands: lhs = Counter(2), rhs = Expression(10, Sub)
-- expression 10 operands: lhs = Counter(1), rhs = Expression(11, Add)
-- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(4)
-- expression 12 operands: lhs = Counter(2), rhs = Counter(3)
+Number of expressions: 4
+- expression 0 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
+- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(0, Add)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 37, 1) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 3, 11) to (start + 0, 16)
-- Code(Counter(4)) at (prev + 1, 17) to (start + 0, 18)
+- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18)
 - Code(Counter(3)) at (prev + 0, 30) to (start + 0, 31)
 - Code(Expression(0, Add)) at (prev + 0, 36) to (start + 0, 46)
-    = (c4 + c3)
-- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18)
-- Code(Expression(10, Sub)) at (prev + 0, 30) to (start + 0, 31)
+    = (c2 + c3)
+- Code(Counter(4)) at (prev + 1, 17) to (start + 0, 18)
+- Code(Expression(1, Sub)) at (prev + 0, 30) to (start + 0, 31)
     = (c1 - ((c2 + c3) + c4))
-- Code(Expression(9, Add)) at (prev + 0, 36) to (start + 0, 46)
-    = (c2 + (c1 - ((c2 + c3) + c4)))
-- Code(Expression(8, Add)) at (prev + 3, 5) to (start + 1, 2)
-    = ((c4 + c3) + (c2 + (c1 - ((c2 + c3) + c4))))
+- Code(Expression(3, Sub)) at (prev + 0, 36) to (start + 0, 46)
+    = (c1 - (c2 + c3))
+- Code(Counter(1)) at (prev + 3, 5) to (start + 1, 2)
 Highest counter ID seen: c4
 
diff --git a/tests/coverage/branch/no-mir-spans.cov-map b/tests/coverage/branch/no-mir-spans.cov-map
index ab12732b1ed..6003efc36ca 100644
--- a/tests/coverage/branch/no-mir-spans.cov-map
+++ b/tests/coverage/branch/no-mir-spans.cov-map
@@ -23,19 +23,19 @@ Number of file 0 mappings: 2
 Highest counter ID seen: c2
 
 Function name: no_mir_spans::while_op_and
-Raw bytes (25): 0x[01, 01, 01, 09, 0d, 03, 01, 22, 01, 00, 13, 20, 09, 05, 05, 0b, 00, 10, 20, 02, 0d, 00, 14, 00, 19]
+Raw bytes (25): 0x[01, 01, 01, 05, 09, 03, 01, 22, 01, 00, 13, 20, 05, 0d, 05, 0b, 00, 10, 20, 02, 09, 00, 14, 00, 19]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
-- expression 0 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 34, 1) to (start + 0, 19)
-- Branch { true: Counter(2), false: Counter(1) } at (prev + 5, 11) to (start + 0, 16)
-    true  = c2
-    false = c1
-- Branch { true: Expression(0, Sub), false: Counter(3) } at (prev + 0, 20) to (start + 0, 25)
-    true  = (c2 - c3)
+- Branch { true: Counter(1), false: Counter(3) } at (prev + 5, 11) to (start + 0, 16)
+    true  = c1
     false = c3
+- Branch { true: Expression(0, Sub), false: Counter(2) } at (prev + 0, 20) to (start + 0, 25)
+    true  = (c1 - c2)
+    false = c2
 Highest counter ID seen: c3
 
 Function name: no_mir_spans::while_op_or
diff --git a/tests/coverage/branch/while.cov-map b/tests/coverage/branch/while.cov-map
index d5840a2c320..305f6bc74d8 100644
--- a/tests/coverage/branch/while.cov-map
+++ b/tests/coverage/branch/while.cov-map
@@ -35,14 +35,14 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c2
 
 Function name: while::while_op_and
-Raw bytes (56): 0x[01, 01, 04, 05, 09, 03, 0d, 03, 0d, 11, 0d, 08, 01, 1e, 01, 01, 10, 05, 03, 09, 01, 12, 03, 02, 0b, 00, 10, 20, 0a, 0d, 00, 0b, 00, 10, 0a, 00, 14, 00, 19, 20, 09, 11, 00, 14, 00, 19, 09, 00, 1a, 03, 06, 0f, 04, 01, 00, 02]
+Raw bytes (56): 0x[01, 01, 04, 05, 09, 03, 0d, 03, 0d, 0d, 11, 08, 01, 1e, 01, 01, 10, 05, 03, 09, 01, 12, 03, 02, 0b, 00, 10, 20, 0a, 0d, 00, 0b, 00, 10, 0a, 00, 14, 00, 19, 20, 09, 11, 00, 14, 00, 19, 09, 00, 1a, 03, 06, 0f, 04, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 1 operands: lhs = Expression(0, Add), rhs = Counter(3)
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(4), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 30, 1) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 3, 9) to (start + 1, 18)
@@ -58,39 +58,34 @@ Number of file 0 mappings: 8
     false = c4
 - Code(Counter(2)) at (prev + 0, 26) to (start + 3, 6)
 - Code(Expression(3, Add)) at (prev + 4, 1) to (start + 0, 2)
-    = (c4 + c3)
+    = (c3 + c4)
 Highest counter ID seen: c4
 
 Function name: while::while_op_or
-Raw bytes (66): 0x[01, 01, 09, 05, 1b, 09, 0d, 03, 09, 03, 09, 22, 0d, 03, 09, 09, 0d, 22, 0d, 03, 09, 08, 01, 29, 01, 01, 10, 05, 03, 09, 01, 12, 03, 02, 0b, 00, 10, 20, 09, 22, 00, 0b, 00, 10, 22, 00, 14, 00, 19, 20, 0d, 1e, 00, 14, 00, 19, 1b, 00, 1a, 03, 06, 1e, 04, 01, 00, 02]
+Raw bytes (58): 0x[01, 01, 05, 07, 0d, 05, 09, 05, 0d, 05, 0d, 09, 0d, 08, 01, 29, 01, 01, 10, 05, 03, 09, 01, 12, 03, 02, 0b, 00, 10, 20, 09, 0f, 00, 0b, 00, 10, 0f, 00, 14, 00, 19, 20, 0d, 05, 00, 14, 00, 19, 13, 00, 1a, 03, 06, 05, 04, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 9
-- expression 0 operands: lhs = Counter(1), rhs = Expression(6, Add)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(2)
-- expression 3 operands: lhs = Expression(0, Add), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(8, Sub), rhs = Counter(3)
-- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(2)
-- expression 6 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(3)
-- expression 8 operands: lhs = Expression(0, Add), rhs = Counter(2)
+Number of expressions: 5
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(1), rhs = Counter(3)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 41, 1) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 3, 9) to (start + 1, 18)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 16)
-    = (c1 + (c2 + c3))
-- Branch { true: Counter(2), false: Expression(8, Sub) } at (prev + 0, 11) to (start + 0, 16)
+    = ((c1 + c2) + c3)
+- Branch { true: Counter(2), false: Expression(3, Add) } at (prev + 0, 11) to (start + 0, 16)
     true  = c2
-    false = ((c1 + (c2 + c3)) - c2)
-- Code(Expression(8, Sub)) at (prev + 0, 20) to (start + 0, 25)
-    = ((c1 + (c2 + c3)) - c2)
-- Branch { true: Counter(3), false: Expression(7, Sub) } at (prev + 0, 20) to (start + 0, 25)
+    false = (c1 + c3)
+- Code(Expression(3, Add)) at (prev + 0, 20) to (start + 0, 25)
+    = (c1 + c3)
+- Branch { true: Counter(3), false: Counter(1) } at (prev + 0, 20) to (start + 0, 25)
     true  = c3
-    false = (((c1 + (c2 + c3)) - c2) - c3)
-- Code(Expression(6, Add)) at (prev + 0, 26) to (start + 3, 6)
+    false = c1
+- Code(Expression(4, Add)) at (prev + 0, 26) to (start + 3, 6)
     = (c2 + c3)
-- Code(Expression(7, Sub)) at (prev + 4, 1) to (start + 0, 2)
-    = (((c1 + (c2 + c3)) - c2) - c3)
+- Code(Counter(1)) at (prev + 4, 1) to (start + 0, 2)
 Highest counter ID seen: c3
 
diff --git a/tests/coverage/closure_macro.cov-map b/tests/coverage/closure_macro.cov-map
index 7c9d3292f98..aedb924eca8 100644
--- a/tests/coverage/closure_macro.cov-map
+++ b/tests/coverage/closure_macro.cov-map
@@ -25,13 +25,13 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c1
 
 Function name: closure_macro::main::{closure#0}
-Raw bytes (35): 0x[01, 01, 03, 01, 05, 05, 0b, 09, 0d, 05, 01, 10, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 0d, 00, 17, 00, 1e, 07, 02, 09, 00, 0a]
+Raw bytes (35): 0x[01, 01, 03, 01, 05, 0b, 0d, 05, 09, 05, 01, 10, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 0d, 00, 17, 00, 1e, 07, 02, 09, 00, 0a]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 5
 - Code(Counter(0)) at (prev + 16, 28) to (start + 3, 33)
 - Code(Counter(1)) at (prev + 4, 17) to (start + 1, 39)
@@ -39,6 +39,6 @@ Number of file 0 mappings: 5
     = (c0 - c1)
 - Code(Counter(3)) at (prev + 0, 23) to (start + 0, 30)
 - Code(Expression(1, Add)) at (prev + 2, 9) to (start + 0, 10)
-    = (c1 + (c2 + c3))
+    = ((c1 + c2) + c3)
 Highest counter ID seen: c3
 
diff --git a/tests/coverage/closure_macro_async.cov-map b/tests/coverage/closure_macro_async.cov-map
index e2a52e57015..5b99889514c 100644
--- a/tests/coverage/closure_macro_async.cov-map
+++ b/tests/coverage/closure_macro_async.cov-map
@@ -34,13 +34,13 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c1
 
 Function name: closure_macro_async::test::{closure#0}::{closure#0}
-Raw bytes (35): 0x[01, 01, 03, 01, 05, 05, 0b, 09, 0d, 05, 01, 15, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 0d, 00, 17, 00, 1e, 07, 02, 09, 00, 0a]
+Raw bytes (35): 0x[01, 01, 03, 01, 05, 0b, 0d, 05, 09, 05, 01, 15, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 0d, 00, 17, 00, 1e, 07, 02, 09, 00, 0a]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 5
 - Code(Counter(0)) at (prev + 21, 28) to (start + 3, 33)
 - Code(Counter(1)) at (prev + 4, 17) to (start + 1, 39)
@@ -48,6 +48,6 @@ Number of file 0 mappings: 5
     = (c0 - c1)
 - Code(Counter(3)) at (prev + 0, 23) to (start + 0, 30)
 - Code(Expression(1, Add)) at (prev + 2, 9) to (start + 0, 10)
-    = (c1 + (c2 + c3))
+    = ((c1 + c2) + c3)
 Highest counter ID seen: c3
 
diff --git a/tests/coverage/condition/conditions.cov-map b/tests/coverage/condition/conditions.cov-map
index 208d671919c..72f39b88c6a 100644
--- a/tests/coverage/condition/conditions.cov-map
+++ b/tests/coverage/condition/conditions.cov-map
@@ -1,29 +1,27 @@
 Function name: conditions::assign_3_and_or
-Raw bytes (69): 0x[01, 01, 07, 07, 11, 09, 0d, 01, 05, 05, 09, 16, 1a, 05, 09, 01, 05, 09, 01, 1c, 01, 00, 2f, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 1a, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 16, 00, 12, 00, 13, 13, 00, 17, 00, 18, 20, 0d, 11, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (65): 0x[01, 01, 05, 07, 11, 09, 0d, 01, 05, 05, 09, 01, 09, 09, 01, 1c, 01, 00, 2f, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 0a, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 0e, 00, 12, 00, 13, 12, 00, 17, 00, 18, 20, 0d, 11, 00, 17, 00, 18, 03, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 7
+Number of expressions: 5
 - expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
 - expression 1 operands: lhs = Counter(2), rhs = Counter(3)
 - expression 2 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(5, Sub), rhs = Expression(6, Sub)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 4 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 28, 1) to (start + 0, 47)
 - Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
     = ((c2 + c3) + c4)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- Branch { true: Counter(1), false: Expression(6, Sub) } at (prev + 0, 13) to (start + 0, 14)
+- Branch { true: Counter(1), false: Expression(2, Sub) } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
-- Branch { true: Counter(2), false: Expression(5, Sub) } at (prev + 0, 18) to (start + 0, 19)
+- Branch { true: Counter(2), false: Expression(3, Sub) } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
     false = (c1 - c2)
-- Code(Expression(4, Add)) at (prev + 0, 23) to (start + 0, 24)
-    = ((c1 - c2) + (c0 - c1))
+- Code(Expression(4, Sub)) at (prev + 0, 23) to (start + 0, 24)
+    = (c0 - c2)
 - Branch { true: Counter(3), false: Counter(4) } at (prev + 0, 23) to (start + 0, 24)
     true  = c3
     false = c4
@@ -32,54 +30,54 @@ Number of file 0 mappings: 9
 Highest counter ID seen: c4
 
 Function name: conditions::assign_3_or_and
-Raw bytes (73): 0x[01, 01, 09, 05, 07, 0b, 11, 09, 0d, 01, 05, 01, 05, 22, 11, 01, 05, 22, 11, 01, 05, 09, 01, 17, 01, 00, 2f, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 22, 00, 0d, 00, 0e, 22, 00, 12, 00, 13, 20, 1e, 11, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 20, 09, 0d, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (73): 0x[01, 01, 09, 07, 11, 0b, 0d, 05, 09, 01, 05, 01, 05, 01, 23, 05, 11, 01, 23, 05, 11, 09, 01, 17, 01, 00, 2f, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 12, 00, 0d, 00, 0e, 12, 00, 12, 00, 13, 20, 1e, 11, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 20, 09, 0d, 00, 17, 00, 18, 03, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 9
-- expression 0 operands: lhs = Counter(1), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(4)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 4 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 5 operands: lhs = Expression(8, Sub), rhs = Counter(4)
-- expression 6 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(4)
-- expression 8 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 5 operands: lhs = Counter(0), rhs = Expression(8, Add)
+- expression 6 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 7 operands: lhs = Counter(0), rhs = Expression(8, Add)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(4)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 23, 1) to (start + 0, 47)
 - Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = (c1 + ((c2 + c3) + c4))
+    = (((c1 + c2) + c3) + c4)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- Branch { true: Counter(1), false: Expression(8, Sub) } at (prev + 0, 13) to (start + 0, 14)
+- Branch { true: Counter(1), false: Expression(4, Sub) } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
-- Code(Expression(8, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(4, Sub)) at (prev + 0, 18) to (start + 0, 19)
     = (c0 - c1)
 - Branch { true: Expression(7, Sub), false: Counter(4) } at (prev + 0, 18) to (start + 0, 19)
-    true  = ((c0 - c1) - c4)
+    true  = (c0 - (c1 + c4))
     false = c4
 - Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = ((c0 - c1) - c4)
+    = (c0 - (c1 + c4))
 - Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 23) to (start + 0, 24)
     true  = c2
     false = c3
 - Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = (c1 + ((c2 + c3) + c4))
+    = (((c1 + c2) + c3) + c4)
 Highest counter ID seen: c4
 
 Function name: conditions::assign_and
-Raw bytes (51): 0x[01, 01, 04, 07, 0e, 09, 0d, 01, 05, 01, 05, 07, 01, 0d, 01, 00, 21, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 0e, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 0d, 00, 12, 00, 13, 03, 01, 05, 01, 02]
+Raw bytes (51): 0x[01, 01, 04, 07, 05, 0b, 0d, 01, 09, 01, 05, 07, 01, 0d, 01, 00, 21, 02, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 0e, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 0d, 00, 12, 00, 13, 02, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
-- expression 0 operands: lhs = Expression(1, Add), rhs = Expression(3, Sub)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(1)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 7
 - Code(Counter(0)) at (prev + 13, 1) to (start + 0, 33)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = ((c2 + c3) + (c0 - c1))
+- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
+    = (((c0 + c2) + c3) - c1)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - Branch { true: Counter(1), false: Expression(3, Sub) } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
@@ -88,8 +86,8 @@ Number of file 0 mappings: 7
 - Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
     false = c3
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c2 + c3) + (c0 - c1))
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 1, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: conditions::assign_or
@@ -128,13 +126,14 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: conditions::func_call
-Raw bytes (39): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 05, 01, 25, 01, 01, 0a, 20, 05, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 0f, 20, 09, 0d, 00, 0e, 00, 0f, 07, 01, 01, 00, 02]
+Raw bytes (41): 0x[01, 01, 04, 01, 05, 0b, 05, 0f, 0d, 01, 09, 05, 01, 25, 01, 01, 0a, 20, 05, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 0f, 20, 09, 0d, 00, 0e, 00, 0f, 06, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 3
+Number of expressions: 4
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 5
 - Code(Counter(0)) at (prev + 37, 1) to (start + 1, 10)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 1, 9) to (start + 0, 10)
@@ -144,8 +143,8 @@ Number of file 0 mappings: 5
 - Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 14) to (start + 0, 15)
     true  = c2
     false = c3
-- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = ((c2 + c3) + (c0 - c1))
+- Code(Expression(1, Sub)) at (prev + 1, 1) to (start + 0, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: conditions::simple_assign
diff --git a/tests/coverage/conditions.cov-map b/tests/coverage/conditions.cov-map
index 938e4404013..21b2ec9a19e 100644
--- a/tests/coverage/conditions.cov-map
+++ b/tests/coverage/conditions.cov-map
@@ -1,264 +1,294 @@
 Function name: conditions::main
-Raw bytes (799): 0x[01, 01, 94, 01, 09, 2b, 2f, 41, 33, 3d, 35, 39, 01, 09, 0d, 35, 1e, 39, 0d, 35, 33, 3d, 35, 39, 2f, 41, 33, 3d, 35, 39, ce, 04, 0d, 01, 09, 03, 49, 62, 31, 03, 49, 5e, 4d, 62, 31, 03, 49, 5a, 51, 5e, 4d, 62, 31, 03, 49, 87, 01, 55, 4d, 51, 83, 01, 59, 87, 01, 55, 4d, 51, 49, 7f, 83, 01, 59, 87, 01, 55, 4d, 51, 5d, 65, ae, 01, 2d, 5d, 65, aa, 01, 69, ae, 01, 2d, 5d, 65, a6, 01, 6d, aa, 01, 69, ae, 01, 2d, 5d, 65, f3, 02, 71, 69, 6d, ef, 02, 75, f3, 02, 71, 69, 6d, e7, 02, 00, 65, eb, 02, ef, 02, 75, f3, 02, 71, 69, 6d, 7d, 87, 04, 8b, 04, 8d, 01, 8f, 04, 89, 01, 81, 01, 85, 01, e7, 02, 00, 65, eb, 02, ef, 02, 75, f3, 02, 71, 69, 6d, e3, 02, 7d, e7, 02, 00, 65, eb, 02, ef, 02, 75, f3, 02, 71, 69, 6d, de, 02, 29, e3, 02, 7d, e7, 02, 00, 65, eb, 02, ef, 02, 75, f3, 02, 71, 69, 6d, da, 02, 81, 01, de, 02, 29, e3, 02, 7d, e7, 02, 00, 65, eb, 02, ef, 02, 75, f3, 02, 71, 69, 6d, d6, 02, 85, 01, da, 02, 81, 01, de, 02, 29, e3, 02, 7d, e7, 02, 00, 65, eb, 02, ef, 02, 75, f3, 02, 71, 69, 6d, 8f, 04, 89, 01, 81, 01, 85, 01, 8b, 04, 8d, 01, 8f, 04, 89, 01, 81, 01, 85, 01, 11, af, 04, b3, 04, 21, b7, 04, 1d, 15, 19, 7d, 87, 04, 8b, 04, 8d, 01, 8f, 04, 89, 01, 81, 01, 85, 01, 83, 04, 11, 7d, 87, 04, 8b, 04, 8d, 01, 8f, 04, 89, 01, 81, 01, 85, 01, fe, 03, 25, 83, 04, 11, 7d, 87, 04, 8b, 04, 8d, 01, 8f, 04, 89, 01, 81, 01, 85, 01, fa, 03, 15, fe, 03, 25, 83, 04, 11, 7d, 87, 04, 8b, 04, 8d, 01, 8f, 04, 89, 01, 81, 01, 85, 01, f6, 03, 19, fa, 03, 15, fe, 03, 25, 83, 04, 11, 7d, 87, 04, 8b, 04, 8d, 01, 8f, 04, 89, 01, 81, 01, 85, 01, b7, 04, 1d, 15, 19, b3, 04, 21, b7, 04, 1d, 15, 19, ab, 04, bb, 04, 11, af, 04, b3, 04, 21, b7, 04, 1d, 15, 19, bf, 04, ca, 04, c3, 04, 31, c7, 04, 2d, 25, 29, ce, 04, 0d, 01, 09, 44, 01, 03, 01, 02, 0c, 05, 02, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 03, 09, 00, 0a, 01, 00, 10, 00, 1d, 09, 01, 09, 01, 0a, ce, 04, 02, 0f, 00, 1c, 0d, 01, 0c, 00, 19, 1e, 00, 1d, 00, 2a, 1a, 00, 2e, 00, 3c, 2f, 00, 3d, 02, 0a, 41, 02, 09, 00, 0a, 2b, 01, 09, 01, 12, ca, 04, 03, 09, 00, 0f, 03, 03, 09, 01, 0c, 45, 01, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 02, 08, 00, 15, 49, 00, 16, 02, 06, 62, 02, 0f, 00, 1c, 5e, 01, 0c, 00, 19, 5a, 00, 1d, 00, 2a, 56, 00, 2e, 00, 3c, 83, 01, 00, 3d, 02, 0a, 59, 02, 09, 00, 0a, 7f, 01, 09, 00, 17, 31, 02, 09, 00, 0f, 7b, 03, 08, 00, 0c, 5d, 01, 0d, 01, 10, 61, 01, 11, 02, 0a, 00, 02, 09, 00, 0a, 5d, 02, 0c, 00, 19, 65, 00, 1a, 02, 0a, ae, 01, 04, 11, 00, 1e, aa, 01, 01, 10, 00, 1d, a6, 01, 00, 21, 00, 2e, a2, 01, 00, 32, 00, 40, ef, 02, 00, 41, 02, 0e, 75, 02, 0d, 00, 0e, eb, 02, 01, 0d, 00, 1b, 2d, 02, 0d, 00, 13, 00, 02, 05, 00, 06, e3, 02, 02, 09, 01, 0c, 79, 01, 0d, 02, 06, 00, 02, 05, 00, 06, 83, 04, 02, 09, 00, 0a, e3, 02, 00, 10, 00, 1d, 7d, 00, 1e, 02, 06, de, 02, 02, 0f, 00, 1c, da, 02, 01, 0c, 00, 19, d6, 02, 00, 1d, 00, 2a, d2, 02, 00, 2e, 00, 3c, 8b, 04, 00, 3d, 02, 0a, 8d, 01, 02, 09, 00, 0a, 87, 04, 01, 09, 00, 17, 29, 02, 0d, 02, 0f, ab, 04, 05, 09, 00, 0a, 83, 04, 00, 10, 00, 1d, 11, 00, 1e, 02, 06, fe, 03, 02, 0f, 00, 1c, fa, 03, 01, 0c, 00, 19, f6, 03, 00, 1d, 00, 2a, f2, 03, 00, 2e, 00, 3c, b3, 04, 00, 3d, 02, 0a, 21, 02, 09, 00, 0a, af, 04, 01, 09, 00, 17, 25, 02, 09, 00, 0f, a7, 04, 02, 01, 00, 02]
+Raw bytes (873): 0x[01, 01, b2, 01, 07, 19, 0b, 15, 0f, 11, 09, 0d, 01, 09, 8d, 01, 0d, 8d, 01, 33, 0d, 11, 33, 15, 0d, 11, 2f, 19, 33, 15, 0d, 11, 01, c7, 05, 09, 8d, 01, 03, 21, 03, 47, 21, 89, 01, 03, 4f, db, 03, 89, 01, 21, 25, 03, 5b, d7, 03, 89, 01, db, 03, 29, 21, 25, 77, 2d, 25, 29, 73, 31, 77, 2d, 25, 29, d3, 03, 31, d7, 03, 2d, db, 03, 29, 21, 25, 35, 3d, 35, 93, 01, 3d, 85, 01, 35, 9b, 01, af, 01, 85, 01, 3d, 41, 35, a7, 01, ab, 01, 85, 01, af, 01, 45, 3d, 41, c3, 01, 49, 41, 45, bf, 01, 4d, c3, 01, 49, 41, 45, bb, 03, 35, bf, 03, 4d, c3, 03, 49, c7, 03, 45, cb, 03, 41, cf, 03, 3d, d3, 03, 31, d7, 03, 2d, db, 03, 29, 21, 25, f3, 04, 65, f7, 04, 61, fb, 04, 5d, 55, 59, bb, 03, 35, bf, 03, 4d, c3, 03, 49, c7, 03, 45, cb, 03, 41, cf, 03, 3d, d3, 03, 31, d7, 03, 2d, db, 03, 29, 21, 25, bb, 03, eb, 03, bf, 03, 4d, c3, 03, 49, c7, 03, 45, cb, 03, 41, cf, 03, 3d, d3, 03, 31, d7, 03, 2d, db, 03, 29, 21, 25, 35, 55, bb, 03, fb, 02, bf, 03, 4d, c3, 03, 49, c7, 03, 45, cb, 03, 41, cf, 03, 3d, d3, 03, 31, d7, 03, 2d, db, 03, 29, 21, 25, eb, 03, 81, 01, 35, 55, bb, 03, ab, 03, bf, 03, 4d, c3, 03, 49, c7, 03, 45, cb, 03, 41, cf, 03, 3d, d3, 03, 31, d7, 03, 2d, db, 03, 29, 21, 25, e7, 03, 81, 01, eb, 03, 59, 35, 55, bb, 03, df, 03, bf, 03, 4d, c3, 03, 49, c7, 03, 45, cb, 03, 41, cf, 03, 3d, d3, 03, 31, d7, 03, 2d, db, 03, 29, 21, 25, e3, 03, 81, 01, e7, 03, 5d, eb, 03, 59, 35, 55, ff, 03, 61, 59, 5d, fb, 03, 65, ff, 03, 61, 59, 5d, 87, 04, 79, 83, 05, 75, 87, 05, 71, 69, 6d, f3, 04, 65, f7, 04, 61, fb, 04, 5d, 55, 59, ef, 04, 69, f3, 04, 65, f7, 04, 61, fb, 04, 5d, 55, 59, ef, 04, cb, 04, f3, 04, 65, f7, 04, 61, fb, 04, 5d, 55, 59, 69, 7d, ef, 04, e3, 04, f3, 04, 65, f7, 04, 61, fb, 04, 5d, 55, 59, 87, 05, 7d, 69, 6d, ef, 04, ff, 04, f3, 04, 65, f7, 04, 61, fb, 04, 5d, 55, 59, 83, 05, 7d, 87, 05, 71, 69, 6d, 9b, 05, 75, 6d, 71, 97, 05, 79, 9b, 05, 75, 6d, 71, a3, 05, c7, 05, a7, 05, 89, 01, ab, 05, 85, 01, af, 05, 81, 01, b3, 05, 7d, b7, 05, 79, bb, 05, 75, bf, 05, 71, c3, 05, 6d, 01, 69, 09, 8d, 01, 44, 01, 03, 01, 02, 0c, 05, 02, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 03, 09, 00, 0a, 01, 00, 10, 00, 1d, 09, 01, 09, 01, 0a, 12, 02, 0f, 00, 1c, 8d, 01, 01, 0c, 00, 19, 16, 00, 1d, 00, 2a, 1a, 00, 2e, 00, 3c, 2f, 00, 3d, 02, 0a, 19, 02, 09, 00, 0a, 2b, 01, 09, 01, 12, 36, 03, 09, 00, 0f, 03, 03, 09, 01, 0c, 1d, 01, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 02, 08, 00, 15, 21, 00, 16, 02, 06, 3e, 02, 0f, 00, 1c, 42, 01, 0c, 00, 19, 4a, 00, 1d, 00, 2a, 56, 00, 2e, 00, 3c, 73, 00, 3d, 02, 0a, 31, 02, 09, 00, 0a, 6f, 01, 09, 00, 17, 89, 01, 02, 09, 00, 0f, cf, 03, 03, 08, 00, 0c, 35, 01, 0d, 01, 10, 39, 01, 11, 02, 0a, 00, 02, 09, 00, 0a, 35, 02, 0c, 00, 19, 3d, 00, 1a, 02, 0a, 8a, 01, 04, 11, 00, 1e, 8e, 01, 01, 10, 00, 1d, 96, 01, 00, 21, 00, 2e, a2, 01, 00, 32, 00, 40, bf, 01, 00, 41, 02, 0e, 4d, 02, 0d, 00, 0e, bb, 01, 01, 0d, 00, 1b, 85, 01, 02, 0d, 00, 13, 00, 02, 05, 00, 06, fe, 01, 02, 09, 01, 0c, 51, 01, 0d, 02, 06, 00, 02, 05, 00, 06, ef, 04, 02, 09, 00, 0a, fe, 01, 00, 10, 00, 1d, 55, 00, 1e, 02, 06, a6, 02, 02, 0f, 00, 1c, d2, 02, 01, 0c, 00, 19, 82, 03, 00, 1d, 00, 2a, b6, 03, 00, 2e, 00, 3c, fb, 03, 00, 3d, 02, 0a, 65, 02, 09, 00, 0a, f7, 03, 01, 09, 00, 17, 81, 01, 02, 0d, 02, 0f, 83, 04, 05, 09, 00, 0a, ef, 04, 00, 10, 00, 1d, 69, 00, 1e, 02, 06, a2, 04, 02, 0f, 00, 1c, b6, 04, 01, 0c, 00, 19, ce, 04, 00, 1d, 00, 2a, ea, 04, 00, 2e, 00, 3c, 97, 05, 00, 3d, 02, 0a, 79, 02, 09, 00, 0a, 93, 05, 01, 09, 00, 17, 7d, 02, 09, 00, 0f, 9e, 05, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 148
-- expression 0 operands: lhs = Counter(2), rhs = Expression(10, Add)
-- expression 1 operands: lhs = Expression(11, Add), rhs = Counter(16)
-- expression 2 operands: lhs = Expression(12, Add), rhs = Counter(15)
-- expression 3 operands: lhs = Counter(13), rhs = Counter(14)
+Number of expressions: 178
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(6)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(5)
+- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
 - expression 4 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 5 operands: lhs = Counter(3), rhs = Counter(13)
-- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(14)
-- expression 7 operands: lhs = Counter(3), rhs = Counter(13)
-- expression 8 operands: lhs = Expression(12, Add), rhs = Counter(15)
-- expression 9 operands: lhs = Counter(13), rhs = Counter(14)
-- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(16)
-- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(15)
-- expression 12 operands: lhs = Counter(13), rhs = Counter(14)
-- expression 13 operands: lhs = Expression(147, Sub), rhs = Counter(3)
-- expression 14 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 15 operands: lhs = Expression(0, Add), rhs = Counter(18)
-- expression 16 operands: lhs = Expression(24, Sub), rhs = Counter(12)
-- expression 17 operands: lhs = Expression(0, Add), rhs = Counter(18)
-- expression 18 operands: lhs = Expression(23, Sub), rhs = Counter(19)
-- expression 19 operands: lhs = Expression(24, Sub), rhs = Counter(12)
-- expression 20 operands: lhs = Expression(0, Add), rhs = Counter(18)
-- expression 21 operands: lhs = Expression(22, Sub), rhs = Counter(20)
-- expression 22 operands: lhs = Expression(23, Sub), rhs = Counter(19)
-- expression 23 operands: lhs = Expression(24, Sub), rhs = Counter(12)
-- expression 24 operands: lhs = Expression(0, Add), rhs = Counter(18)
-- expression 25 operands: lhs = Expression(33, Add), rhs = Counter(21)
-- expression 26 operands: lhs = Counter(19), rhs = Counter(20)
-- expression 27 operands: lhs = Expression(32, Add), rhs = Counter(22)
-- expression 28 operands: lhs = Expression(33, Add), rhs = Counter(21)
-- expression 29 operands: lhs = Counter(19), rhs = Counter(20)
-- expression 30 operands: lhs = Counter(18), rhs = Expression(31, Add)
-- expression 31 operands: lhs = Expression(32, Add), rhs = Counter(22)
-- expression 32 operands: lhs = Expression(33, Add), rhs = Counter(21)
-- expression 33 operands: lhs = Counter(19), rhs = Counter(20)
-- expression 34 operands: lhs = Counter(23), rhs = Counter(25)
-- expression 35 operands: lhs = Expression(43, Sub), rhs = Counter(11)
-- expression 36 operands: lhs = Counter(23), rhs = Counter(25)
-- expression 37 operands: lhs = Expression(42, Sub), rhs = Counter(26)
-- expression 38 operands: lhs = Expression(43, Sub), rhs = Counter(11)
-- expression 39 operands: lhs = Counter(23), rhs = Counter(25)
-- expression 40 operands: lhs = Expression(41, Sub), rhs = Counter(27)
-- expression 41 operands: lhs = Expression(42, Sub), rhs = Counter(26)
-- expression 42 operands: lhs = Expression(43, Sub), rhs = Counter(11)
-- expression 43 operands: lhs = Counter(23), rhs = Counter(25)
-- expression 44 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 45 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 46 operands: lhs = Expression(91, Add), rhs = Counter(29)
-- expression 47 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 48 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 49 operands: lhs = Expression(89, Add), rhs = Zero
-- expression 50 operands: lhs = Counter(25), rhs = Expression(90, Add)
-- expression 51 operands: lhs = Expression(91, Add), rhs = Counter(29)
-- expression 52 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 53 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 54 operands: lhs = Counter(31), rhs = Expression(129, Add)
-- expression 55 operands: lhs = Expression(130, Add), rhs = Counter(35)
-- expression 56 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 57 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 58 operands: lhs = Expression(89, Add), rhs = Zero
-- expression 59 operands: lhs = Counter(25), rhs = Expression(90, Add)
-- expression 60 operands: lhs = Expression(91, Add), rhs = Counter(29)
-- expression 61 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 62 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 63 operands: lhs = Expression(88, Add), rhs = Counter(31)
-- expression 64 operands: lhs = Expression(89, Add), rhs = Zero
-- expression 65 operands: lhs = Counter(25), rhs = Expression(90, Add)
-- expression 66 operands: lhs = Expression(91, Add), rhs = Counter(29)
-- expression 67 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 68 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 69 operands: lhs = Expression(87, Sub), rhs = Counter(10)
-- expression 70 operands: lhs = Expression(88, Add), rhs = Counter(31)
-- expression 71 operands: lhs = Expression(89, Add), rhs = Zero
-- expression 72 operands: lhs = Counter(25), rhs = Expression(90, Add)
-- expression 73 operands: lhs = Expression(91, Add), rhs = Counter(29)
-- expression 74 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 75 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 76 operands: lhs = Expression(86, Sub), rhs = Counter(32)
-- expression 77 operands: lhs = Expression(87, Sub), rhs = Counter(10)
-- expression 78 operands: lhs = Expression(88, Add), rhs = Counter(31)
-- expression 79 operands: lhs = Expression(89, Add), rhs = Zero
-- expression 80 operands: lhs = Counter(25), rhs = Expression(90, Add)
-- expression 81 operands: lhs = Expression(91, Add), rhs = Counter(29)
-- expression 82 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 83 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 84 operands: lhs = Expression(85, Sub), rhs = Counter(33)
-- expression 85 operands: lhs = Expression(86, Sub), rhs = Counter(32)
-- expression 86 operands: lhs = Expression(87, Sub), rhs = Counter(10)
-- expression 87 operands: lhs = Expression(88, Add), rhs = Counter(31)
-- expression 88 operands: lhs = Expression(89, Add), rhs = Zero
-- expression 89 operands: lhs = Counter(25), rhs = Expression(90, Add)
-- expression 90 operands: lhs = Expression(91, Add), rhs = Counter(29)
-- expression 91 operands: lhs = Expression(92, Add), rhs = Counter(28)
-- expression 92 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 93 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 94 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 95 operands: lhs = Expression(130, Add), rhs = Counter(35)
-- expression 96 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 97 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 98 operands: lhs = Counter(4), rhs = Expression(139, Add)
-- expression 99 operands: lhs = Expression(140, Add), rhs = Counter(8)
-- expression 100 operands: lhs = Expression(141, Add), rhs = Counter(7)
-- expression 101 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 102 operands: lhs = Counter(31), rhs = Expression(129, Add)
-- expression 103 operands: lhs = Expression(130, Add), rhs = Counter(35)
-- expression 104 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 105 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 106 operands: lhs = Expression(128, Add), rhs = Counter(4)
-- expression 107 operands: lhs = Counter(31), rhs = Expression(129, Add)
-- expression 108 operands: lhs = Expression(130, Add), rhs = Counter(35)
-- expression 109 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 110 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 111 operands: lhs = Expression(127, Sub), rhs = Counter(9)
-- expression 112 operands: lhs = Expression(128, Add), rhs = Counter(4)
-- expression 113 operands: lhs = Counter(31), rhs = Expression(129, Add)
-- expression 114 operands: lhs = Expression(130, Add), rhs = Counter(35)
-- expression 115 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 116 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 117 operands: lhs = Expression(126, Sub), rhs = Counter(5)
-- expression 118 operands: lhs = Expression(127, Sub), rhs = Counter(9)
-- expression 119 operands: lhs = Expression(128, Add), rhs = Counter(4)
-- expression 120 operands: lhs = Counter(31), rhs = Expression(129, Add)
-- expression 121 operands: lhs = Expression(130, Add), rhs = Counter(35)
-- expression 122 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 123 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 124 operands: lhs = Expression(125, Sub), rhs = Counter(6)
-- expression 125 operands: lhs = Expression(126, Sub), rhs = Counter(5)
-- expression 126 operands: lhs = Expression(127, Sub), rhs = Counter(9)
-- expression 127 operands: lhs = Expression(128, Add), rhs = Counter(4)
-- expression 128 operands: lhs = Counter(31), rhs = Expression(129, Add)
-- expression 129 operands: lhs = Expression(130, Add), rhs = Counter(35)
-- expression 130 operands: lhs = Expression(131, Add), rhs = Counter(34)
-- expression 131 operands: lhs = Counter(32), rhs = Counter(33)
-- expression 132 operands: lhs = Expression(141, Add), rhs = Counter(7)
-- expression 133 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 134 operands: lhs = Expression(140, Add), rhs = Counter(8)
-- expression 135 operands: lhs = Expression(141, Add), rhs = Counter(7)
-- expression 136 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 137 operands: lhs = Expression(138, Add), rhs = Expression(142, Add)
-- expression 138 operands: lhs = Counter(4), rhs = Expression(139, Add)
-- expression 139 operands: lhs = Expression(140, Add), rhs = Counter(8)
-- expression 140 operands: lhs = Expression(141, Add), rhs = Counter(7)
-- expression 141 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 142 operands: lhs = Expression(143, Add), rhs = Expression(146, Sub)
-- expression 143 operands: lhs = Expression(144, Add), rhs = Counter(12)
-- expression 144 operands: lhs = Expression(145, Add), rhs = Counter(11)
-- expression 145 operands: lhs = Counter(9), rhs = Counter(10)
-- expression 146 operands: lhs = Expression(147, Sub), rhs = Counter(3)
-- expression 147 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 5 operands: lhs = Counter(35), rhs = Counter(3)
+- expression 6 operands: lhs = Counter(35), rhs = Expression(12, Add)
+- expression 7 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 8 operands: lhs = Expression(12, Add), rhs = Counter(5)
+- expression 9 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(6)
+- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(5)
+- expression 12 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 13 operands: lhs = Counter(0), rhs = Expression(177, Add)
+- expression 14 operands: lhs = Counter(2), rhs = Counter(35)
+- expression 15 operands: lhs = Expression(0, Add), rhs = Counter(8)
+- expression 16 operands: lhs = Expression(0, Add), rhs = Expression(17, Add)
+- expression 17 operands: lhs = Counter(8), rhs = Counter(34)
+- expression 18 operands: lhs = Expression(0, Add), rhs = Expression(19, Add)
+- expression 19 operands: lhs = Expression(118, Add), rhs = Counter(34)
+- expression 20 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 21 operands: lhs = Expression(0, Add), rhs = Expression(22, Add)
+- expression 22 operands: lhs = Expression(117, Add), rhs = Counter(34)
+- expression 23 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 24 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 25 operands: lhs = Expression(29, Add), rhs = Counter(11)
+- expression 26 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 27 operands: lhs = Expression(28, Add), rhs = Counter(12)
+- expression 28 operands: lhs = Expression(29, Add), rhs = Counter(11)
+- expression 29 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 30 operands: lhs = Expression(116, Add), rhs = Counter(12)
+- expression 31 operands: lhs = Expression(117, Add), rhs = Counter(11)
+- expression 32 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 33 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 34 operands: lhs = Counter(13), rhs = Counter(15)
+- expression 35 operands: lhs = Counter(13), rhs = Expression(36, Add)
+- expression 36 operands: lhs = Counter(15), rhs = Counter(33)
+- expression 37 operands: lhs = Counter(13), rhs = Expression(38, Add)
+- expression 38 operands: lhs = Expression(43, Add), rhs = Counter(33)
+- expression 39 operands: lhs = Counter(15), rhs = Counter(16)
+- expression 40 operands: lhs = Counter(13), rhs = Expression(41, Add)
+- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(33)
+- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(17)
+- expression 43 operands: lhs = Counter(15), rhs = Counter(16)
+- expression 44 operands: lhs = Expression(48, Add), rhs = Counter(18)
+- expression 45 operands: lhs = Counter(16), rhs = Counter(17)
+- expression 46 operands: lhs = Expression(47, Add), rhs = Counter(19)
+- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(18)
+- expression 48 operands: lhs = Counter(16), rhs = Counter(17)
+- expression 49 operands: lhs = Expression(110, Add), rhs = Counter(13)
+- expression 50 operands: lhs = Expression(111, Add), rhs = Counter(19)
+- expression 51 operands: lhs = Expression(112, Add), rhs = Counter(18)
+- expression 52 operands: lhs = Expression(113, Add), rhs = Counter(17)
+- expression 53 operands: lhs = Expression(114, Add), rhs = Counter(16)
+- expression 54 operands: lhs = Expression(115, Add), rhs = Counter(15)
+- expression 55 operands: lhs = Expression(116, Add), rhs = Counter(12)
+- expression 56 operands: lhs = Expression(117, Add), rhs = Counter(11)
+- expression 57 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 58 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 59 operands: lhs = Expression(156, Add), rhs = Counter(25)
+- expression 60 operands: lhs = Expression(157, Add), rhs = Counter(24)
+- expression 61 operands: lhs = Expression(158, Add), rhs = Counter(23)
+- expression 62 operands: lhs = Counter(21), rhs = Counter(22)
+- expression 63 operands: lhs = Expression(110, Add), rhs = Counter(13)
+- expression 64 operands: lhs = Expression(111, Add), rhs = Counter(19)
+- expression 65 operands: lhs = Expression(112, Add), rhs = Counter(18)
+- expression 66 operands: lhs = Expression(113, Add), rhs = Counter(17)
+- expression 67 operands: lhs = Expression(114, Add), rhs = Counter(16)
+- expression 68 operands: lhs = Expression(115, Add), rhs = Counter(15)
+- expression 69 operands: lhs = Expression(116, Add), rhs = Counter(12)
+- expression 70 operands: lhs = Expression(117, Add), rhs = Counter(11)
+- expression 71 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 72 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 73 operands: lhs = Expression(110, Add), rhs = Expression(122, Add)
+- expression 74 operands: lhs = Expression(111, Add), rhs = Counter(19)
+- expression 75 operands: lhs = Expression(112, Add), rhs = Counter(18)
+- expression 76 operands: lhs = Expression(113, Add), rhs = Counter(17)
+- expression 77 operands: lhs = Expression(114, Add), rhs = Counter(16)
+- expression 78 operands: lhs = Expression(115, Add), rhs = Counter(15)
+- expression 79 operands: lhs = Expression(116, Add), rhs = Counter(12)
+- expression 80 operands: lhs = Expression(117, Add), rhs = Counter(11)
+- expression 81 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 82 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 83 operands: lhs = Counter(13), rhs = Counter(21)
+- expression 84 operands: lhs = Expression(110, Add), rhs = Expression(94, Add)
+- expression 85 operands: lhs = Expression(111, Add), rhs = Counter(19)
+- expression 86 operands: lhs = Expression(112, Add), rhs = Counter(18)
+- expression 87 operands: lhs = Expression(113, Add), rhs = Counter(17)
+- expression 88 operands: lhs = Expression(114, Add), rhs = Counter(16)
+- expression 89 operands: lhs = Expression(115, Add), rhs = Counter(15)
+- expression 90 operands: lhs = Expression(116, Add), rhs = Counter(12)
+- expression 91 operands: lhs = Expression(117, Add), rhs = Counter(11)
+- expression 92 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 93 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 94 operands: lhs = Expression(122, Add), rhs = Counter(32)
+- expression 95 operands: lhs = Counter(13), rhs = Counter(21)
+- expression 96 operands: lhs = Expression(110, Add), rhs = Expression(106, Add)
+- expression 97 operands: lhs = Expression(111, Add), rhs = Counter(19)
+- expression 98 operands: lhs = Expression(112, Add), rhs = Counter(18)
+- expression 99 operands: lhs = Expression(113, Add), rhs = Counter(17)
+- expression 100 operands: lhs = Expression(114, Add), rhs = Counter(16)
+- expression 101 operands: lhs = Expression(115, Add), rhs = Counter(15)
+- expression 102 operands: lhs = Expression(116, Add), rhs = Counter(12)
+- expression 103 operands: lhs = Expression(117, Add), rhs = Counter(11)
+- expression 104 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 105 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 106 operands: lhs = Expression(121, Add), rhs = Counter(32)
+- expression 107 operands: lhs = Expression(122, Add), rhs = Counter(22)
+- expression 108 operands: lhs = Counter(13), rhs = Counter(21)
+- expression 109 operands: lhs = Expression(110, Add), rhs = Expression(119, Add)
+- expression 110 operands: lhs = Expression(111, Add), rhs = Counter(19)
+- expression 111 operands: lhs = Expression(112, Add), rhs = Counter(18)
+- expression 112 operands: lhs = Expression(113, Add), rhs = Counter(17)
+- expression 113 operands: lhs = Expression(114, Add), rhs = Counter(16)
+- expression 114 operands: lhs = Expression(115, Add), rhs = Counter(15)
+- expression 115 operands: lhs = Expression(116, Add), rhs = Counter(12)
+- expression 116 operands: lhs = Expression(117, Add), rhs = Counter(11)
+- expression 117 operands: lhs = Expression(118, Add), rhs = Counter(10)
+- expression 118 operands: lhs = Counter(8), rhs = Counter(9)
+- expression 119 operands: lhs = Expression(120, Add), rhs = Counter(32)
+- expression 120 operands: lhs = Expression(121, Add), rhs = Counter(23)
+- expression 121 operands: lhs = Expression(122, Add), rhs = Counter(22)
+- expression 122 operands: lhs = Counter(13), rhs = Counter(21)
+- expression 123 operands: lhs = Expression(127, Add), rhs = Counter(24)
+- expression 124 operands: lhs = Counter(22), rhs = Counter(23)
+- expression 125 operands: lhs = Expression(126, Add), rhs = Counter(25)
+- expression 126 operands: lhs = Expression(127, Add), rhs = Counter(24)
+- expression 127 operands: lhs = Counter(22), rhs = Counter(23)
+- expression 128 operands: lhs = Expression(129, Add), rhs = Counter(30)
+- expression 129 operands: lhs = Expression(160, Add), rhs = Counter(29)
+- expression 130 operands: lhs = Expression(161, Add), rhs = Counter(28)
+- expression 131 operands: lhs = Counter(26), rhs = Counter(27)
+- expression 132 operands: lhs = Expression(156, Add), rhs = Counter(25)
+- expression 133 operands: lhs = Expression(157, Add), rhs = Counter(24)
+- expression 134 operands: lhs = Expression(158, Add), rhs = Counter(23)
+- expression 135 operands: lhs = Counter(21), rhs = Counter(22)
+- expression 136 operands: lhs = Expression(155, Add), rhs = Counter(26)
+- expression 137 operands: lhs = Expression(156, Add), rhs = Counter(25)
+- expression 138 operands: lhs = Expression(157, Add), rhs = Counter(24)
+- expression 139 operands: lhs = Expression(158, Add), rhs = Counter(23)
+- expression 140 operands: lhs = Counter(21), rhs = Counter(22)
+- expression 141 operands: lhs = Expression(155, Add), rhs = Expression(146, Add)
+- expression 142 operands: lhs = Expression(156, Add), rhs = Counter(25)
+- expression 143 operands: lhs = Expression(157, Add), rhs = Counter(24)
+- expression 144 operands: lhs = Expression(158, Add), rhs = Counter(23)
+- expression 145 operands: lhs = Counter(21), rhs = Counter(22)
+- expression 146 operands: lhs = Counter(26), rhs = Counter(31)
+- expression 147 operands: lhs = Expression(155, Add), rhs = Expression(152, Add)
+- expression 148 operands: lhs = Expression(156, Add), rhs = Counter(25)
+- expression 149 operands: lhs = Expression(157, Add), rhs = Counter(24)
+- expression 150 operands: lhs = Expression(158, Add), rhs = Counter(23)
+- expression 151 operands: lhs = Counter(21), rhs = Counter(22)
+- expression 152 operands: lhs = Expression(161, Add), rhs = Counter(31)
+- expression 153 operands: lhs = Counter(26), rhs = Counter(27)
+- expression 154 operands: lhs = Expression(155, Add), rhs = Expression(159, Add)
+- expression 155 operands: lhs = Expression(156, Add), rhs = Counter(25)
+- expression 156 operands: lhs = Expression(157, Add), rhs = Counter(24)
+- expression 157 operands: lhs = Expression(158, Add), rhs = Counter(23)
+- expression 158 operands: lhs = Counter(21), rhs = Counter(22)
+- expression 159 operands: lhs = Expression(160, Add), rhs = Counter(31)
+- expression 160 operands: lhs = Expression(161, Add), rhs = Counter(28)
+- expression 161 operands: lhs = Counter(26), rhs = Counter(27)
+- expression 162 operands: lhs = Expression(166, Add), rhs = Counter(29)
+- expression 163 operands: lhs = Counter(27), rhs = Counter(28)
+- expression 164 operands: lhs = Expression(165, Add), rhs = Counter(30)
+- expression 165 operands: lhs = Expression(166, Add), rhs = Counter(29)
+- expression 166 operands: lhs = Counter(27), rhs = Counter(28)
+- expression 167 operands: lhs = Expression(168, Add), rhs = Expression(177, Add)
+- expression 168 operands: lhs = Expression(169, Add), rhs = Counter(34)
+- expression 169 operands: lhs = Expression(170, Add), rhs = Counter(33)
+- expression 170 operands: lhs = Expression(171, Add), rhs = Counter(32)
+- expression 171 operands: lhs = Expression(172, Add), rhs = Counter(31)
+- expression 172 operands: lhs = Expression(173, Add), rhs = Counter(30)
+- expression 173 operands: lhs = Expression(174, Add), rhs = Counter(29)
+- expression 174 operands: lhs = Expression(175, Add), rhs = Counter(28)
+- expression 175 operands: lhs = Expression(176, Add), rhs = Counter(27)
+- expression 176 operands: lhs = Counter(0), rhs = Counter(26)
+- expression 177 operands: lhs = Counter(2), rhs = Counter(35)
 Number of file 0 mappings: 68
 - Code(Counter(0)) at (prev + 3, 1) to (start + 2, 12)
 - Code(Counter(1)) at (prev + 2, 13) to (start + 2, 6)
 - Code(Zero) at (prev + 2, 5) to (start + 0, 6)
 - Code(Expression(0, Add)) at (prev + 3, 9) to (start + 0, 10)
-    = (c2 + (((c13 + c14) + c15) + c16))
+    = ((((c2 + c3) + c4) + c5) + c6)
 - Code(Counter(0)) at (prev + 0, 16) to (start + 0, 29)
 - Code(Counter(2)) at (prev + 1, 9) to (start + 1, 10)
-- Code(Expression(147, Sub)) at (prev + 2, 15) to (start + 0, 28)
+- Code(Expression(4, Sub)) at (prev + 2, 15) to (start + 0, 28)
     = (c0 - c2)
-- Code(Counter(3)) at (prev + 1, 12) to (start + 0, 25)
-- Code(Expression(7, Sub)) at (prev + 0, 29) to (start + 0, 42)
-    = (c3 - c13)
+- Code(Counter(35)) at (prev + 1, 12) to (start + 0, 25)
+- Code(Expression(5, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = (c35 - c3)
 - Code(Expression(6, Sub)) at (prev + 0, 46) to (start + 0, 60)
-    = ((c3 - c13) - c14)
+    = (c35 - (c3 + c4))
 - Code(Expression(11, Add)) at (prev + 0, 61) to (start + 2, 10)
-    = ((c13 + c14) + c15)
-- Code(Counter(16)) at (prev + 2, 9) to (start + 0, 10)
+    = ((c3 + c4) + c5)
+- Code(Counter(6)) at (prev + 2, 9) to (start + 0, 10)
 - Code(Expression(10, Add)) at (prev + 1, 9) to (start + 1, 18)
-    = (((c13 + c14) + c15) + c16)
-- Code(Expression(146, Sub)) at (prev + 3, 9) to (start + 0, 15)
-    = ((c0 - c2) - c3)
+    = (((c3 + c4) + c5) + c6)
+- Code(Expression(13, Sub)) at (prev + 3, 9) to (start + 0, 15)
+    = (c0 - (c2 + c35))
 - Code(Expression(0, Add)) at (prev + 3, 9) to (start + 1, 12)
-    = (c2 + (((c13 + c14) + c15) + c16))
-- Code(Counter(17)) at (prev + 1, 13) to (start + 2, 6)
+    = ((((c2 + c3) + c4) + c5) + c6)
+- Code(Counter(7)) at (prev + 1, 13) to (start + 2, 6)
 - Code(Zero) at (prev + 2, 5) to (start + 0, 6)
 - Code(Expression(0, Add)) at (prev + 2, 8) to (start + 0, 21)
-    = (c2 + (((c13 + c14) + c15) + c16))
-- Code(Counter(18)) at (prev + 0, 22) to (start + 2, 6)
-- Code(Expression(24, Sub)) at (prev + 2, 15) to (start + 0, 28)
-    = ((c2 + (((c13 + c14) + c15) + c16)) - c18)
-- Code(Expression(23, Sub)) at (prev + 1, 12) to (start + 0, 25)
-    = (((c2 + (((c13 + c14) + c15) + c16)) - c18) - c12)
-- Code(Expression(22, Sub)) at (prev + 0, 29) to (start + 0, 42)
-    = ((((c2 + (((c13 + c14) + c15) + c16)) - c18) - c12) - c19)
+    = ((((c2 + c3) + c4) + c5) + c6)
+- Code(Counter(8)) at (prev + 0, 22) to (start + 2, 6)
+- Code(Expression(15, Sub)) at (prev + 2, 15) to (start + 0, 28)
+    = (((((c2 + c3) + c4) + c5) + c6) - c8)
+- Code(Expression(16, Sub)) at (prev + 1, 12) to (start + 0, 25)
+    = (((((c2 + c3) + c4) + c5) + c6) - (c8 + c34))
+- Code(Expression(18, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = (((((c2 + c3) + c4) + c5) + c6) - ((c8 + c9) + c34))
 - Code(Expression(21, Sub)) at (prev + 0, 46) to (start + 0, 60)
-    = (((((c2 + (((c13 + c14) + c15) + c16)) - c18) - c12) - c19) - c20)
-- Code(Expression(32, Add)) at (prev + 0, 61) to (start + 2, 10)
-    = ((c19 + c20) + c21)
-- Code(Counter(22)) at (prev + 2, 9) to (start + 0, 10)
-- Code(Expression(31, Add)) at (prev + 1, 9) to (start + 0, 23)
-    = (((c19 + c20) + c21) + c22)
-- Code(Counter(12)) at (prev + 2, 9) to (start + 0, 15)
-- Code(Expression(30, Add)) at (prev + 3, 8) to (start + 0, 12)
-    = (c18 + (((c19 + c20) + c21) + c22))
-- Code(Counter(23)) at (prev + 1, 13) to (start + 1, 16)
-- Code(Counter(24)) at (prev + 1, 17) to (start + 2, 10)
+    = (((((c2 + c3) + c4) + c5) + c6) - (((c8 + c9) + c10) + c34))
+- Code(Expression(28, Add)) at (prev + 0, 61) to (start + 2, 10)
+    = ((c9 + c10) + c11)
+- Code(Counter(12)) at (prev + 2, 9) to (start + 0, 10)
+- Code(Expression(27, Add)) at (prev + 1, 9) to (start + 0, 23)
+    = (((c9 + c10) + c11) + c12)
+- Code(Counter(34)) at (prev + 2, 9) to (start + 0, 15)
+- Code(Expression(115, Add)) at (prev + 3, 8) to (start + 0, 12)
+    = ((((c8 + c9) + c10) + c11) + c12)
+- Code(Counter(13)) at (prev + 1, 13) to (start + 1, 16)
+- Code(Counter(14)) at (prev + 1, 17) to (start + 2, 10)
 - Code(Zero) at (prev + 2, 9) to (start + 0, 10)
-- Code(Counter(23)) at (prev + 2, 12) to (start + 0, 25)
-- Code(Counter(25)) at (prev + 0, 26) to (start + 2, 10)
-- Code(Expression(43, Sub)) at (prev + 4, 17) to (start + 0, 30)
-    = (c23 - c25)
-- Code(Expression(42, Sub)) at (prev + 1, 16) to (start + 0, 29)
-    = ((c23 - c25) - c11)
-- Code(Expression(41, Sub)) at (prev + 0, 33) to (start + 0, 46)
-    = (((c23 - c25) - c11) - c26)
+- Code(Counter(13)) at (prev + 2, 12) to (start + 0, 25)
+- Code(Counter(15)) at (prev + 0, 26) to (start + 2, 10)
+- Code(Expression(34, Sub)) at (prev + 4, 17) to (start + 0, 30)
+    = (c13 - c15)
+- Code(Expression(35, Sub)) at (prev + 1, 16) to (start + 0, 29)
+    = (c13 - (c15 + c33))
+- Code(Expression(37, Sub)) at (prev + 0, 33) to (start + 0, 46)
+    = (c13 - ((c15 + c16) + c33))
 - Code(Expression(40, Sub)) at (prev + 0, 50) to (start + 0, 64)
-    = ((((c23 - c25) - c11) - c26) - c27)
-- Code(Expression(91, Add)) at (prev + 0, 65) to (start + 2, 14)
-    = ((c26 + c27) + c28)
-- Code(Counter(29)) at (prev + 2, 13) to (start + 0, 14)
-- Code(Expression(90, Add)) at (prev + 1, 13) to (start + 0, 27)
-    = (((c26 + c27) + c28) + c29)
-- Code(Counter(11)) at (prev + 2, 13) to (start + 0, 19)
+    = (c13 - (((c15 + c16) + c17) + c33))
+- Code(Expression(47, Add)) at (prev + 0, 65) to (start + 2, 14)
+    = ((c16 + c17) + c18)
+- Code(Counter(19)) at (prev + 2, 13) to (start + 0, 14)
+- Code(Expression(46, Add)) at (prev + 1, 13) to (start + 0, 27)
+    = (((c16 + c17) + c18) + c19)
+- Code(Counter(33)) at (prev + 2, 13) to (start + 0, 19)
 - Code(Zero) at (prev + 2, 5) to (start + 0, 6)
-- Code(Expression(88, Add)) at (prev + 2, 9) to (start + 1, 12)
-    = ((c25 + (((c26 + c27) + c28) + c29)) + Zero)
-- Code(Counter(30)) at (prev + 1, 13) to (start + 2, 6)
+- Code(Expression(63, Sub)) at (prev + 2, 9) to (start + 1, 12)
+    = ((((((((((c8 + c9) + c10) + c11) + c12) + c15) + c16) + c17) + c18) + c19) - c13)
+- Code(Counter(20)) at (prev + 1, 13) to (start + 2, 6)
 - Code(Zero) at (prev + 2, 5) to (start + 0, 6)
-- Code(Expression(128, Add)) at (prev + 2, 9) to (start + 0, 10)
-    = (c31 + (((c32 + c33) + c34) + c35))
-- Code(Expression(88, Add)) at (prev + 0, 16) to (start + 0, 29)
-    = ((c25 + (((c26 + c27) + c28) + c29)) + Zero)
-- Code(Counter(31)) at (prev + 0, 30) to (start + 2, 6)
-- Code(Expression(87, Sub)) at (prev + 2, 15) to (start + 0, 28)
-    = (((c25 + (((c26 + c27) + c28) + c29)) + Zero) - c31)
-- Code(Expression(86, Sub)) at (prev + 1, 12) to (start + 0, 25)
-    = ((((c25 + (((c26 + c27) + c28) + c29)) + Zero) - c31) - c10)
-- Code(Expression(85, Sub)) at (prev + 0, 29) to (start + 0, 42)
-    = (((((c25 + (((c26 + c27) + c28) + c29)) + Zero) - c31) - c10) - c32)
-- Code(Expression(84, Sub)) at (prev + 0, 46) to (start + 0, 60)
-    = ((((((c25 + (((c26 + c27) + c28) + c29)) + Zero) - c31) - c10) - c32) - c33)
-- Code(Expression(130, Add)) at (prev + 0, 61) to (start + 2, 10)
-    = ((c32 + c33) + c34)
-- Code(Counter(35)) at (prev + 2, 9) to (start + 0, 10)
-- Code(Expression(129, Add)) at (prev + 1, 9) to (start + 0, 23)
-    = (((c32 + c33) + c34) + c35)
-- Code(Counter(10)) at (prev + 2, 13) to (start + 2, 15)
-- Code(Expression(138, Add)) at (prev + 5, 9) to (start + 0, 10)
-    = (c4 + (((c5 + c6) + c7) + c8))
-- Code(Expression(128, Add)) at (prev + 0, 16) to (start + 0, 29)
-    = (c31 + (((c32 + c33) + c34) + c35))
-- Code(Counter(4)) at (prev + 0, 30) to (start + 2, 6)
-- Code(Expression(127, Sub)) at (prev + 2, 15) to (start + 0, 28)
-    = ((c31 + (((c32 + c33) + c34) + c35)) - c4)
-- Code(Expression(126, Sub)) at (prev + 1, 12) to (start + 0, 25)
-    = (((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9)
-- Code(Expression(125, Sub)) at (prev + 0, 29) to (start + 0, 42)
-    = ((((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) - c5)
-- Code(Expression(124, Sub)) at (prev + 0, 46) to (start + 0, 60)
-    = (((((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) - c5) - c6)
-- Code(Expression(140, Add)) at (prev + 0, 61) to (start + 2, 10)
-    = ((c5 + c6) + c7)
-- Code(Counter(8)) at (prev + 2, 9) to (start + 0, 10)
-- Code(Expression(139, Add)) at (prev + 1, 9) to (start + 0, 23)
-    = (((c5 + c6) + c7) + c8)
-- Code(Counter(9)) at (prev + 2, 9) to (start + 0, 15)
-- Code(Expression(137, Add)) at (prev + 2, 1) to (start + 0, 2)
-    = ((c4 + (((c5 + c6) + c7) + c8)) + ((((c9 + c10) + c11) + c12) + ((c0 - c2) - c3)))
+- Code(Expression(155, Add)) at (prev + 2, 9) to (start + 0, 10)
+    = ((((c21 + c22) + c23) + c24) + c25)
+- Code(Expression(63, Sub)) at (prev + 0, 16) to (start + 0, 29)
+    = ((((((((((c8 + c9) + c10) + c11) + c12) + c15) + c16) + c17) + c18) + c19) - c13)
+- Code(Counter(21)) at (prev + 0, 30) to (start + 2, 6)
+- Code(Expression(73, Sub)) at (prev + 2, 15) to (start + 0, 28)
+    = ((((((((((c8 + c9) + c10) + c11) + c12) + c15) + c16) + c17) + c18) + c19) - (c13 + c21))
+- Code(Expression(84, Sub)) at (prev + 1, 12) to (start + 0, 25)
+    = ((((((((((c8 + c9) + c10) + c11) + c12) + c15) + c16) + c17) + c18) + c19) - ((c13 + c21) + c32))
+- Code(Expression(96, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = ((((((((((c8 + c9) + c10) + c11) + c12) + c15) + c16) + c17) + c18) + c19) - (((c13 + c21) + c22) + c32))
+- Code(Expression(109, Sub)) at (prev + 0, 46) to (start + 0, 60)
+    = ((((((((((c8 + c9) + c10) + c11) + c12) + c15) + c16) + c17) + c18) + c19) - ((((c13 + c21) + c22) + c23) + c32))
+- Code(Expression(126, Add)) at (prev + 0, 61) to (start + 2, 10)
+    = ((c22 + c23) + c24)
+- Code(Counter(25)) at (prev + 2, 9) to (start + 0, 10)
+- Code(Expression(125, Add)) at (prev + 1, 9) to (start + 0, 23)
+    = (((c22 + c23) + c24) + c25)
+- Code(Counter(32)) at (prev + 2, 13) to (start + 2, 15)
+- Code(Expression(128, Add)) at (prev + 5, 9) to (start + 0, 10)
+    = ((((c26 + c27) + c28) + c29) + c30)
+- Code(Expression(155, Add)) at (prev + 0, 16) to (start + 0, 29)
+    = ((((c21 + c22) + c23) + c24) + c25)
+- Code(Counter(26)) at (prev + 0, 30) to (start + 2, 6)
+- Code(Expression(136, Sub)) at (prev + 2, 15) to (start + 0, 28)
+    = (((((c21 + c22) + c23) + c24) + c25) - c26)
+- Code(Expression(141, Sub)) at (prev + 1, 12) to (start + 0, 25)
+    = (((((c21 + c22) + c23) + c24) + c25) - (c26 + c31))
+- Code(Expression(147, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = (((((c21 + c22) + c23) + c24) + c25) - ((c26 + c27) + c31))
+- Code(Expression(154, Sub)) at (prev + 0, 46) to (start + 0, 60)
+    = (((((c21 + c22) + c23) + c24) + c25) - (((c26 + c27) + c28) + c31))
+- Code(Expression(165, Add)) at (prev + 0, 61) to (start + 2, 10)
+    = ((c27 + c28) + c29)
+- Code(Counter(30)) at (prev + 2, 9) to (start + 0, 10)
+- Code(Expression(164, Add)) at (prev + 1, 9) to (start + 0, 23)
+    = (((c27 + c28) + c29) + c30)
+- Code(Counter(31)) at (prev + 2, 9) to (start + 0, 15)
+- Code(Expression(167, Sub)) at (prev + 2, 1) to (start + 0, 2)
+    = ((((((((((c0 + c26) + c27) + c28) + c29) + c30) + c31) + c32) + c33) + c34) - (c2 + c35))
 Highest counter ID seen: c35
 
diff --git a/tests/coverage/continue.cov-map b/tests/coverage/continue.cov-map
index 7781d2d2544..55313d7db49 100644
--- a/tests/coverage/continue.cov-map
+++ b/tests/coverage/continue.cov-map
@@ -1,5 +1,5 @@
 Function name: continue::main
-Raw bytes (210): 0x[01, 01, 1c, 07, 09, 01, 05, 03, 0d, 1f, 15, 0d, 11, 1b, 19, 1f, 15, 0d, 11, 33, 21, 19, 1d, 2f, 25, 33, 21, 19, 1d, 47, 2d, 25, 29, 43, 31, 47, 2d, 25, 29, 31, 5f, 35, 39, 57, 3d, 31, 5f, 35, 39, 35, 39, 3d, 41, 6b, 45, 3d, 41, 49, 45, 1e, 01, 03, 01, 03, 12, 03, 04, 0e, 00, 13, 0a, 01, 0f, 00, 16, 05, 02, 11, 00, 19, 09, 02, 12, 04, 0e, 1b, 06, 0e, 00, 13, 16, 01, 0f, 00, 16, 15, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 15, 03, 09, 00, 0e, 2f, 02, 0e, 00, 13, 2a, 01, 0f, 00, 16, 1d, 01, 15, 02, 0e, 21, 04, 11, 00, 19, 1d, 03, 09, 00, 0e, 43, 02, 0e, 00, 13, 3e, 01, 0c, 00, 13, 29, 01, 0d, 00, 15, 2d, 01, 0a, 01, 0e, 57, 03, 0e, 00, 13, 52, 01, 0f, 00, 16, 39, 01, 16, 02, 0e, 35, 03, 12, 02, 0e, 5f, 04, 09, 00, 0e, 6b, 02, 0e, 00, 13, 66, 01, 0f, 00, 16, 41, 01, 16, 02, 0e, 49, 04, 11, 00, 16, 41, 03, 09, 00, 0e, 6f, 02, 0d, 01, 02]
+Raw bytes (210): 0x[01, 01, 1c, 07, 09, 01, 05, 03, 0d, 1f, 15, 0d, 11, 1b, 19, 1f, 15, 0d, 11, 33, 21, 19, 1d, 2f, 25, 33, 21, 19, 1d, 47, 2d, 25, 29, 43, 31, 47, 2d, 25, 29, 5b, 39, 31, 35, 57, 3d, 5b, 39, 31, 35, 35, 39, 3d, 41, 6b, 45, 3d, 41, 45, 49, 1e, 01, 03, 01, 03, 12, 03, 04, 0e, 00, 13, 0a, 01, 0f, 00, 16, 05, 02, 11, 00, 19, 09, 02, 12, 04, 0e, 1b, 06, 0e, 00, 13, 16, 01, 0f, 00, 16, 15, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 15, 03, 09, 00, 0e, 2f, 02, 0e, 00, 13, 2a, 01, 0f, 00, 16, 1d, 01, 15, 02, 0e, 21, 04, 11, 00, 19, 1d, 03, 09, 00, 0e, 43, 02, 0e, 00, 13, 3e, 01, 0c, 00, 13, 29, 01, 0d, 00, 15, 2d, 01, 0a, 01, 0e, 57, 03, 0e, 00, 13, 52, 01, 0f, 00, 16, 39, 01, 16, 02, 0e, 35, 03, 12, 02, 0e, 5f, 04, 09, 00, 0e, 6b, 02, 0e, 00, 13, 66, 01, 0f, 00, 16, 41, 01, 16, 02, 0e, 49, 04, 11, 00, 16, 41, 03, 09, 00, 0e, 6f, 02, 0d, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 28
@@ -21,16 +21,16 @@ Number of expressions: 28
 - expression 15 operands: lhs = Expression(16, Add), rhs = Counter(12)
 - expression 16 operands: lhs = Expression(17, Add), rhs = Counter(11)
 - expression 17 operands: lhs = Counter(9), rhs = Counter(10)
-- expression 18 operands: lhs = Counter(12), rhs = Expression(23, Add)
-- expression 19 operands: lhs = Counter(13), rhs = Counter(14)
+- expression 18 operands: lhs = Expression(22, Add), rhs = Counter(14)
+- expression 19 operands: lhs = Counter(12), rhs = Counter(13)
 - expression 20 operands: lhs = Expression(21, Add), rhs = Counter(15)
-- expression 21 operands: lhs = Counter(12), rhs = Expression(23, Add)
-- expression 22 operands: lhs = Counter(13), rhs = Counter(14)
+- expression 21 operands: lhs = Expression(22, Add), rhs = Counter(14)
+- expression 22 operands: lhs = Counter(12), rhs = Counter(13)
 - expression 23 operands: lhs = Counter(13), rhs = Counter(14)
 - expression 24 operands: lhs = Counter(15), rhs = Counter(16)
 - expression 25 operands: lhs = Expression(26, Add), rhs = Counter(17)
 - expression 26 operands: lhs = Counter(15), rhs = Counter(16)
-- expression 27 operands: lhs = Counter(18), rhs = Counter(17)
+- expression 27 operands: lhs = Counter(17), rhs = Counter(18)
 Number of file 0 mappings: 30
 - Code(Counter(0)) at (prev + 3, 1) to (start + 3, 18)
 - Code(Expression(0, Add)) at (prev + 4, 14) to (start + 0, 19)
@@ -60,9 +60,9 @@ Number of file 0 mappings: 30
 - Code(Counter(10)) at (prev + 1, 13) to (start + 0, 21)
 - Code(Counter(11)) at (prev + 1, 10) to (start + 1, 14)
 - Code(Expression(21, Add)) at (prev + 3, 14) to (start + 0, 19)
-    = (c12 + (c13 + c14))
+    = ((c12 + c13) + c14)
 - Code(Expression(20, Sub)) at (prev + 1, 15) to (start + 0, 22)
-    = ((c12 + (c13 + c14)) - c15)
+    = (((c12 + c13) + c14) - c15)
 - Code(Counter(14)) at (prev + 1, 22) to (start + 2, 14)
 - Code(Counter(13)) at (prev + 3, 18) to (start + 2, 14)
 - Code(Expression(23, Add)) at (prev + 4, 9) to (start + 0, 14)
@@ -75,6 +75,6 @@ Number of file 0 mappings: 30
 - Code(Counter(18)) at (prev + 4, 17) to (start + 0, 22)
 - Code(Counter(16)) at (prev + 3, 9) to (start + 0, 14)
 - Code(Expression(27, Add)) at (prev + 2, 13) to (start + 1, 2)
-    = (c18 + c17)
+    = (c17 + c18)
 Highest counter ID seen: c18
 
diff --git a/tests/coverage/coroutine.cov-map b/tests/coverage/coroutine.cov-map
index 2fdc3220c19..21f6787e9f2 100644
--- a/tests/coverage/coroutine.cov-map
+++ b/tests/coverage/coroutine.cov-map
@@ -13,18 +13,18 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c1
 
 Function name: coroutine::main
-Raw bytes (65): 0x[01, 01, 08, 07, 0d, 05, 09, 11, 15, 1e, 19, 11, 15, 15, 19, 1e, 19, 11, 15, 09, 01, 13, 01, 02, 16, 01, 08, 0b, 00, 2e, 11, 01, 2b, 00, 2d, 03, 01, 0e, 00, 35, 11, 02, 0b, 00, 2e, 1e, 01, 22, 00, 27, 1a, 00, 2c, 00, 2e, 17, 01, 0e, 00, 35, 1a, 02, 01, 00, 02]
+Raw bytes (65): 0x[01, 01, 08, 07, 0d, 05, 09, 11, 15, 11, 1f, 15, 19, 15, 19, 11, 1f, 15, 19, 09, 01, 13, 01, 02, 16, 01, 08, 0b, 00, 2e, 11, 01, 2b, 00, 2d, 03, 01, 0e, 00, 35, 11, 02, 0b, 00, 2e, 0a, 01, 22, 00, 27, 1a, 00, 2c, 00, 2e, 1f, 01, 0e, 00, 35, 1a, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 8
 - expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 2 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 3 operands: lhs = Expression(7, Sub), rhs = Counter(6)
-- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 3 operands: lhs = Counter(4), rhs = Expression(7, Add)
+- expression 4 operands: lhs = Counter(5), rhs = Counter(6)
 - expression 5 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(6)
-- expression 7 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 6 operands: lhs = Counter(4), rhs = Expression(7, Add)
+- expression 7 operands: lhs = Counter(5), rhs = Counter(6)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 19, 1) to (start + 2, 22)
 - Code(Counter(0)) at (prev + 8, 11) to (start + 0, 46)
@@ -32,14 +32,14 @@ Number of file 0 mappings: 9
 - Code(Expression(0, Add)) at (prev + 1, 14) to (start + 0, 53)
     = ((c1 + c2) + c3)
 - Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46)
-- Code(Expression(7, Sub)) at (prev + 1, 34) to (start + 0, 39)
+- Code(Expression(2, Sub)) at (prev + 1, 34) to (start + 0, 39)
     = (c4 - c5)
 - Code(Expression(6, Sub)) at (prev + 0, 44) to (start + 0, 46)
-    = ((c4 - c5) - c6)
-- Code(Expression(5, Add)) at (prev + 1, 14) to (start + 0, 53)
+    = (c4 - (c5 + c6))
+- Code(Expression(7, Add)) at (prev + 1, 14) to (start + 0, 53)
     = (c5 + c6)
 - Code(Expression(6, Sub)) at (prev + 2, 1) to (start + 0, 2)
-    = ((c4 - c5) - c6)
+    = (c4 - (c5 + c6))
 Highest counter ID seen: c4
 
 Function name: coroutine::main::{closure#0}
diff --git a/tests/coverage/inline-dead.cov-map b/tests/coverage/inline-dead.cov-map
index 5a20de3d4d4..3e2ca2bc992 100644
--- a/tests/coverage/inline-dead.cov-map
+++ b/tests/coverage/inline-dead.cov-map
@@ -32,16 +32,16 @@ Number of file 0 mappings: 2
 Highest counter ID seen: c0
 
 Function name: inline_dead::main::{closure#0}
-Raw bytes (23): 0x[01, 01, 02, 00, 06, 01, 00, 03, 01, 07, 17, 01, 16, 00, 01, 17, 00, 18, 03, 01, 05, 00, 06]
+Raw bytes (23): 0x[01, 01, 02, 07, 00, 01, 00, 03, 01, 07, 17, 01, 16, 00, 01, 17, 00, 18, 02, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
-- expression 0 operands: lhs = Zero, rhs = Expression(1, Sub)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Zero
 - expression 1 operands: lhs = Counter(0), rhs = Zero
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 7, 23) to (start + 1, 22)
 - Code(Zero) at (prev + 1, 23) to (start + 0, 24)
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 0, 6)
-    = (Zero + (c0 - Zero))
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6)
+    = ((c0 + Zero) - Zero)
 Highest counter ID seen: c0
 
diff --git a/tests/coverage/inline.cov-map b/tests/coverage/inline.cov-map
index ab3a505e925..1b5b45695dc 100644
--- a/tests/coverage/inline.cov-map
+++ b/tests/coverage/inline.cov-map
@@ -41,14 +41,15 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: inline::permutate::<char>
-Raw bytes (52): 0x[01, 01, 04, 01, 05, 02, 0d, 05, 0f, 09, 0d, 08, 01, 0f, 01, 02, 0e, 05, 02, 0f, 02, 06, 02, 02, 0f, 00, 14, 11, 01, 0d, 00, 0e, 06, 00, 12, 00, 16, 11, 00, 17, 04, 0a, 0d, 05, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (54): 0x[01, 01, 05, 01, 05, 01, 0b, 05, 0d, 13, 0d, 05, 09, 08, 01, 0f, 01, 02, 0e, 05, 02, 0f, 02, 06, 02, 02, 0f, 00, 14, 11, 01, 0d, 00, 0e, 06, 00, 12, 00, 16, 11, 00, 17, 04, 0a, 0d, 05, 0c, 02, 06, 0f, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(0, Sub), rhs = Counter(3)
-- expression 2 operands: lhs = Counter(1), rhs = Expression(3, Add)
-- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(3)
+- expression 4 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 15, 1) to (start + 2, 14)
 - Code(Counter(1)) at (prev + 2, 15) to (start + 2, 6)
@@ -56,11 +57,11 @@ Number of file 0 mappings: 8
     = (c0 - c1)
 - Code(Counter(4)) at (prev + 1, 13) to (start + 0, 14)
 - Code(Expression(1, Sub)) at (prev + 0, 18) to (start + 0, 22)
-    = ((c0 - c1) - c3)
+    = (c0 - (c1 + c3))
 - Code(Counter(4)) at (prev + 0, 23) to (start + 4, 10)
 - Code(Counter(3)) at (prev + 5, 12) to (start + 2, 6)
-- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c1 + (c2 + c3))
+- Code(Expression(3, Add)) at (prev + 3, 1) to (start + 0, 2)
+    = ((c1 + c2) + c3)
 Highest counter ID seen: c4
 
 Function name: inline::permutations::<char>
diff --git a/tests/coverage/issue-84561.cov-map b/tests/coverage/issue-84561.cov-map
index 64870c434b3..a2ab558f960 100644
--- a/tests/coverage/issue-84561.cov-map
+++ b/tests/coverage/issue-84561.cov-map
@@ -59,69 +59,69 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: issue_84561::test3
-Raw bytes (414): 0x[01, 01, 3b, 05, 09, 0d, 11, 15, 19, 1e, 1d, 15, 19, 1a, 21, 1e, 1d, 15, 19, 25, 2d, 21, 25, 29, 35, 32, 29, 21, 25, 31, 39, 3d, 41, 42, 45, 3d, 41, 66, 49, 45, 4d, 63, 51, 66, 49, 45, 4d, 5e, 55, 63, 51, 66, 49, 45, 4d, 9e, 01, 55, 51, 59, 9e, 01, 55, 51, 59, 9b, 01, 5d, 9e, 01, 55, 51, 59, 9b, 01, 61, 9e, 01, 55, 51, 59, 96, 01, 65, 9b, 01, 61, 9e, 01, 55, 51, 59, 75, e2, 01, e6, 01, 79, 69, 6d, 69, 6d, 69, 6d, e6, 01, 00, 69, 6d, e6, 01, 79, 69, 6d, df, 01, 7d, 75, e2, 01, e6, 01, 79, 69, 6d, da, 01, 81, 01, df, 01, 7d, 75, e2, 01, e6, 01, 79, 69, 6d, 81, 01, 85, 01, 33, 01, 08, 01, 03, 1c, 05, 04, 09, 01, 1c, 02, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 06, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 1e, 02, 05, 00, 1f, 1a, 01, 05, 00, 0f, 16, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 25, 03, 20, 00, 30, 2d, 00, 33, 00, 41, 22, 00, 4b, 00, 5a, 32, 01, 05, 00, 0f, 29, 05, 09, 03, 10, 35, 05, 0d, 00, 1b, 2a, 02, 0d, 00, 1c, 2e, 04, 09, 05, 06, 31, 06, 05, 03, 06, 36, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 42, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 3e, 05, 09, 03, 0a, 63, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 59, 03, 0d, 00, 1d, 5e, 03, 09, 00, 13, 5a, 03, 0d, 00, 1d, 9b, 01, 03, 05, 00, 0f, 9b, 01, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 7a, 02, 0d, 00, 13, 96, 01, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 92, 01, 02, 0d, 00, 13, df, 01, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 75, 04, 0d, 00, 13, e6, 01, 02, 0d, 00, 17, e6, 01, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, b6, 01, 02, 15, 00, 1b, e2, 01, 04, 0d, 00, 13, 7d, 03, 09, 00, 19, da, 01, 02, 05, 00, 0f, d6, 01, 03, 09, 00, 22, 81, 01, 02, 05, 00, 0f, ea, 01, 03, 09, 00, 2c, 85, 01, 02, 01, 00, 02]
+Raw bytes (409): 0x[01, 01, 3b, 05, 09, 0d, 11, 15, 19, 15, 1f, 19, 1d, 15, 1b, 1f, 21, 19, 1d, 25, 29, 21, 25, 2d, 31, 21, 33, 25, 2d, 35, 39, 3d, 41, 3d, 43, 41, 45, 5f, 4d, 45, 49, 5f, 67, 45, 49, 4d, 51, 5f, 63, 45, 49, 67, 59, 4d, 51, 97, 01, 55, 51, 59, 97, 01, 55, 51, 59, 97, 01, 83, 01, 51, 59, 55, 5d, 97, 01, 9f, 01, 51, 59, 55, 61, 97, 01, 9b, 01, 51, 59, 9f, 01, 65, 55, 61, db, 01, e7, 01, 69, 71, 6d, 75, 69, 6d, 69, 6d, 69, bb, 01, 6d, 00, 69, e7, 01, 6d, 75, db, 01, e3, 01, 69, 71, e7, 01, 79, 6d, 75, db, 01, df, 01, 69, 71, e3, 01, 7d, e7, 01, 79, 6d, 75, 7d, 81, 01, 33, 01, 08, 01, 03, 1c, 05, 04, 09, 01, 1c, 02, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 06, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 0a, 02, 05, 00, 1f, 0e, 01, 05, 00, 0f, 16, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 25, 03, 20, 00, 30, 29, 00, 33, 00, 41, 22, 00, 4b, 00, 5a, 26, 01, 05, 00, 0f, 2d, 05, 09, 03, 10, 31, 05, 0d, 00, 1b, 2a, 02, 0d, 00, 1c, 2e, 04, 09, 05, 06, 35, 06, 05, 03, 06, 36, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 3a, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 3e, 05, 09, 03, 0a, 46, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 55, 03, 0d, 00, 1d, 4e, 03, 09, 00, 13, 5a, 03, 0d, 00, 1d, 72, 03, 05, 00, 0f, 72, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 7a, 02, 0d, 00, 13, 86, 01, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 92, 01, 02, 0d, 00, 13, a2, 01, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 71, 04, 0d, 00, 13, b2, 01, 02, 0d, 00, 17, b2, 01, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, b6, 01, 02, 15, 00, 1b, be, 01, 04, 0d, 00, 13, 79, 03, 09, 00, 19, c6, 01, 02, 05, 00, 0f, d6, 01, 03, 09, 00, 22, 7d, 02, 05, 00, 0f, ea, 01, 03, 09, 00, 2c, 81, 01, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 59
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 1 operands: lhs = Counter(3), rhs = Counter(4)
 - expression 2 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 3 operands: lhs = Expression(7, Sub), rhs = Counter(7)
-- expression 4 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 5 operands: lhs = Expression(6, Sub), rhs = Counter(8)
-- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(7)
-- expression 7 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 8 operands: lhs = Counter(9), rhs = Counter(11)
+- expression 3 operands: lhs = Counter(5), rhs = Expression(7, Add)
+- expression 4 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 5 operands: lhs = Counter(5), rhs = Expression(6, Add)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(8)
+- expression 7 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 8 operands: lhs = Counter(9), rhs = Counter(10)
 - expression 9 operands: lhs = Counter(8), rhs = Counter(9)
-- expression 10 operands: lhs = Counter(10), rhs = Counter(13)
-- expression 11 operands: lhs = Expression(12, Sub), rhs = Counter(10)
-- expression 12 operands: lhs = Counter(8), rhs = Counter(9)
-- expression 13 operands: lhs = Counter(12), rhs = Counter(14)
+- expression 10 operands: lhs = Counter(11), rhs = Counter(12)
+- expression 11 operands: lhs = Counter(8), rhs = Expression(12, Add)
+- expression 12 operands: lhs = Counter(9), rhs = Counter(11)
+- expression 13 operands: lhs = Counter(13), rhs = Counter(14)
 - expression 14 operands: lhs = Counter(15), rhs = Counter(16)
-- expression 15 operands: lhs = Expression(16, Sub), rhs = Counter(17)
-- expression 16 operands: lhs = Counter(15), rhs = Counter(16)
-- expression 17 operands: lhs = Expression(25, Sub), rhs = Counter(18)
-- expression 18 operands: lhs = Counter(17), rhs = Counter(19)
-- expression 19 operands: lhs = Expression(24, Add), rhs = Counter(20)
-- expression 20 operands: lhs = Expression(25, Sub), rhs = Counter(18)
-- expression 21 operands: lhs = Counter(17), rhs = Counter(19)
-- expression 22 operands: lhs = Expression(23, Sub), rhs = Counter(21)
-- expression 23 operands: lhs = Expression(24, Add), rhs = Counter(20)
-- expression 24 operands: lhs = Expression(25, Sub), rhs = Counter(18)
-- expression 25 operands: lhs = Counter(17), rhs = Counter(19)
-- expression 26 operands: lhs = Expression(39, Sub), rhs = Counter(21)
+- expression 15 operands: lhs = Counter(15), rhs = Expression(16, Add)
+- expression 16 operands: lhs = Counter(16), rhs = Counter(17)
+- expression 17 operands: lhs = Expression(23, Add), rhs = Counter(19)
+- expression 18 operands: lhs = Counter(17), rhs = Counter(18)
+- expression 19 operands: lhs = Expression(23, Add), rhs = Expression(25, Add)
+- expression 20 operands: lhs = Counter(17), rhs = Counter(18)
+- expression 21 operands: lhs = Counter(19), rhs = Counter(20)
+- expression 22 operands: lhs = Expression(23, Add), rhs = Expression(24, Add)
+- expression 23 operands: lhs = Counter(17), rhs = Counter(18)
+- expression 24 operands: lhs = Expression(25, Add), rhs = Counter(22)
+- expression 25 operands: lhs = Counter(19), rhs = Counter(20)
+- expression 26 operands: lhs = Expression(37, Add), rhs = Counter(21)
 - expression 27 operands: lhs = Counter(20), rhs = Counter(22)
-- expression 28 operands: lhs = Expression(39, Sub), rhs = Counter(21)
+- expression 28 operands: lhs = Expression(37, Add), rhs = Counter(21)
 - expression 29 operands: lhs = Counter(20), rhs = Counter(22)
-- expression 30 operands: lhs = Expression(38, Add), rhs = Counter(23)
-- expression 31 operands: lhs = Expression(39, Sub), rhs = Counter(21)
-- expression 32 operands: lhs = Counter(20), rhs = Counter(22)
-- expression 33 operands: lhs = Expression(38, Add), rhs = Counter(24)
-- expression 34 operands: lhs = Expression(39, Sub), rhs = Counter(21)
-- expression 35 operands: lhs = Counter(20), rhs = Counter(22)
-- expression 36 operands: lhs = Expression(37, Sub), rhs = Counter(25)
-- expression 37 operands: lhs = Expression(38, Add), rhs = Counter(24)
-- expression 38 operands: lhs = Expression(39, Sub), rhs = Counter(21)
-- expression 39 operands: lhs = Counter(20), rhs = Counter(22)
-- expression 40 operands: lhs = Counter(29), rhs = Expression(56, Sub)
-- expression 41 operands: lhs = Expression(57, Sub), rhs = Counter(30)
-- expression 42 operands: lhs = Counter(26), rhs = Counter(27)
+- expression 30 operands: lhs = Expression(37, Add), rhs = Expression(32, Add)
+- expression 31 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 32 operands: lhs = Counter(21), rhs = Counter(23)
+- expression 33 operands: lhs = Expression(37, Add), rhs = Expression(39, Add)
+- expression 34 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 35 operands: lhs = Counter(21), rhs = Counter(24)
+- expression 36 operands: lhs = Expression(37, Add), rhs = Expression(38, Add)
+- expression 37 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 38 operands: lhs = Expression(39, Add), rhs = Counter(25)
+- expression 39 operands: lhs = Counter(21), rhs = Counter(24)
+- expression 40 operands: lhs = Expression(54, Add), rhs = Expression(57, Add)
+- expression 41 operands: lhs = Counter(26), rhs = Counter(28)
+- expression 42 operands: lhs = Counter(27), rhs = Counter(29)
 - expression 43 operands: lhs = Counter(26), rhs = Counter(27)
 - expression 44 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 45 operands: lhs = Expression(57, Sub), rhs = Zero
-- expression 46 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 47 operands: lhs = Expression(57, Sub), rhs = Counter(30)
-- expression 48 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 49 operands: lhs = Expression(55, Add), rhs = Counter(31)
-- expression 50 operands: lhs = Counter(29), rhs = Expression(56, Sub)
-- expression 51 operands: lhs = Expression(57, Sub), rhs = Counter(30)
-- expression 52 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 53 operands: lhs = Expression(54, Sub), rhs = Counter(32)
-- expression 54 operands: lhs = Expression(55, Add), rhs = Counter(31)
-- expression 55 operands: lhs = Counter(29), rhs = Expression(56, Sub)
-- expression 56 operands: lhs = Expression(57, Sub), rhs = Counter(30)
-- expression 57 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 58 operands: lhs = Counter(32), rhs = Counter(33)
+- expression 45 operands: lhs = Counter(26), rhs = Expression(46, Add)
+- expression 46 operands: lhs = Counter(27), rhs = Zero
+- expression 47 operands: lhs = Counter(26), rhs = Expression(57, Add)
+- expression 48 operands: lhs = Counter(27), rhs = Counter(29)
+- expression 49 operands: lhs = Expression(54, Add), rhs = Expression(56, Add)
+- expression 50 operands: lhs = Counter(26), rhs = Counter(28)
+- expression 51 operands: lhs = Expression(57, Add), rhs = Counter(30)
+- expression 52 operands: lhs = Counter(27), rhs = Counter(29)
+- expression 53 operands: lhs = Expression(54, Add), rhs = Expression(55, Add)
+- expression 54 operands: lhs = Counter(26), rhs = Counter(28)
+- expression 55 operands: lhs = Expression(56, Add), rhs = Counter(31)
+- expression 56 operands: lhs = Expression(57, Add), rhs = Counter(30)
+- expression 57 operands: lhs = Counter(27), rhs = Counter(29)
+- expression 58 operands: lhs = Counter(31), rhs = Counter(32)
 Number of file 0 mappings: 51
 - Code(Counter(0)) at (prev + 8, 1) to (start + 3, 28)
 - Code(Counter(1)) at (prev + 4, 9) to (start + 1, 28)
@@ -131,76 +131,76 @@ Number of file 0 mappings: 51
 - Code(Expression(1, Sub)) at (prev + 1, 5) to (start + 0, 31)
     = (c3 - c4)
 - Code(Counter(5)) at (prev + 1, 9) to (start + 1, 28)
-- Code(Expression(7, Sub)) at (prev + 2, 5) to (start + 0, 31)
+- Code(Expression(2, Sub)) at (prev + 2, 5) to (start + 0, 31)
     = (c5 - c6)
-- Code(Expression(6, Sub)) at (prev + 1, 5) to (start + 0, 15)
-    = ((c5 - c6) - c7)
+- Code(Expression(3, Sub)) at (prev + 1, 5) to (start + 0, 15)
+    = (c5 - (c6 + c7))
 - Code(Expression(5, Sub)) at (prev + 0, 32) to (start + 0, 48)
-    = (((c5 - c6) - c7) - c8)
+    = (c5 - ((c6 + c7) + c8))
 - Code(Counter(8)) at (prev + 1, 5) to (start + 3, 15)
 - Code(Counter(9)) at (prev + 3, 32) to (start + 0, 48)
-- Code(Counter(11)) at (prev + 0, 51) to (start + 0, 65)
+- Code(Counter(10)) at (prev + 0, 51) to (start + 0, 65)
 - Code(Expression(8, Sub)) at (prev + 0, 75) to (start + 0, 90)
-    = (c9 - c11)
-- Code(Expression(12, Sub)) at (prev + 1, 5) to (start + 0, 15)
+    = (c9 - c10)
+- Code(Expression(9, Sub)) at (prev + 1, 5) to (start + 0, 15)
     = (c8 - c9)
-- Code(Counter(10)) at (prev + 5, 9) to (start + 3, 16)
-- Code(Counter(13)) at (prev + 5, 13) to (start + 0, 27)
+- Code(Counter(11)) at (prev + 5, 9) to (start + 3, 16)
+- Code(Counter(12)) at (prev + 5, 13) to (start + 0, 27)
 - Code(Expression(10, Sub)) at (prev + 2, 13) to (start + 0, 28)
-    = (c10 - c13)
+    = (c11 - c12)
 - Code(Expression(11, Sub)) at (prev + 4, 9) to (start + 5, 6)
-    = ((c8 - c9) - c10)
-- Code(Counter(12)) at (prev + 6, 5) to (start + 3, 6)
+    = (c8 - (c9 + c11))
+- Code(Counter(13)) at (prev + 6, 5) to (start + 3, 6)
 - Code(Expression(13, Sub)) at (prev + 4, 5) to (start + 3, 6)
-    = (c12 - c14)
+    = (c13 - c14)
 - Code(Counter(15)) at (prev + 4, 9) to (start + 4, 6)
-- Code(Expression(16, Sub)) at (prev + 5, 8) to (start + 0, 15)
+- Code(Expression(14, Sub)) at (prev + 5, 8) to (start + 0, 15)
     = (c15 - c16)
 - Code(Counter(17)) at (prev + 1, 9) to (start + 3, 10)
 - Code(Expression(15, Sub)) at (prev + 5, 9) to (start + 3, 10)
-    = ((c15 - c16) - c17)
-- Code(Expression(24, Add)) at (prev + 5, 8) to (start + 0, 15)
-    = ((c17 - c19) + c18)
+    = (c15 - (c16 + c17))
+- Code(Expression(17, Sub)) at (prev + 5, 8) to (start + 0, 15)
+    = ((c17 + c18) - c19)
 - Code(Counter(20)) at (prev + 1, 9) to (start + 0, 19)
-- Code(Counter(22)) at (prev + 3, 13) to (start + 0, 29)
-- Code(Expression(23, Sub)) at (prev + 3, 9) to (start + 0, 19)
-    = (((c17 - c19) + c18) - c20)
+- Code(Counter(21)) at (prev + 3, 13) to (start + 0, 29)
+- Code(Expression(19, Sub)) at (prev + 3, 9) to (start + 0, 19)
+    = ((c17 + c18) - (c19 + c20))
 - Code(Expression(22, Sub)) at (prev + 3, 13) to (start + 0, 29)
-    = ((((c17 - c19) + c18) - c20) - c21)
-- Code(Expression(38, Add)) at (prev + 3, 5) to (start + 0, 15)
-    = ((c20 - c22) + c21)
-- Code(Expression(38, Add)) at (prev + 1, 12) to (start + 0, 19)
-    = ((c20 - c22) + c21)
+    = ((c17 + c18) - ((c19 + c20) + c22))
+- Code(Expression(28, Sub)) at (prev + 3, 5) to (start + 0, 15)
+    = ((c20 + c22) - c21)
+- Code(Expression(28, Sub)) at (prev + 1, 12) to (start + 0, 19)
+    = ((c20 + c22) - c21)
 - Code(Counter(23)) at (prev + 1, 13) to (start + 0, 19)
 - Code(Expression(30, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = (((c20 - c22) + c21) - c23)
-- Code(Expression(37, Sub)) at (prev + 4, 5) to (start + 2, 19)
-    = (((c20 - c22) + c21) - c24)
+    = ((c20 + c22) - (c21 + c23))
+- Code(Expression(33, Sub)) at (prev + 4, 5) to (start + 2, 19)
+    = ((c20 + c22) - (c21 + c24))
 - Code(Counter(25)) at (prev + 3, 13) to (start + 0, 19)
 - Code(Expression(36, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = ((((c20 - c22) + c21) - c24) - c25)
-- Code(Expression(55, Add)) at (prev + 3, 5) to (start + 0, 15)
-    = (c29 + ((c26 - c27) - c30))
+    = ((c20 + c22) - ((c21 + c24) + c25))
+- Code(Expression(40, Sub)) at (prev + 3, 5) to (start + 0, 15)
+    = ((c26 + c28) - (c27 + c29))
 - Code(Counter(26)) at (prev + 1, 12) to (start + 0, 19)
 - Code(Counter(27)) at (prev + 1, 13) to (start + 3, 14)
-- Code(Counter(29)) at (prev + 4, 13) to (start + 0, 19)
-- Code(Expression(57, Sub)) at (prev + 2, 13) to (start + 0, 23)
+- Code(Counter(28)) at (prev + 4, 13) to (start + 0, 19)
+- Code(Expression(44, Sub)) at (prev + 2, 13) to (start + 0, 23)
     = (c26 - c27)
-- Code(Expression(57, Sub)) at (prev + 1, 20) to (start + 0, 27)
+- Code(Expression(44, Sub)) at (prev + 1, 20) to (start + 0, 27)
     = (c26 - c27)
 - Code(Zero) at (prev + 1, 21) to (start + 0, 27)
 - Code(Expression(45, Sub)) at (prev + 2, 21) to (start + 0, 27)
-    = ((c26 - c27) - Zero)
-- Code(Expression(56, Sub)) at (prev + 4, 13) to (start + 0, 19)
-    = ((c26 - c27) - c30)
-- Code(Counter(31)) at (prev + 3, 9) to (start + 0, 25)
-- Code(Expression(54, Sub)) at (prev + 2, 5) to (start + 0, 15)
-    = ((c29 + ((c26 - c27) - c30)) - c31)
+    = (c26 - (c27 + Zero))
+- Code(Expression(47, Sub)) at (prev + 4, 13) to (start + 0, 19)
+    = (c26 - (c27 + c29))
+- Code(Counter(30)) at (prev + 3, 9) to (start + 0, 25)
+- Code(Expression(49, Sub)) at (prev + 2, 5) to (start + 0, 15)
+    = ((c26 + c28) - ((c27 + c29) + c30))
 - Code(Expression(53, Sub)) at (prev + 3, 9) to (start + 0, 34)
-    = (((c29 + ((c26 - c27) - c30)) - c31) - c32)
-- Code(Counter(32)) at (prev + 2, 5) to (start + 0, 15)
+    = ((c26 + c28) - (((c27 + c29) + c30) + c31))
+- Code(Counter(31)) at (prev + 2, 5) to (start + 0, 15)
 - Code(Expression(58, Sub)) at (prev + 3, 9) to (start + 0, 44)
-    = (c32 - c33)
-- Code(Counter(33)) at (prev + 2, 1) to (start + 0, 2)
-Highest counter ID seen: c33
+    = (c31 - c32)
+- Code(Counter(32)) at (prev + 2, 1) to (start + 0, 2)
+Highest counter ID seen: c32
 
diff --git a/tests/coverage/lazy_boolean.cov-map b/tests/coverage/lazy_boolean.cov-map
index b0c2d736573..3f7788da1eb 100644
--- a/tests/coverage/lazy_boolean.cov-map
+++ b/tests/coverage/lazy_boolean.cov-map
@@ -1,15 +1,15 @@
 Function name: lazy_boolean::main
-Raw bytes (158): 0x[01, 01, 07, 01, 05, 01, 09, 01, 0d, 01, 19, 01, 1d, 01, 21, 01, 25, 1c, 01, 04, 01, 07, 0f, 05, 07, 10, 04, 06, 02, 04, 05, 00, 06, 01, 02, 09, 00, 11, 01, 02, 0d, 00, 12, 06, 02, 0d, 00, 12, 01, 03, 09, 00, 11, 01, 02, 0d, 00, 12, 0a, 02, 0d, 00, 12, 01, 02, 09, 00, 11, 01, 00, 14, 00, 19, 11, 00, 1d, 00, 22, 01, 01, 09, 00, 11, 01, 00, 14, 00, 19, 15, 00, 1d, 00, 22, 01, 03, 09, 01, 10, 0e, 02, 05, 03, 06, 19, 03, 05, 00, 06, 01, 03, 09, 00, 10, 1d, 01, 05, 03, 06, 12, 05, 05, 03, 06, 01, 05, 08, 00, 10, 16, 00, 11, 02, 06, 21, 02, 05, 00, 06, 01, 02, 08, 00, 0f, 25, 00, 10, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
+Raw bytes (158): 0x[01, 01, 07, 01, 05, 01, 25, 01, 21, 01, 11, 01, 15, 01, 19, 01, 1d, 1c, 01, 04, 01, 07, 0f, 05, 07, 10, 04, 06, 02, 04, 05, 00, 06, 01, 02, 09, 00, 11, 01, 02, 0d, 00, 12, 06, 02, 0d, 00, 12, 01, 03, 09, 00, 11, 01, 02, 0d, 00, 12, 0a, 02, 0d, 00, 12, 01, 02, 09, 00, 11, 01, 00, 14, 00, 19, 09, 00, 1d, 00, 22, 01, 01, 09, 00, 11, 01, 00, 14, 00, 19, 0d, 00, 1d, 00, 22, 01, 03, 09, 01, 10, 0e, 02, 05, 03, 06, 11, 03, 05, 00, 06, 01, 03, 09, 00, 10, 15, 01, 05, 03, 06, 12, 05, 05, 03, 06, 01, 05, 08, 00, 10, 16, 00, 11, 02, 06, 19, 02, 05, 00, 06, 01, 02, 08, 00, 0f, 1d, 00, 10, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 7
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(6)
-- expression 4 operands: lhs = Counter(0), rhs = Counter(7)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(8)
-- expression 6 operands: lhs = Counter(0), rhs = Counter(9)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(9)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(8)
+- expression 3 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 4 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(6)
+- expression 6 operands: lhs = Counter(0), rhs = Counter(7)
 Number of file 0 mappings: 28
 - Code(Counter(0)) at (prev + 4, 1) to (start + 7, 15)
 - Code(Counter(1)) at (prev + 7, 16) to (start + 4, 6)
@@ -18,33 +18,33 @@ Number of file 0 mappings: 28
 - Code(Counter(0)) at (prev + 2, 9) to (start + 0, 17)
 - Code(Counter(0)) at (prev + 2, 13) to (start + 0, 18)
 - Code(Expression(1, Sub)) at (prev + 2, 13) to (start + 0, 18)
-    = (c0 - c2)
+    = (c0 - c9)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 17)
 - Code(Counter(0)) at (prev + 2, 13) to (start + 0, 18)
 - Code(Expression(2, Sub)) at (prev + 2, 13) to (start + 0, 18)
-    = (c0 - c3)
+    = (c0 - c8)
 - Code(Counter(0)) at (prev + 2, 9) to (start + 0, 17)
 - Code(Counter(0)) at (prev + 0, 20) to (start + 0, 25)
-- Code(Counter(4)) at (prev + 0, 29) to (start + 0, 34)
+- Code(Counter(2)) at (prev + 0, 29) to (start + 0, 34)
 - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17)
 - Code(Counter(0)) at (prev + 0, 20) to (start + 0, 25)
-- Code(Counter(5)) at (prev + 0, 29) to (start + 0, 34)
+- Code(Counter(3)) at (prev + 0, 29) to (start + 0, 34)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 1, 16)
 - Code(Expression(3, Sub)) at (prev + 2, 5) to (start + 3, 6)
-    = (c0 - c6)
-- Code(Counter(6)) at (prev + 3, 5) to (start + 0, 6)
+    = (c0 - c4)
+- Code(Counter(4)) at (prev + 3, 5) to (start + 0, 6)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 16)
-- Code(Counter(7)) at (prev + 1, 5) to (start + 3, 6)
+- Code(Counter(5)) at (prev + 1, 5) to (start + 3, 6)
 - Code(Expression(4, Sub)) at (prev + 5, 5) to (start + 3, 6)
-    = (c0 - c7)
+    = (c0 - c5)
 - Code(Counter(0)) at (prev + 5, 8) to (start + 0, 16)
 - Code(Expression(5, Sub)) at (prev + 0, 17) to (start + 2, 6)
-    = (c0 - c8)
-- Code(Counter(8)) at (prev + 2, 5) to (start + 0, 6)
+    = (c0 - c6)
+- Code(Counter(6)) at (prev + 2, 5) to (start + 0, 6)
 - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 15)
-- Code(Counter(9)) at (prev + 0, 16) to (start + 2, 6)
+- Code(Counter(7)) at (prev + 0, 16) to (start + 2, 6)
 - Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c9)
+    = (c0 - c7)
 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c9
+Highest counter ID seen: c7
 
diff --git a/tests/coverage/loops_branches.cov-map b/tests/coverage/loops_branches.cov-map
index 61a6bda676a..14707701d8a 100644
--- a/tests/coverage/loops_branches.cov-map
+++ b/tests/coverage/loops_branches.cov-map
@@ -1,50 +1,42 @@
 Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt
-Raw bytes (228): 0x[01, 01, 2a, 05, 00, 9f, 01, 19, a3, 01, a7, 01, 0d, 00, 11, 00, a3, 01, a7, 01, 0d, 00, 11, 00, 9f, 01, 19, a3, 01, a7, 01, 0d, 00, 11, 00, 9a, 01, 00, 9f, 01, 19, a3, 01, a7, 01, 0d, 00, 11, 00, 96, 01, 00, 9a, 01, 00, 9f, 01, 19, a3, 01, a7, 01, 0d, 00, 11, 00, 9a, 01, 00, 9f, 01, 19, a3, 01, a7, 01, 0d, 00, 11, 00, 96, 01, 11, 9a, 01, 00, 9f, 01, 19, a3, 01, a7, 01, 0d, 00, 11, 00, 8f, 01, 19, 25, 92, 01, 96, 01, 11, 9a, 01, 00, 9f, 01, 19, a3, 01, a7, 01, 0d, 00, 11, 00, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0d, 00, 0e, 05, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 9a, 01, 03, 0d, 00, 0e, 9f, 01, 00, 12, 00, 17, 9a, 01, 01, 10, 00, 14, 96, 01, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 46, 01, 11, 00, 12, 96, 01, 01, 11, 00, 22, 92, 01, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, 8b, 01, 01, 05, 00, 06]
+Raw bytes (174): 0x[01, 01, 22, 05, 00, 2f, 7b, 67, 00, 77, 19, 01, 15, 05, 21, 2f, 05, 67, 00, 77, 19, 01, 15, 2f, 7b, 67, 00, 77, 19, 01, 15, 05, 21, 67, 7b, 77, 19, 01, 15, 05, 21, 67, 5b, 77, 19, 01, 15, 7b, 00, 05, 21, 67, 7b, 77, 19, 01, 15, 05, 21, 77, 7b, 01, 15, 05, 21, 83, 01, 05, 87, 01, 15, 01, 11, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0d, 00, 0e, 05, 01, 0d, 00, 1e, 11, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 2a, 03, 0d, 00, 0e, 1a, 00, 12, 00, 17, 2a, 01, 10, 00, 14, 62, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 4e, 01, 11, 00, 12, 62, 01, 11, 00, 22, 72, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 21, 03, 09, 00, 0f, 7e, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 42
+Number of expressions: 34
 - expression 0 operands: lhs = Counter(1), rhs = Zero
-- expression 1 operands: lhs = Expression(39, Add), rhs = Counter(6)
-- expression 2 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 3 operands: lhs = Counter(3), rhs = Zero
-- expression 4 operands: lhs = Counter(4), rhs = Zero
-- expression 5 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 6 operands: lhs = Counter(3), rhs = Zero
-- expression 7 operands: lhs = Counter(4), rhs = Zero
-- expression 8 operands: lhs = Expression(39, Add), rhs = Counter(6)
-- expression 9 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 10 operands: lhs = Counter(3), rhs = Zero
-- expression 11 operands: lhs = Counter(4), rhs = Zero
-- expression 12 operands: lhs = Expression(38, Sub), rhs = Zero
-- expression 13 operands: lhs = Expression(39, Add), rhs = Counter(6)
-- expression 14 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 15 operands: lhs = Counter(3), rhs = Zero
-- expression 16 operands: lhs = Counter(4), rhs = Zero
-- expression 17 operands: lhs = Expression(37, Sub), rhs = Zero
-- expression 18 operands: lhs = Expression(38, Sub), rhs = Zero
-- expression 19 operands: lhs = Expression(39, Add), rhs = Counter(6)
-- expression 20 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 21 operands: lhs = Counter(3), rhs = Zero
-- expression 22 operands: lhs = Counter(4), rhs = Zero
-- expression 23 operands: lhs = Expression(38, Sub), rhs = Zero
-- expression 24 operands: lhs = Expression(39, Add), rhs = Counter(6)
-- expression 25 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 26 operands: lhs = Counter(3), rhs = Zero
-- expression 27 operands: lhs = Counter(4), rhs = Zero
-- expression 28 operands: lhs = Expression(37, Sub), rhs = Counter(4)
-- expression 29 operands: lhs = Expression(38, Sub), rhs = Zero
-- expression 30 operands: lhs = Expression(39, Add), rhs = Counter(6)
-- expression 31 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 32 operands: lhs = Counter(3), rhs = Zero
-- expression 33 operands: lhs = Counter(4), rhs = Zero
-- expression 34 operands: lhs = Expression(35, Add), rhs = Counter(6)
-- expression 35 operands: lhs = Counter(9), rhs = Expression(36, Sub)
-- expression 36 operands: lhs = Expression(37, Sub), rhs = Counter(4)
-- expression 37 operands: lhs = Expression(38, Sub), rhs = Zero
-- expression 38 operands: lhs = Expression(39, Add), rhs = Counter(6)
-- expression 39 operands: lhs = Expression(40, Add), rhs = Expression(41, Add)
-- expression 40 operands: lhs = Counter(3), rhs = Zero
-- expression 41 operands: lhs = Counter(4), rhs = Zero
+- expression 1 operands: lhs = Expression(11, Add), rhs = Expression(30, Add)
+- expression 2 operands: lhs = Expression(25, Add), rhs = Zero
+- expression 3 operands: lhs = Expression(29, Add), rhs = Counter(6)
+- expression 4 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 5 operands: lhs = Counter(1), rhs = Counter(8)
+- expression 6 operands: lhs = Expression(11, Add), rhs = Counter(1)
+- expression 7 operands: lhs = Expression(25, Add), rhs = Zero
+- expression 8 operands: lhs = Expression(29, Add), rhs = Counter(6)
+- expression 9 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 10 operands: lhs = Expression(11, Add), rhs = Expression(30, Add)
+- expression 11 operands: lhs = Expression(25, Add), rhs = Zero
+- expression 12 operands: lhs = Expression(29, Add), rhs = Counter(6)
+- expression 13 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 14 operands: lhs = Counter(1), rhs = Counter(8)
+- expression 15 operands: lhs = Expression(25, Add), rhs = Expression(30, Add)
+- expression 16 operands: lhs = Expression(29, Add), rhs = Counter(6)
+- expression 17 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 18 operands: lhs = Counter(1), rhs = Counter(8)
+- expression 19 operands: lhs = Expression(25, Add), rhs = Expression(22, Add)
+- expression 20 operands: lhs = Expression(29, Add), rhs = Counter(6)
+- expression 21 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 22 operands: lhs = Expression(30, Add), rhs = Zero
+- expression 23 operands: lhs = Counter(1), rhs = Counter(8)
+- expression 24 operands: lhs = Expression(25, Add), rhs = Expression(30, Add)
+- expression 25 operands: lhs = Expression(29, Add), rhs = Counter(6)
+- expression 26 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 27 operands: lhs = Counter(1), rhs = Counter(8)
+- expression 28 operands: lhs = Expression(29, Add), rhs = Expression(30, Add)
+- expression 29 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 30 operands: lhs = Counter(1), rhs = Counter(8)
+- expression 31 operands: lhs = Expression(32, Add), rhs = Counter(1)
+- expression 32 operands: lhs = Expression(33, Add), rhs = Counter(5)
+- expression 33 operands: lhs = Counter(0), rhs = Counter(4)
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 9, 5) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 2, 16) to (start + 0, 21)
@@ -53,78 +45,59 @@ Number of file 0 mappings: 20
 - Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 14)
     = (c1 - Zero)
 - Code(Counter(1)) at (prev + 1, 13) to (start + 0, 30)
-- Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31)
+- Code(Counter(4)) at (prev + 0, 30) to (start + 0, 31)
 - Code(Zero) at (prev + 1, 16) to (start + 1, 10)
-- Code(Expression(38, Sub)) at (prev + 3, 13) to (start + 0, 14)
-    = (((c3 + Zero) + (c4 + Zero)) - c6)
-- Code(Expression(39, Add)) at (prev + 0, 18) to (start + 0, 23)
-    = ((c3 + Zero) + (c4 + Zero))
-- Code(Expression(38, Sub)) at (prev + 1, 16) to (start + 0, 20)
-    = (((c3 + Zero) + (c4 + Zero)) - c6)
-- Code(Expression(37, Sub)) at (prev + 1, 20) to (start + 0, 25)
-    = ((((c3 + Zero) + (c4 + Zero)) - c6) - Zero)
+- Code(Expression(10, Sub)) at (prev + 3, 13) to (start + 0, 14)
+    = ((((c0 + c5) + c6) + Zero) - (c1 + c8))
+- Code(Expression(6, Sub)) at (prev + 0, 18) to (start + 0, 23)
+    = ((((c0 + c5) + c6) + Zero) - c1)
+- Code(Expression(10, Sub)) at (prev + 1, 16) to (start + 0, 20)
+    = ((((c0 + c5) + c6) + Zero) - (c1 + c8))
+- Code(Expression(24, Sub)) at (prev + 1, 20) to (start + 0, 25)
+    = (((c0 + c5) + c6) - (c1 + c8))
 - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
-- Code(Expression(17, Sub)) at (prev + 1, 17) to (start + 0, 18)
-    = (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)
-- Code(Expression(37, Sub)) at (prev + 1, 17) to (start + 0, 34)
-    = ((((c3 + Zero) + (c4 + Zero)) - c6) - Zero)
-- Code(Expression(36, Sub)) at (prev + 0, 34) to (start + 0, 35)
-    = (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - c4)
+- Code(Expression(19, Sub)) at (prev + 1, 17) to (start + 0, 18)
+    = (((c0 + c5) + c6) - ((c1 + c8) + Zero))
+- Code(Expression(24, Sub)) at (prev + 1, 17) to (start + 0, 34)
+    = (((c0 + c5) + c6) - (c1 + c8))
+- Code(Expression(28, Sub)) at (prev + 0, 34) to (start + 0, 35)
+    = ((c0 + c5) - (c1 + c8))
 - Code(Zero) at (prev + 1, 20) to (start + 1, 14)
-- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15)
-- Code(Expression(34, Add)) at (prev + 1, 5) to (start + 0, 6)
-    = ((c9 + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - c4)) + c6)
-Highest counter ID seen: c9
+- Code(Counter(8)) at (prev + 3, 9) to (start + 0, 15)
+- Code(Expression(31, Sub)) at (prev + 1, 5) to (start + 0, 6)
+    = (((c0 + c4) + c5) - c1)
+Highest counter ID seen: c8
 
 Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt
-Raw bytes (230): 0x[01, 01, 2b, 01, 00, 02, 00, a3, 01, 19, a7, 01, ab, 01, 00, 0d, 00, 15, a7, 01, ab, 01, 00, 0d, 00, 15, a3, 01, 19, a7, 01, ab, 01, 00, 0d, 00, 15, 9e, 01, 00, a3, 01, 19, a7, 01, ab, 01, 00, 0d, 00, 15, 9a, 01, 00, 9e, 01, 00, a3, 01, 19, a7, 01, ab, 01, 00, 0d, 00, 15, 9e, 01, 00, a3, 01, 19, a7, 01, ab, 01, 00, 0d, 00, 15, 9a, 01, 15, 9e, 01, 00, a3, 01, 19, a7, 01, ab, 01, 00, 0d, 00, 15, 93, 01, 25, 96, 01, 19, 9a, 01, 15, 9e, 01, 00, a3, 01, 19, a7, 01, ab, 01, 00, 0d, 00, 15, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 06, 01, 0d, 00, 0e, 02, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 9e, 01, 02, 0d, 00, 0e, a3, 01, 00, 12, 00, 17, 9e, 01, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 9a, 01, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 4a, 01, 11, 00, 12, 9a, 01, 01, 11, 00, 22, 96, 01, 00, 22, 00, 23, 19, 03, 09, 00, 0f, 8f, 01, 01, 05, 00, 06]
+Raw bytes (152): 0x[01, 01, 18, 01, 00, 01, 00, 23, 15, 27, 11, 00, 0d, 27, 11, 00, 0d, 23, 15, 27, 11, 00, 0d, 4b, 15, 4f, 11, 00, 0d, 4b, 43, 4f, 11, 00, 0d, 15, 00, 4b, 15, 4f, 11, 00, 0d, 5f, 15, 00, 11, 5f, 21, 00, 11, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 06, 01, 0d, 00, 0e, 02, 01, 0d, 00, 1e, 21, 00, 1e, 00, 1f, 1e, 02, 0d, 00, 0e, 23, 00, 12, 00, 17, 1e, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 46, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 36, 01, 11, 00, 12, 46, 01, 11, 00, 22, 52, 00, 22, 00, 23, 15, 03, 09, 00, 0f, 5b, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 43
+Number of expressions: 24
 - expression 0 operands: lhs = Counter(0), rhs = Zero
-- expression 1 operands: lhs = Expression(0, Sub), rhs = Zero
-- expression 2 operands: lhs = Expression(40, Add), rhs = Counter(6)
-- expression 3 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
+- expression 1 operands: lhs = Counter(0), rhs = Zero
+- expression 2 operands: lhs = Expression(8, Add), rhs = Counter(5)
+- expression 3 operands: lhs = Expression(9, Add), rhs = Counter(4)
 - expression 4 operands: lhs = Zero, rhs = Counter(3)
-- expression 5 operands: lhs = Zero, rhs = Counter(5)
-- expression 6 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
-- expression 7 operands: lhs = Zero, rhs = Counter(3)
-- expression 8 operands: lhs = Zero, rhs = Counter(5)
-- expression 9 operands: lhs = Expression(40, Add), rhs = Counter(6)
-- expression 10 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
-- expression 11 operands: lhs = Zero, rhs = Counter(3)
-- expression 12 operands: lhs = Zero, rhs = Counter(5)
-- expression 13 operands: lhs = Expression(39, Sub), rhs = Zero
-- expression 14 operands: lhs = Expression(40, Add), rhs = Counter(6)
-- expression 15 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
-- expression 16 operands: lhs = Zero, rhs = Counter(3)
-- expression 17 operands: lhs = Zero, rhs = Counter(5)
-- expression 18 operands: lhs = Expression(38, Sub), rhs = Zero
-- expression 19 operands: lhs = Expression(39, Sub), rhs = Zero
-- expression 20 operands: lhs = Expression(40, Add), rhs = Counter(6)
-- expression 21 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
-- expression 22 operands: lhs = Zero, rhs = Counter(3)
-- expression 23 operands: lhs = Zero, rhs = Counter(5)
-- expression 24 operands: lhs = Expression(39, Sub), rhs = Zero
-- expression 25 operands: lhs = Expression(40, Add), rhs = Counter(6)
-- expression 26 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
-- expression 27 operands: lhs = Zero, rhs = Counter(3)
-- expression 28 operands: lhs = Zero, rhs = Counter(5)
-- expression 29 operands: lhs = Expression(38, Sub), rhs = Counter(5)
-- expression 30 operands: lhs = Expression(39, Sub), rhs = Zero
-- expression 31 operands: lhs = Expression(40, Add), rhs = Counter(6)
-- expression 32 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
-- expression 33 operands: lhs = Zero, rhs = Counter(3)
-- expression 34 operands: lhs = Zero, rhs = Counter(5)
-- expression 35 operands: lhs = Expression(36, Add), rhs = Counter(9)
-- expression 36 operands: lhs = Expression(37, Sub), rhs = Counter(6)
-- expression 37 operands: lhs = Expression(38, Sub), rhs = Counter(5)
-- expression 38 operands: lhs = Expression(39, Sub), rhs = Zero
-- expression 39 operands: lhs = Expression(40, Add), rhs = Counter(6)
-- expression 40 operands: lhs = Expression(41, Add), rhs = Expression(42, Add)
-- expression 41 operands: lhs = Zero, rhs = Counter(3)
-- expression 42 operands: lhs = Zero, rhs = Counter(5)
+- expression 5 operands: lhs = Expression(9, Add), rhs = Counter(4)
+- expression 6 operands: lhs = Zero, rhs = Counter(3)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(5)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(4)
+- expression 9 operands: lhs = Zero, rhs = Counter(3)
+- expression 10 operands: lhs = Expression(18, Add), rhs = Counter(5)
+- expression 11 operands: lhs = Expression(19, Add), rhs = Counter(4)
+- expression 12 operands: lhs = Zero, rhs = Counter(3)
+- expression 13 operands: lhs = Expression(18, Add), rhs = Expression(16, Add)
+- expression 14 operands: lhs = Expression(19, Add), rhs = Counter(4)
+- expression 15 operands: lhs = Zero, rhs = Counter(3)
+- expression 16 operands: lhs = Counter(5), rhs = Zero
+- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(5)
+- expression 18 operands: lhs = Expression(19, Add), rhs = Counter(4)
+- expression 19 operands: lhs = Zero, rhs = Counter(3)
+- expression 20 operands: lhs = Expression(23, Add), rhs = Counter(5)
+- expression 21 operands: lhs = Zero, rhs = Counter(4)
+- expression 22 operands: lhs = Expression(23, Add), rhs = Counter(8)
+- expression 23 operands: lhs = Zero, rhs = Counter(4)
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 34, 5) to (start + 1, 17)
 - Code(Zero) at (prev + 1, 18) to (start + 1, 10)
@@ -133,31 +106,31 @@ Number of file 0 mappings: 20
 - Code(Zero) at (prev + 1, 23) to (start + 0, 27)
 - Code(Zero) at (prev + 0, 28) to (start + 0, 30)
 - Code(Expression(1, Sub)) at (prev + 1, 13) to (start + 0, 14)
-    = ((c0 - Zero) - Zero)
+    = (c0 - Zero)
 - Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 30)
     = (c0 - Zero)
-- Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31)
-- Code(Expression(39, Sub)) at (prev + 2, 13) to (start + 0, 14)
-    = (((Zero + c3) + (Zero + c5)) - c6)
-- Code(Expression(40, Add)) at (prev + 0, 18) to (start + 0, 23)
-    = ((Zero + c3) + (Zero + c5))
-- Code(Expression(39, Sub)) at (prev + 1, 16) to (start + 0, 21)
-    = (((Zero + c3) + (Zero + c5)) - c6)
+- Code(Counter(8)) at (prev + 0, 30) to (start + 0, 31)
+- Code(Expression(7, Sub)) at (prev + 2, 13) to (start + 0, 14)
+    = (((Zero + c3) + c4) - c5)
+- Code(Expression(8, Add)) at (prev + 0, 18) to (start + 0, 23)
+    = ((Zero + c3) + c4)
+- Code(Expression(7, Sub)) at (prev + 1, 16) to (start + 0, 21)
+    = (((Zero + c3) + c4) - c5)
 - Code(Zero) at (prev + 0, 22) to (start + 1, 14)
-- Code(Expression(38, Sub)) at (prev + 2, 20) to (start + 0, 25)
-    = ((((Zero + c3) + (Zero + c5)) - c6) - Zero)
+- Code(Expression(17, Sub)) at (prev + 2, 20) to (start + 0, 25)
+    = (((Zero + c3) + c4) - c5)
 - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
-- Code(Expression(18, Sub)) at (prev + 1, 17) to (start + 0, 18)
-    = (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)
-- Code(Expression(38, Sub)) at (prev + 1, 17) to (start + 0, 34)
-    = ((((Zero + c3) + (Zero + c5)) - c6) - Zero)
-- Code(Expression(37, Sub)) at (prev + 0, 34) to (start + 0, 35)
-    = (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - c5)
-- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15)
-- Code(Expression(35, Add)) at (prev + 1, 5) to (start + 0, 6)
-    = (((((((Zero + c3) + (Zero + c5)) - c6) - Zero) - c5) + c6) + c9)
-Highest counter ID seen: c9
+- Code(Expression(13, Sub)) at (prev + 1, 17) to (start + 0, 18)
+    = (((Zero + c3) + c4) - (c5 + Zero))
+- Code(Expression(17, Sub)) at (prev + 1, 17) to (start + 0, 34)
+    = (((Zero + c3) + c4) - c5)
+- Code(Expression(20, Sub)) at (prev + 0, 34) to (start + 0, 35)
+    = ((Zero + c4) - c5)
+- Code(Counter(5)) at (prev + 3, 9) to (start + 0, 15)
+- Code(Expression(22, Add)) at (prev + 1, 5) to (start + 0, 6)
+    = ((Zero + c4) + c8)
+Highest counter ID seen: c8
 
 Function name: loops_branches::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02]
diff --git a/tests/coverage/mcdc/condition-limit.cov-map b/tests/coverage/mcdc/condition-limit.cov-map
index e3f5b49d363..19716878600 100644
--- a/tests/coverage/mcdc/condition-limit.cov-map
+++ b/tests/coverage/mcdc/condition-limit.cov-map
@@ -1,52 +1,54 @@
 Function name: condition_limit::accept_7_conditions
-Raw bytes (232): 0x[01, 01, 2c, 01, 05, 05, 1d, 05, 1d, 7a, 19, 05, 1d, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 21, 9b, 01, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 12, 01, 07, 01, 02, 09, 28, 08, 07, 02, 08, 00, 27, 30, 05, 02, 01, 07, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 7a, 1d, 07, 06, 00, 00, 0d, 00, 0e, 7a, 00, 12, 00, 13, 30, 76, 19, 06, 05, 00, 00, 12, 00, 13, 76, 00, 17, 00, 18, 30, 72, 15, 05, 04, 00, 00, 17, 00, 18, 72, 00, 1c, 00, 1d, 30, 6e, 11, 04, 03, 00, 00, 1c, 00, 1d, 6e, 00, 21, 00, 22, 30, 6a, 0d, 03, 02, 00, 00, 21, 00, 22, 6a, 00, 26, 00, 27, 30, 21, 09, 02, 00, 00, 00, 26, 00, 27, 21, 00, 28, 02, 06, 9b, 01, 02, 05, 00, 06, 97, 01, 01, 01, 00, 02]
+Raw bytes (237): 0x[01, 01, 2e, 01, 05, 05, 09, 05, 09, 05, 7b, 09, 0d, 05, 7b, 09, 0d, 05, 77, 7b, 11, 09, 0d, 05, 77, 7b, 11, 09, 0d, 05, 73, 77, 15, 7b, 11, 09, 0d, 05, 73, 77, 15, 7b, 11, 09, 0d, 05, 6f, 73, 19, 77, 15, 7b, 11, 09, 0d, 05, 6f, 73, 19, 77, 15, 7b, 11, 09, 0d, 83, 01, 05, a7, 01, 21, ab, 01, 19, af, 01, 15, b3, 01, 11, b7, 01, 0d, 01, 09, 9f, 01, 05, a3, 01, 21, a7, 01, 1d, ab, 01, 19, af, 01, 15, b3, 01, 11, b7, 01, 0d, 01, 09, 12, 01, 07, 01, 02, 09, 28, 08, 07, 02, 08, 00, 27, 30, 05, 02, 01, 07, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0a, 09, 07, 06, 00, 00, 0d, 00, 0e, 0a, 00, 12, 00, 13, 30, 16, 0d, 06, 05, 00, 00, 12, 00, 13, 16, 00, 17, 00, 18, 30, 2a, 11, 05, 04, 00, 00, 17, 00, 18, 2a, 00, 1c, 00, 1d, 30, 46, 15, 04, 03, 00, 00, 1c, 00, 1d, 46, 00, 21, 00, 22, 30, 6a, 19, 03, 02, 00, 00, 21, 00, 22, 6a, 00, 26, 00, 27, 30, 1d, 21, 02, 00, 00, 00, 26, 00, 27, 1d, 00, 28, 02, 06, 7e, 02, 05, 00, 06, 9a, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 44
+Number of expressions: 46
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 3 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 5 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 6 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 7 operands: lhs = Expression(29, Sub), rhs = Counter(5)
-- expression 8 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 9 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 10 operands: lhs = Expression(29, Sub), rhs = Counter(5)
-- expression 11 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 12 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 13 operands: lhs = Expression(28, Sub), rhs = Counter(4)
-- expression 14 operands: lhs = Expression(29, Sub), rhs = Counter(5)
-- expression 15 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 16 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 17 operands: lhs = Expression(28, Sub), rhs = Counter(4)
-- expression 18 operands: lhs = Expression(29, Sub), rhs = Counter(5)
-- expression 19 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 20 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 21 operands: lhs = Expression(27, Sub), rhs = Counter(3)
-- expression 22 operands: lhs = Expression(28, Sub), rhs = Counter(4)
-- expression 23 operands: lhs = Expression(29, Sub), rhs = Counter(5)
-- expression 24 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 25 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 26 operands: lhs = Expression(27, Sub), rhs = Counter(3)
-- expression 27 operands: lhs = Expression(28, Sub), rhs = Counter(4)
-- expression 28 operands: lhs = Expression(29, Sub), rhs = Counter(5)
-- expression 29 operands: lhs = Expression(30, Sub), rhs = Counter(6)
-- expression 30 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 31 operands: lhs = Expression(39, Add), rhs = Expression(0, Sub)
-- expression 32 operands: lhs = Expression(40, Add), rhs = Counter(7)
-- expression 33 operands: lhs = Expression(41, Add), rhs = Counter(6)
-- expression 34 operands: lhs = Expression(42, Add), rhs = Counter(5)
-- expression 35 operands: lhs = Expression(43, Add), rhs = Counter(4)
-- expression 36 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 37 operands: lhs = Counter(8), rhs = Expression(38, Add)
-- expression 38 operands: lhs = Expression(39, Add), rhs = Expression(0, Sub)
-- expression 39 operands: lhs = Expression(40, Add), rhs = Counter(7)
-- expression 40 operands: lhs = Expression(41, Add), rhs = Counter(6)
-- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(5)
-- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(4)
-- expression 43 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(30, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(1), rhs = Expression(30, Add)
+- expression 6 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 7 operands: lhs = Counter(1), rhs = Expression(29, Add)
+- expression 8 operands: lhs = Expression(30, Add), rhs = Counter(4)
+- expression 9 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 10 operands: lhs = Counter(1), rhs = Expression(29, Add)
+- expression 11 operands: lhs = Expression(30, Add), rhs = Counter(4)
+- expression 12 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 13 operands: lhs = Counter(1), rhs = Expression(28, Add)
+- expression 14 operands: lhs = Expression(29, Add), rhs = Counter(5)
+- expression 15 operands: lhs = Expression(30, Add), rhs = Counter(4)
+- expression 16 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 17 operands: lhs = Counter(1), rhs = Expression(28, Add)
+- expression 18 operands: lhs = Expression(29, Add), rhs = Counter(5)
+- expression 19 operands: lhs = Expression(30, Add), rhs = Counter(4)
+- expression 20 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 21 operands: lhs = Counter(1), rhs = Expression(27, Add)
+- expression 22 operands: lhs = Expression(28, Add), rhs = Counter(6)
+- expression 23 operands: lhs = Expression(29, Add), rhs = Counter(5)
+- expression 24 operands: lhs = Expression(30, Add), rhs = Counter(4)
+- expression 25 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 26 operands: lhs = Counter(1), rhs = Expression(27, Add)
+- expression 27 operands: lhs = Expression(28, Add), rhs = Counter(6)
+- expression 28 operands: lhs = Expression(29, Add), rhs = Counter(5)
+- expression 29 operands: lhs = Expression(30, Add), rhs = Counter(4)
+- expression 30 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 31 operands: lhs = Expression(32, Add), rhs = Counter(1)
+- expression 32 operands: lhs = Expression(41, Add), rhs = Counter(8)
+- expression 33 operands: lhs = Expression(42, Add), rhs = Counter(6)
+- expression 34 operands: lhs = Expression(43, Add), rhs = Counter(5)
+- expression 35 operands: lhs = Expression(44, Add), rhs = Counter(4)
+- expression 36 operands: lhs = Expression(45, Add), rhs = Counter(3)
+- expression 37 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 38 operands: lhs = Expression(39, Add), rhs = Counter(1)
+- expression 39 operands: lhs = Expression(40, Add), rhs = Counter(8)
+- expression 40 operands: lhs = Expression(41, Add), rhs = Counter(7)
+- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(6)
+- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(5)
+- expression 43 operands: lhs = Expression(44, Add), rhs = Counter(4)
+- expression 44 operands: lhs = Expression(45, Add), rhs = Counter(3)
+- expression 45 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 18
 - Code(Counter(0)) at (prev + 7, 1) to (start + 2, 9)
 - MCDCDecision { bitmap_idx: 8, conditions_num: 7 } at (prev + 2, 8) to (start + 0, 39)
@@ -54,38 +56,38 @@ Number of file 0 mappings: 18
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Expression(30, Sub), false: Counter(7), condition_id: 7, true_next_id: 6, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = (c1 - c7)
-    false = c7
-- Code(Expression(30, Sub)) at (prev + 0, 18) to (start + 0, 19)
-    = (c1 - c7)
-- MCDCBranch { true: Expression(29, Sub), false: Counter(6), condition_id: 6, true_next_id: 5, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = ((c1 - c7) - c6)
-    false = c6
-- Code(Expression(29, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = ((c1 - c7) - c6)
-- MCDCBranch { true: Expression(28, Sub), false: Counter(5), condition_id: 5, true_next_id: 4, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
-    true  = (((c1 - c7) - c6) - c5)
-    false = c5
-- Code(Expression(28, Sub)) at (prev + 0, 28) to (start + 0, 29)
-    = (((c1 - c7) - c6) - c5)
-- MCDCBranch { true: Expression(27, Sub), false: Counter(4), condition_id: 4, true_next_id: 3, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
-    true  = ((((c1 - c7) - c6) - c5) - c4)
-    false = c4
-- Code(Expression(27, Sub)) at (prev + 0, 33) to (start + 0, 34)
-    = ((((c1 - c7) - c6) - c5) - c4)
-- MCDCBranch { true: Expression(26, Sub), false: Counter(3), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
-    true  = (((((c1 - c7) - c6) - c5) - c4) - c3)
+- MCDCBranch { true: Expression(2, Sub), false: Counter(2), condition_id: 7, true_next_id: 6, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+    true  = (c1 - c2)
+    false = c2
+- Code(Expression(2, Sub)) at (prev + 0, 18) to (start + 0, 19)
+    = (c1 - c2)
+- MCDCBranch { true: Expression(5, Sub), false: Counter(3), condition_id: 6, true_next_id: 5, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
+    true  = (c1 - (c2 + c3))
     false = c3
+- Code(Expression(5, Sub)) at (prev + 0, 23) to (start + 0, 24)
+    = (c1 - (c2 + c3))
+- MCDCBranch { true: Expression(10, Sub), false: Counter(4), condition_id: 5, true_next_id: 4, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
+    true  = (c1 - ((c2 + c3) + c4))
+    false = c4
+- Code(Expression(10, Sub)) at (prev + 0, 28) to (start + 0, 29)
+    = (c1 - ((c2 + c3) + c4))
+- MCDCBranch { true: Expression(17, Sub), false: Counter(5), condition_id: 4, true_next_id: 3, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
+    true  = (c1 - (((c2 + c3) + c4) + c5))
+    false = c5
+- Code(Expression(17, Sub)) at (prev + 0, 33) to (start + 0, 34)
+    = (c1 - (((c2 + c3) + c4) + c5))
+- MCDCBranch { true: Expression(26, Sub), false: Counter(6), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
+    true  = (c1 - ((((c2 + c3) + c4) + c5) + c6))
+    false = c6
 - Code(Expression(26, Sub)) at (prev + 0, 38) to (start + 0, 39)
-    = (((((c1 - c7) - c6) - c5) - c4) - c3)
-- MCDCBranch { true: Counter(8), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 38) to (start + 0, 39)
-    true  = c8
-    false = c2
-- Code(Counter(8)) at (prev + 0, 40) to (start + 2, 6)
-- Code(Expression(38, Add)) at (prev + 2, 5) to (start + 0, 6)
-    = ((((((c2 + c3) + c4) + c5) + c6) + c7) + (c0 - c1))
-- Code(Expression(37, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = (c8 + ((((((c2 + c3) + c4) + c5) + c6) + c7) + (c0 - c1)))
+    = (c1 - ((((c2 + c3) + c4) + c5) + c6))
+- MCDCBranch { true: Counter(7), false: Counter(8), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 38) to (start + 0, 39)
+    true  = c7
+    false = c8
+- Code(Counter(7)) at (prev + 0, 40) to (start + 2, 6)
+- Code(Expression(31, Sub)) at (prev + 2, 5) to (start + 0, 6)
+    = (((((((c0 + c2) + c3) + c4) + c5) + c6) + c8) - c1)
+- Code(Expression(38, Sub)) at (prev + 1, 1) to (start + 0, 2)
+    = ((((((((c0 + c2) + c3) + c4) + c5) + c6) + c7) + c8) - c1)
 Highest counter ID seen: c8
 
diff --git a/tests/coverage/mcdc/if.cov-map b/tests/coverage/mcdc/if.cov-map
index c0e7d08bb02..acb8aac63de 100644
--- a/tests/coverage/mcdc/if.cov-map
+++ b/tests/coverage/mcdc/if.cov-map
@@ -1,12 +1,14 @@
 Function name: if::mcdc_check_a
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 0f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 0f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 6
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
-- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 15, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -14,25 +16,27 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c3
-    false = c2
-- Code(Counter(3)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(3, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+    true  = c2
+    false = c3
+- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
+- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c3) - c1)
+- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: if::mcdc_check_b
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 17, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 17, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 6
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
-- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 23, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -40,25 +44,27 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c3
-    false = c2
-- Code(Counter(3)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(3, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+    true  = c2
+    false = c3
+- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
+- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c3) - c1)
+- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: if::mcdc_check_both
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 1f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 1f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 6
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
-- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 31, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -66,25 +72,27 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c3
-    false = c2
-- Code(Counter(3)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(3, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+    true  = c2
+    false = c3
+- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
+- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c3) - c1)
+- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: if::mcdc_check_neither
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 07, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 07, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 6
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
-- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 7, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -92,29 +100,32 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c3
-    false = c2
-- Code(Counter(3)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(3, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+    true  = c2
+    false = c3
+- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
+- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c3) - c1)
+- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: if::mcdc_check_not_tree_decision
-Raw bytes (87): 0x[01, 01, 08, 01, 05, 02, 09, 05, 09, 0d, 1e, 02, 09, 11, 1b, 0d, 1e, 02, 09, 0a, 01, 31, 01, 03, 0a, 28, 05, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 1e, 03, 02, 00, 00, 0e, 00, 0f, 0b, 00, 14, 00, 15, 30, 11, 0d, 02, 00, 00, 00, 14, 00, 15, 11, 00, 16, 02, 06, 1b, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
+Raw bytes (93): 0x[01, 01, 0b, 01, 05, 01, 2b, 05, 09, 05, 09, 17, 2b, 01, 11, 05, 09, 23, 2b, 27, 11, 01, 0d, 05, 09, 0a, 01, 31, 01, 03, 0a, 28, 05, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 06, 03, 02, 00, 00, 0e, 00, 0f, 2b, 00, 14, 00, 15, 30, 0d, 11, 02, 00, 00, 00, 14, 00, 15, 0d, 00, 16, 02, 06, 12, 02, 0c, 02, 06, 1e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 8
+Number of expressions: 11
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(0, Sub), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(10, Add)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(3), rhs = Expression(7, Sub)
-- expression 4 operands: lhs = Expression(0, Sub), rhs = Counter(2)
-- expression 5 operands: lhs = Counter(4), rhs = Expression(6, Add)
-- expression 6 operands: lhs = Counter(3), rhs = Expression(7, Sub)
-- expression 7 operands: lhs = Expression(0, Sub), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Expression(10, Add)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 6 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Expression(10, Add)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(4)
+- expression 9 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 10 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 49, 1) to (start + 3, 10)
 - MCDCDecision { bitmap_idx: 5, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
@@ -123,34 +134,36 @@ Number of file 0 mappings: 10
     false = (c0 - c1)
 - Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 15)
     = (c0 - c1)
-- MCDCBranch { true: Counter(2), false: Expression(7, Sub), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
     true  = c2
-    false = ((c0 - c1) - c2)
-- Code(Expression(2, Add)) at (prev + 0, 20) to (start + 0, 21)
+    false = (c0 - (c1 + c2))
+- Code(Expression(10, Add)) at (prev + 0, 20) to (start + 0, 21)
     = (c1 + c2)
-- MCDCBranch { true: Counter(4), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 20) to (start + 0, 21)
-    true  = c4
-    false = c3
-- Code(Counter(4)) at (prev + 0, 22) to (start + 2, 6)
-- Code(Expression(6, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c3 + ((c0 - c1) - c2))
-- Code(Expression(5, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c4 + (c3 + ((c0 - c1) - c2)))
+- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 20) to (start + 0, 21)
+    true  = c3
+    false = c4
+- Code(Counter(3)) at (prev + 0, 22) to (start + 2, 6)
+- Code(Expression(4, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c4) - (c1 + c2))
+- Code(Expression(7, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c3) + c4) - (c1 + c2))
 Highest counter ID seen: c4
 
 Function name: if::mcdc_check_tree_decision
-Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 0d, 05, 0d, 0d, 11, 09, 02, 1b, 1f, 0d, 11, 09, 02, 0a, 01, 27, 01, 03, 09, 28, 04, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 0d, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 11, 09, 03, 00, 00, 00, 13, 00, 14, 1b, 00, 16, 02, 06, 1f, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
+Raw bytes (91): 0x[01, 01, 0a, 01, 05, 05, 09, 05, 09, 09, 0d, 17, 05, 01, 11, 1f, 05, 23, 11, 27, 0d, 01, 09, 0a, 01, 27, 01, 03, 09, 28, 04, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 09, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 0d, 11, 03, 00, 00, 00, 13, 00, 14, 0f, 00, 16, 02, 06, 12, 02, 0c, 02, 06, 1a, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 8
+Number of expressions: 10
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 4 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 5 operands: lhs = Expression(6, Add), rhs = Expression(7, Add)
-- expression 6 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 7 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(1)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(1)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(4)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(3)
+- expression 9 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 39, 1) to (start + 3, 9)
 - MCDCDecision { bitmap_idx: 4, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
@@ -158,40 +171,43 @@ Number of file 0 mappings: 10
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
-- MCDCBranch { true: Counter(3), false: Expression(2, Sub), condition_id: 2, true_next_id: 0, false_next_id: 3 } at (prev + 0, 14) to (start + 0, 15)
-    true  = c3
-    false = (c1 - c3)
+- MCDCBranch { true: Counter(2), false: Expression(2, Sub), condition_id: 2, true_next_id: 0, false_next_id: 3 } at (prev + 0, 14) to (start + 0, 15)
+    true  = c2
+    false = (c1 - c2)
 - Code(Expression(2, Sub)) at (prev + 0, 19) to (start + 0, 20)
-    = (c1 - c3)
-- MCDCBranch { true: Counter(4), false: Counter(2), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
-    true  = c4
-    false = c2
-- Code(Expression(6, Add)) at (prev + 0, 22) to (start + 2, 6)
-    = (c3 + c4)
-- Code(Expression(7, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(5, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = ((c3 + c4) + (c2 + (c0 - c1)))
+    = (c1 - c2)
+- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
+    true  = c3
+    false = c4
+- Code(Expression(3, Add)) at (prev + 0, 22) to (start + 2, 6)
+    = (c2 + c3)
+- Code(Expression(4, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c4) - c1)
+- Code(Expression(6, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = ((((c0 + c2) + c3) + c4) - c1)
 Highest counter ID seen: c4
 
 Function name: if::mcdc_nested_if
-Raw bytes (124): 0x[01, 01, 0d, 01, 05, 02, 09, 05, 09, 1b, 15, 05, 09, 1b, 15, 05, 09, 11, 15, 02, 09, 2b, 32, 0d, 2f, 11, 15, 02, 09, 0e, 01, 3b, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 32, 02, 00, 00, 00, 0d, 00, 0e, 1b, 01, 09, 01, 0d, 28, 06, 02, 01, 0c, 00, 12, 30, 16, 15, 01, 02, 00, 00, 0c, 00, 0d, 16, 00, 11, 00, 12, 30, 0d, 11, 02, 00, 00, 00, 11, 00, 12, 0d, 00, 13, 02, 0a, 2f, 02, 09, 00, 0a, 32, 01, 0c, 02, 06, 27, 03, 01, 00, 02]
+Raw bytes (130): 0x[01, 01, 10, 01, 05, 01, 3f, 05, 09, 05, 09, 3f, 0d, 05, 09, 3f, 0d, 05, 09, 0d, 15, 01, 3f, 05, 09, 33, 3f, 37, 15, 3b, 11, 01, 0d, 05, 09, 0e, 01, 3b, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 26, 02, 00, 00, 00, 0d, 00, 0e, 3f, 01, 09, 01, 0d, 28, 06, 02, 01, 0c, 00, 12, 30, 1a, 0d, 01, 02, 00, 00, 0c, 00, 0d, 1a, 00, 11, 00, 12, 30, 11, 15, 02, 00, 00, 00, 11, 00, 12, 11, 00, 13, 02, 0a, 23, 02, 09, 00, 0a, 26, 01, 0c, 02, 06, 2e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 13
+Number of expressions: 16
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(0, Sub), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(15, Add)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Expression(6, Add), rhs = Counter(5)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(5)
-- expression 6 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 7 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 8 operands: lhs = Expression(0, Sub), rhs = Counter(2)
-- expression 9 operands: lhs = Expression(10, Add), rhs = Expression(12, Sub)
-- expression 10 operands: lhs = Counter(3), rhs = Expression(11, Add)
-- expression 11 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 12 operands: lhs = Expression(0, Sub), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 4 operands: lhs = Expression(15, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 6 operands: lhs = Expression(15, Add), rhs = Counter(3)
+- expression 7 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 8 operands: lhs = Counter(3), rhs = Counter(5)
+- expression 9 operands: lhs = Counter(0), rhs = Expression(15, Add)
+- expression 10 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 11 operands: lhs = Expression(12, Add), rhs = Expression(15, Add)
+- expression 12 operands: lhs = Expression(13, Add), rhs = Counter(5)
+- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(4)
+- expression 14 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 15 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 14
 - Code(Counter(0)) at (prev + 59, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -200,26 +216,26 @@ Number of file 0 mappings: 14
     false = (c0 - c1)
 - Code(Expression(0, Sub)) at (prev + 0, 13) to (start + 0, 14)
     = (c0 - c1)
-- MCDCBranch { true: Counter(2), false: Expression(12, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(2), false: Expression(9, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = ((c0 - c1) - c2)
-- Code(Expression(6, Add)) at (prev + 1, 9) to (start + 1, 13)
+    false = (c0 - (c1 + c2))
+- Code(Expression(15, Add)) at (prev + 1, 9) to (start + 1, 13)
     = (c1 + c2)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 1, 12) to (start + 0, 18)
-- MCDCBranch { true: Expression(5, Sub), false: Counter(5), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 12) to (start + 0, 13)
-    true  = ((c1 + c2) - c5)
+- MCDCBranch { true: Expression(6, Sub), false: Counter(3), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 12) to (start + 0, 13)
+    true  = ((c1 + c2) - c3)
+    false = c3
+- Code(Expression(6, Sub)) at (prev + 0, 17) to (start + 0, 18)
+    = ((c1 + c2) - c3)
+- MCDCBranch { true: Counter(4), false: Counter(5), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 17) to (start + 0, 18)
+    true  = c4
     false = c5
-- Code(Expression(5, Sub)) at (prev + 0, 17) to (start + 0, 18)
-    = ((c1 + c2) - c5)
-- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 17) to (start + 0, 18)
-    true  = c3
-    false = c4
-- Code(Counter(3)) at (prev + 0, 19) to (start + 2, 10)
-- Code(Expression(11, Add)) at (prev + 2, 9) to (start + 0, 10)
-    = (c4 + c5)
-- Code(Expression(12, Sub)) at (prev + 1, 12) to (start + 2, 6)
-    = ((c0 - c1) - c2)
-- Code(Expression(9, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = ((c3 + (c4 + c5)) + ((c0 - c1) - c2))
+- Code(Counter(4)) at (prev + 0, 19) to (start + 2, 10)
+- Code(Expression(8, Add)) at (prev + 2, 9) to (start + 0, 10)
+    = (c3 + c5)
+- Code(Expression(9, Sub)) at (prev + 1, 12) to (start + 2, 6)
+    = (c0 - (c1 + c2))
+- Code(Expression(11, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = ((((c0 + c3) + c4) + c5) - (c1 + c2))
 Highest counter ID seen: c5
 
diff --git a/tests/coverage/mcdc/inlined_expressions.cov-map b/tests/coverage/mcdc/inlined_expressions.cov-map
index 4f44e0f2b85..92ec60dc23c 100644
--- a/tests/coverage/mcdc/inlined_expressions.cov-map
+++ b/tests/coverage/mcdc/inlined_expressions.cov-map
@@ -1,11 +1,12 @@
 Function name: inlined_expressions::inlined_instance
-Raw bytes (52): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 06, 01, 08, 01, 01, 06, 28, 03, 02, 01, 05, 00, 0b, 30, 05, 02, 01, 02, 00, 00, 05, 00, 06, 05, 00, 0a, 00, 0b, 30, 09, 0d, 02, 00, 00, 00, 0a, 00, 0b, 07, 01, 01, 00, 02]
+Raw bytes (54): 0x[01, 01, 04, 01, 05, 0b, 05, 0f, 0d, 01, 09, 06, 01, 08, 01, 01, 06, 28, 03, 02, 01, 05, 00, 0b, 30, 05, 02, 01, 02, 00, 00, 05, 00, 06, 05, 00, 0a, 00, 0b, 30, 09, 0d, 02, 00, 00, 00, 0a, 00, 0b, 06, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 3
+Number of expressions: 4
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 6
 - Code(Counter(0)) at (prev + 8, 1) to (start + 1, 6)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 5) to (start + 0, 11)
@@ -16,7 +17,7 @@ Number of file 0 mappings: 6
 - MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 10) to (start + 0, 11)
     true  = c2
     false = c3
-- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = ((c2 + c3) + (c0 - c1))
+- Code(Expression(1, Sub)) at (prev + 1, 1) to (start + 0, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
diff --git a/tests/coverage/mcdc/nested_if.cov-map b/tests/coverage/mcdc/nested_if.cov-map
index 3bed49e7a12..72daecabc77 100644
--- a/tests/coverage/mcdc/nested_if.cov-map
+++ b/tests/coverage/mcdc/nested_if.cov-map
@@ -1,205 +1,213 @@
 Function name: nested_if::doubly_nested_if_in_condition
-Raw bytes (168): 0x[01, 01, 0e, 01, 05, 05, 11, 05, 11, 26, 19, 05, 11, 19, 1d, 19, 1d, 1d, 22, 26, 19, 05, 11, 11, 15, 09, 02, 0d, 37, 09, 02, 14, 01, 0f, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 4e, 05, 00, 10, 00, 11, 28, 06, 02, 00, 10, 00, 36, 30, 11, 26, 01, 00, 02, 00, 10, 00, 11, 30, 15, 21, 02, 00, 00, 00, 15, 00, 36, 26, 00, 18, 00, 19, 28, 03, 02, 00, 18, 00, 1e, 30, 19, 22, 01, 02, 00, 00, 18, 00, 19, 19, 00, 1d, 00, 1e, 30, 1a, 1d, 02, 00, 00, 00, 1d, 00, 1e, 1a, 00, 21, 00, 25, 1f, 00, 2f, 00, 34, 2b, 00, 39, 00, 3e, 21, 00, 48, 00, 4c, 0d, 00, 4f, 02, 06, 37, 02, 0c, 02, 06, 33, 03, 01, 00, 02]
+Raw bytes (172): 0x[01, 01, 10, 01, 05, 05, 09, 05, 09, 05, 27, 09, 19, 19, 1d, 19, 1d, 23, 27, 05, 1d, 09, 19, 09, 0d, 33, 05, 01, 15, 3b, 05, 3f, 15, 01, 11, 14, 01, 0f, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 11, 15, 02, 00, 00, 00, 0d, 00, 4e, 05, 00, 10, 00, 11, 28, 06, 02, 00, 10, 00, 36, 30, 09, 0a, 01, 00, 02, 00, 10, 00, 11, 30, 0d, 21, 02, 00, 00, 00, 15, 00, 36, 0a, 00, 18, 00, 19, 28, 03, 02, 00, 18, 00, 1e, 30, 19, 0e, 01, 02, 00, 00, 18, 00, 19, 19, 00, 1d, 00, 1e, 30, 1a, 1d, 02, 00, 00, 00, 1d, 00, 1e, 1a, 00, 21, 00, 25, 1e, 00, 2f, 00, 34, 2b, 00, 39, 00, 3e, 21, 00, 48, 00, 4c, 11, 00, 4f, 02, 06, 2e, 02, 0c, 02, 06, 36, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 14
+Number of expressions: 16
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 3 operands: lhs = Expression(9, Sub), rhs = Counter(6)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(9, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(6)
 - expression 5 operands: lhs = Counter(6), rhs = Counter(7)
 - expression 6 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 7 operands: lhs = Counter(7), rhs = Expression(8, Sub)
-- expression 8 operands: lhs = Expression(9, Sub), rhs = Counter(6)
-- expression 9 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 10 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 11 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 12 operands: lhs = Counter(3), rhs = Expression(13, Add)
-- expression 13 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Expression(9, Add)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(7)
+- expression 9 operands: lhs = Counter(2), rhs = Counter(6)
+- expression 10 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(1)
+- expression 12 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(1)
+- expression 14 operands: lhs = Expression(15, Add), rhs = Counter(5)
+- expression 15 operands: lhs = Counter(0), rhs = Counter(4)
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 15, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 9, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 78)
 - MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
     true  = c1
     false = (c0 - c1)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 78)
-    true  = c3
-    false = c2
+- MCDCBranch { true: Counter(4), false: Counter(5), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 78)
+    true  = c4
+    false = c5
 - Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 0, 16) to (start + 0, 54)
-- MCDCBranch { true: Counter(4), false: Expression(9, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
-    true  = c4
-    false = (c1 - c4)
-- MCDCBranch { true: Counter(5), false: Counter(8), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 54)
-    true  = c5
+- MCDCBranch { true: Counter(2), false: Expression(2, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
+    true  = c2
+    false = (c1 - c2)
+- MCDCBranch { true: Counter(3), false: Counter(8), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 54)
+    true  = c3
     false = c8
-- Code(Expression(9, Sub)) at (prev + 0, 24) to (start + 0, 25)
-    = (c1 - c4)
+- Code(Expression(2, Sub)) at (prev + 0, 24) to (start + 0, 25)
+    = (c1 - c2)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 24) to (start + 0, 30)
-- MCDCBranch { true: Counter(6), false: Expression(8, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 24) to (start + 0, 25)
+- MCDCBranch { true: Counter(6), false: Expression(3, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 24) to (start + 0, 25)
     true  = c6
-    false = ((c1 - c4) - c6)
+    false = (c1 - (c2 + c6))
 - Code(Counter(6)) at (prev + 0, 29) to (start + 0, 30)
 - MCDCBranch { true: Expression(6, Sub), false: Counter(7), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 29) to (start + 0, 30)
     true  = (c6 - c7)
     false = c7
 - Code(Expression(6, Sub)) at (prev + 0, 33) to (start + 0, 37)
     = (c6 - c7)
-- Code(Expression(7, Add)) at (prev + 0, 47) to (start + 0, 52)
-    = (c7 + ((c1 - c4) - c6))
+- Code(Expression(7, Sub)) at (prev + 0, 47) to (start + 0, 52)
+    = ((c1 + c7) - (c2 + c6))
 - Code(Expression(10, Add)) at (prev + 0, 57) to (start + 0, 62)
-    = (c4 + c5)
+    = (c2 + c3)
 - Code(Counter(8)) at (prev + 0, 72) to (start + 0, 76)
-- Code(Counter(3)) at (prev + 0, 79) to (start + 2, 6)
-- Code(Expression(13, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(12, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+- Code(Counter(4)) at (prev + 0, 79) to (start + 2, 6)
+- Code(Expression(11, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c5) - c1)
+- Code(Expression(13, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c4) + c5) - c1)
 Highest counter ID seen: c8
 
 Function name: nested_if::nested_if_in_condition
-Raw bytes (120): 0x[01, 01, 0b, 01, 05, 05, 11, 05, 11, 1e, 15, 05, 11, 11, 15, 1e, 15, 05, 11, 09, 02, 0d, 2b, 09, 02, 0e, 01, 07, 01, 01, 09, 28, 06, 02, 01, 08, 00, 2e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 2e, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 11, 1e, 01, 00, 02, 00, 10, 00, 11, 1e, 00, 15, 00, 16, 30, 15, 1a, 02, 00, 00, 00, 15, 00, 16, 17, 00, 19, 00, 1d, 1a, 00, 27, 00, 2c, 0d, 00, 2f, 02, 06, 2b, 02, 0c, 02, 06, 27, 03, 01, 00, 02]
+Raw bytes (124): 0x[01, 01, 0d, 01, 05, 05, 09, 05, 09, 05, 1f, 09, 0d, 09, 0d, 05, 1f, 09, 0d, 27, 05, 01, 15, 2f, 05, 33, 15, 01, 11, 0e, 01, 07, 01, 01, 09, 28, 06, 02, 01, 08, 00, 2e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 11, 15, 02, 00, 00, 00, 0d, 00, 2e, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 09, 0a, 01, 00, 02, 00, 10, 00, 11, 0a, 00, 15, 00, 16, 30, 0d, 1a, 02, 00, 00, 00, 15, 00, 16, 1f, 00, 19, 00, 1d, 1a, 00, 27, 00, 2c, 11, 00, 2f, 02, 06, 22, 02, 0c, 02, 06, 2a, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 11
+Number of expressions: 13
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 3 operands: lhs = Expression(7, Sub), rhs = Counter(5)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 5 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(5)
-- expression 7 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 8 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 9 operands: lhs = Counter(3), rhs = Expression(10, Add)
-- expression 10 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(7, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
+- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(1)
+- expression 9 operands: lhs = Counter(0), rhs = Counter(5)
+- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(1)
+- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(5)
+- expression 12 operands: lhs = Counter(0), rhs = Counter(4)
 Number of file 0 mappings: 14
 - Code(Counter(0)) at (prev + 7, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 46)
 - MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
     true  = c1
     false = (c0 - c1)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 46)
-    true  = c3
-    false = c2
+- MCDCBranch { true: Counter(4), false: Counter(5), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 46)
+    true  = c4
+    false = c5
 - Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 16) to (start + 0, 22)
-- MCDCBranch { true: Counter(4), false: Expression(7, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
-    true  = c4
-    false = (c1 - c4)
-- Code(Expression(7, Sub)) at (prev + 0, 21) to (start + 0, 22)
-    = (c1 - c4)
-- MCDCBranch { true: Counter(5), false: Expression(6, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
-    true  = c5
-    false = ((c1 - c4) - c5)
-- Code(Expression(5, Add)) at (prev + 0, 25) to (start + 0, 29)
-    = (c4 + c5)
+- MCDCBranch { true: Counter(2), false: Expression(2, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
+    true  = c2
+    false = (c1 - c2)
+- Code(Expression(2, Sub)) at (prev + 0, 21) to (start + 0, 22)
+    = (c1 - c2)
+- MCDCBranch { true: Counter(3), false: Expression(6, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
+    true  = c3
+    false = (c1 - (c2 + c3))
+- Code(Expression(7, Add)) at (prev + 0, 25) to (start + 0, 29)
+    = (c2 + c3)
 - Code(Expression(6, Sub)) at (prev + 0, 39) to (start + 0, 44)
-    = ((c1 - c4) - c5)
-- Code(Counter(3)) at (prev + 0, 47) to (start + 2, 6)
-- Code(Expression(10, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(9, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+    = (c1 - (c2 + c3))
+- Code(Counter(4)) at (prev + 0, 47) to (start + 2, 6)
+- Code(Expression(8, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c5) - c1)
+- Code(Expression(10, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c4) + c5) - c1)
 Highest counter ID seen: c5
 
 Function name: nested_if::nested_in_then_block_in_condition
-Raw bytes (176): 0x[01, 01, 12, 01, 05, 05, 11, 05, 11, 3a, 15, 05, 11, 11, 15, 33, 19, 11, 15, 19, 1d, 19, 1d, 1d, 2e, 33, 19, 11, 15, 3a, 15, 05, 11, 09, 02, 0d, 47, 09, 02, 14, 01, 22, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4b, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 4b, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 11, 3a, 01, 00, 02, 00, 10, 00, 11, 3a, 00, 15, 00, 16, 30, 15, 36, 02, 00, 00, 00, 15, 00, 16, 33, 00, 1c, 00, 1d, 28, 06, 02, 00, 1c, 00, 22, 30, 19, 2e, 01, 02, 00, 00, 1c, 00, 1d, 19, 00, 21, 00, 22, 30, 26, 1d, 02, 00, 00, 00, 21, 00, 22, 26, 00, 25, 00, 29, 2b, 00, 33, 00, 38, 36, 00, 44, 00, 49, 0d, 00, 4c, 02, 06, 47, 02, 0c, 02, 06, 43, 03, 01, 00, 02]
+Raw bytes (180): 0x[01, 01, 14, 01, 05, 05, 09, 05, 09, 05, 3b, 09, 0d, 09, 0d, 3b, 11, 09, 0d, 11, 15, 11, 15, 2f, 11, 3b, 15, 09, 0d, 05, 3b, 09, 0d, 43, 05, 01, 1d, 4b, 05, 4f, 1d, 01, 19, 14, 01, 22, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4b, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 19, 1d, 02, 00, 00, 00, 0d, 00, 4b, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 09, 0a, 01, 00, 02, 00, 10, 00, 11, 0a, 00, 15, 00, 16, 30, 0d, 36, 02, 00, 00, 00, 15, 00, 16, 3b, 00, 1c, 00, 1d, 28, 06, 02, 00, 1c, 00, 22, 30, 11, 1a, 01, 02, 00, 00, 1c, 00, 1d, 11, 00, 21, 00, 22, 30, 26, 15, 02, 00, 00, 00, 21, 00, 22, 26, 00, 25, 00, 29, 2a, 00, 33, 00, 38, 36, 00, 44, 00, 49, 19, 00, 4c, 02, 06, 3e, 02, 0c, 02, 06, 46, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 18
+Number of expressions: 20
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 3 operands: lhs = Expression(14, Sub), rhs = Counter(5)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 5 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 6 operands: lhs = Expression(12, Add), rhs = Counter(6)
-- expression 7 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 8 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 9 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 10 operands: lhs = Counter(7), rhs = Expression(11, Sub)
-- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(6)
-- expression 12 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 13 operands: lhs = Expression(14, Sub), rhs = Counter(5)
-- expression 14 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 15 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 16 operands: lhs = Counter(3), rhs = Expression(17, Add)
-- expression 17 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(14, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 6 operands: lhs = Expression(14, Add), rhs = Counter(4)
+- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 8 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 9 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(4)
+- expression 11 operands: lhs = Expression(14, Add), rhs = Counter(5)
+- expression 12 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 13 operands: lhs = Counter(1), rhs = Expression(14, Add)
+- expression 14 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 15 operands: lhs = Expression(16, Add), rhs = Counter(1)
+- expression 16 operands: lhs = Counter(0), rhs = Counter(7)
+- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(1)
+- expression 18 operands: lhs = Expression(19, Add), rhs = Counter(7)
+- expression 19 operands: lhs = Counter(0), rhs = Counter(6)
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 34, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 9, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 75)
 - MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
     true  = c1
     false = (c0 - c1)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 75)
-    true  = c3
-    false = c2
+- MCDCBranch { true: Counter(6), false: Counter(7), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 75)
+    true  = c6
+    false = c7
 - Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 16) to (start + 0, 22)
-- MCDCBranch { true: Counter(4), false: Expression(14, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
-    true  = c4
-    false = (c1 - c4)
-- Code(Expression(14, Sub)) at (prev + 0, 21) to (start + 0, 22)
-    = (c1 - c4)
-- MCDCBranch { true: Counter(5), false: Expression(13, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
-    true  = c5
-    false = ((c1 - c4) - c5)
-- Code(Expression(12, Add)) at (prev + 0, 28) to (start + 0, 29)
-    = (c4 + c5)
+- MCDCBranch { true: Counter(2), false: Expression(2, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
+    true  = c2
+    false = (c1 - c2)
+- Code(Expression(2, Sub)) at (prev + 0, 21) to (start + 0, 22)
+    = (c1 - c2)
+- MCDCBranch { true: Counter(3), false: Expression(13, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
+    true  = c3
+    false = (c1 - (c2 + c3))
+- Code(Expression(14, Add)) at (prev + 0, 28) to (start + 0, 29)
+    = (c2 + c3)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 0, 28) to (start + 0, 34)
-- MCDCBranch { true: Counter(6), false: Expression(11, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
-    true  = c6
-    false = ((c4 + c5) - c6)
-- Code(Counter(6)) at (prev + 0, 33) to (start + 0, 34)
-- MCDCBranch { true: Expression(9, Sub), false: Counter(7), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
-    true  = (c6 - c7)
-    false = c7
+- MCDCBranch { true: Counter(4), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
+    true  = c4
+    false = ((c2 + c3) - c4)
+- Code(Counter(4)) at (prev + 0, 33) to (start + 0, 34)
+- MCDCBranch { true: Expression(9, Sub), false: Counter(5), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
+    true  = (c4 - c5)
+    false = c5
 - Code(Expression(9, Sub)) at (prev + 0, 37) to (start + 0, 41)
-    = (c6 - c7)
-- Code(Expression(10, Add)) at (prev + 0, 51) to (start + 0, 56)
-    = (c7 + ((c4 + c5) - c6))
+    = (c4 - c5)
+- Code(Expression(10, Sub)) at (prev + 0, 51) to (start + 0, 56)
+    = (((c2 + c3) + c5) - c4)
 - Code(Expression(13, Sub)) at (prev + 0, 68) to (start + 0, 73)
-    = ((c1 - c4) - c5)
-- Code(Counter(3)) at (prev + 0, 76) to (start + 2, 6)
-- Code(Expression(17, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(16, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+    = (c1 - (c2 + c3))
+- Code(Counter(6)) at (prev + 0, 76) to (start + 2, 6)
+- Code(Expression(15, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c7) - c1)
+- Code(Expression(17, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c6) + c7) - c1)
 Highest counter ID seen: c7
 
 Function name: nested_if::nested_single_condition_decision
-Raw bytes (85): 0x[01, 01, 06, 01, 05, 05, 11, 05, 11, 09, 02, 0d, 17, 09, 02, 0b, 01, 17, 01, 04, 09, 28, 03, 02, 04, 08, 00, 29, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 29, 05, 00, 10, 00, 11, 20, 11, 0a, 00, 10, 00, 11, 11, 00, 14, 00, 19, 0a, 00, 23, 00, 27, 0d, 00, 2a, 02, 06, 17, 02, 0c, 02, 06, 13, 03, 01, 00, 02]
+Raw bytes (89): 0x[01, 01, 08, 01, 05, 05, 09, 05, 09, 13, 05, 01, 11, 1b, 05, 1f, 11, 01, 0d, 0b, 01, 17, 01, 04, 09, 28, 03, 02, 04, 08, 00, 29, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 11, 02, 00, 00, 00, 0d, 00, 29, 05, 00, 10, 00, 11, 20, 09, 0a, 00, 10, 00, 11, 09, 00, 14, 00, 19, 0a, 00, 23, 00, 27, 0d, 00, 2a, 02, 06, 0e, 02, 0c, 02, 06, 16, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
-- expression 4 operands: lhs = Counter(3), rhs = Expression(5, Add)
-- expression 5 operands: lhs = Counter(2), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
+- expression 4 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(1)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(4)
+- expression 7 operands: lhs = Counter(0), rhs = Counter(3)
 Number of file 0 mappings: 11
 - Code(Counter(0)) at (prev + 23, 1) to (start + 4, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 4, 8) to (start + 0, 41)
 - MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
     true  = c1
     false = (c0 - c1)
-- MCDCBranch { true: Counter(3), false: Counter(2), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 41)
+- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 41)
     true  = c3
-    false = c2
+    false = c4
 - Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
-- Branch { true: Counter(4), false: Expression(2, Sub) } at (prev + 0, 16) to (start + 0, 17)
-    true  = c4
-    false = (c1 - c4)
-- Code(Counter(4)) at (prev + 0, 20) to (start + 0, 25)
+- Branch { true: Counter(2), false: Expression(2, Sub) } at (prev + 0, 16) to (start + 0, 17)
+    true  = c2
+    false = (c1 - c2)
+- Code(Counter(2)) at (prev + 0, 20) to (start + 0, 25)
 - Code(Expression(2, Sub)) at (prev + 0, 35) to (start + 0, 39)
-    = (c1 - c4)
+    = (c1 - c2)
 - Code(Counter(3)) at (prev + 0, 42) to (start + 2, 6)
-- Code(Expression(5, Add)) at (prev + 2, 12) to (start + 2, 6)
-    = (c2 + (c0 - c1))
-- Code(Expression(4, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = (c3 + (c2 + (c0 - c1)))
+- Code(Expression(3, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = ((c0 + c4) - c1)
+- Code(Expression(5, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (((c0 + c3) + c4) - c1)
 Highest counter ID seen: c4
 
diff --git a/tests/coverage/mcdc/non_control_flow.cov-map b/tests/coverage/mcdc/non_control_flow.cov-map
index 677e31e404e..0edeff9a586 100644
--- a/tests/coverage/mcdc/non_control_flow.cov-map
+++ b/tests/coverage/mcdc/non_control_flow.cov-map
@@ -1,67 +1,65 @@
 Function name: non_control_flow::assign_3
-Raw bytes (89): 0x[01, 01, 09, 05, 07, 0b, 11, 09, 0d, 01, 05, 01, 05, 22, 11, 01, 05, 22, 11, 01, 05, 0a, 01, 16, 01, 00, 28, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 04, 03, 00, 0d, 00, 18, 30, 05, 22, 01, 00, 02, 00, 0d, 00, 0e, 22, 00, 12, 00, 13, 30, 1e, 11, 02, 03, 00, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 30, 09, 0d, 03, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (89): 0x[01, 01, 09, 07, 11, 0b, 0d, 05, 09, 01, 05, 01, 05, 01, 23, 05, 11, 01, 23, 05, 11, 0a, 01, 16, 01, 00, 28, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 04, 03, 00, 0d, 00, 18, 30, 05, 12, 01, 00, 02, 00, 0d, 00, 0e, 12, 00, 12, 00, 13, 30, 1e, 11, 02, 03, 00, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 30, 09, 0d, 03, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 9
-- expression 0 operands: lhs = Counter(1), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(4)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 4 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 5 operands: lhs = Expression(8, Sub), rhs = Counter(4)
-- expression 6 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(4)
-- expression 8 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 5 operands: lhs = Counter(0), rhs = Expression(8, Add)
+- expression 6 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 7 operands: lhs = Counter(0), rhs = Expression(8, Add)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(4)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 22, 1) to (start + 0, 40)
 - Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = (c1 + ((c2 + c3) + c4))
+    = (((c1 + c2) + c3) + c4)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 4, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
-- MCDCBranch { true: Counter(1), false: Expression(8, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(4, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
-- Code(Expression(8, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(4, Sub)) at (prev + 0, 18) to (start + 0, 19)
     = (c0 - c1)
 - MCDCBranch { true: Expression(7, Sub), false: Counter(4), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = ((c0 - c1) - c4)
+    true  = (c0 - (c1 + c4))
     false = c4
 - Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = ((c0 - c1) - c4)
+    = (c0 - (c1 + c4))
 - MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
     true  = c2
     false = c3
 - Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = (c1 + ((c2 + c3) + c4))
+    = (((c1 + c2) + c3) + c4)
 Highest counter ID seen: c4
 
 Function name: non_control_flow::assign_3_bis
-Raw bytes (85): 0x[01, 01, 07, 07, 11, 09, 0d, 01, 05, 05, 09, 16, 1a, 05, 09, 01, 05, 0a, 01, 1b, 01, 00, 2c, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 05, 03, 00, 0d, 00, 18, 30, 05, 1a, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 16, 03, 00, 02, 00, 12, 00, 13, 13, 00, 17, 00, 18, 30, 0d, 11, 02, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (81): 0x[01, 01, 05, 07, 11, 09, 0d, 01, 05, 05, 09, 01, 09, 0a, 01, 1b, 01, 00, 2c, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 05, 03, 00, 0d, 00, 18, 30, 05, 0a, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0e, 03, 00, 02, 00, 12, 00, 13, 12, 00, 17, 00, 18, 30, 0d, 11, 02, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 7
+Number of expressions: 5
 - expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
 - expression 1 operands: lhs = Counter(2), rhs = Counter(3)
 - expression 2 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(5, Sub), rhs = Expression(6, Sub)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 4 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 44)
 - Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
     = ((c2 + c3) + c4)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 5, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
-- MCDCBranch { true: Counter(1), false: Expression(6, Sub), condition_id: 1, true_next_id: 3, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(2, Sub), condition_id: 1, true_next_id: 3, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
-- MCDCBranch { true: Counter(2), false: Expression(5, Sub), condition_id: 3, true_next_id: 0, false_next_id: 2 } at (prev + 0, 18) to (start + 0, 19)
+- MCDCBranch { true: Counter(2), false: Expression(3, Sub), condition_id: 3, true_next_id: 0, false_next_id: 2 } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
     false = (c1 - c2)
-- Code(Expression(4, Add)) at (prev + 0, 23) to (start + 0, 24)
-    = ((c1 - c2) + (c0 - c1))
+- Code(Expression(4, Sub)) at (prev + 0, 23) to (start + 0, 24)
+    = (c0 - c2)
 - MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
     true  = c3
     false = c4
@@ -70,18 +68,18 @@ Number of file 0 mappings: 10
 Highest counter ID seen: c4
 
 Function name: non_control_flow::assign_and
-Raw bytes (64): 0x[01, 01, 04, 07, 0e, 09, 0d, 01, 05, 01, 05, 08, 01, 0c, 01, 00, 21, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
+Raw bytes (64): 0x[01, 01, 04, 07, 05, 0b, 0d, 01, 09, 01, 05, 08, 01, 0c, 01, 00, 21, 02, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 02, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
-- expression 0 operands: lhs = Expression(1, Add), rhs = Expression(3, Sub)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(1)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 33)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = ((c2 + c3) + (c0 - c1))
+- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
+    = (((c0 + c2) + c3) - c1)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
 - MCDCBranch { true: Counter(1), false: Expression(3, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
@@ -91,8 +89,8 @@ Number of file 0 mappings: 8
 - MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
     false = c3
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c2 + c3) + (c0 - c1))
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 1, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: non_control_flow::assign_or
@@ -132,13 +130,14 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: non_control_flow::func_call
-Raw bytes (52): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 06, 01, 29, 01, 01, 0a, 28, 03, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 0d, 02, 00, 00, 00, 0e, 00, 0f, 07, 01, 01, 00, 02]
+Raw bytes (54): 0x[01, 01, 04, 01, 05, 0b, 05, 0f, 0d, 01, 09, 06, 01, 29, 01, 01, 0a, 28, 03, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 0d, 02, 00, 00, 00, 0e, 00, 0f, 06, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 3
+Number of expressions: 4
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Expression(0, Sub)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 6
 - Code(Counter(0)) at (prev + 41, 1) to (start + 1, 10)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 9) to (start + 0, 15)
@@ -149,63 +148,63 @@ Number of file 0 mappings: 6
 - MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
     true  = c2
     false = c3
-- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = ((c2 + c3) + (c0 - c1))
+- Code(Expression(1, Sub)) at (prev + 1, 1) to (start + 0, 2)
+    = (((c0 + c2) + c3) - c1)
 Highest counter ID seen: c3
 
 Function name: non_control_flow::right_comb_tree
-Raw bytes (139): 0x[01, 01, 13, 07, 1a, 0b, 19, 0f, 15, 13, 11, 09, 0d, 01, 05, 01, 05, 05, 19, 05, 19, 4a, 15, 05, 19, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 0e, 01, 20, 01, 00, 41, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 06, 05, 00, 0d, 00, 2a, 30, 05, 1a, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 4a, 19, 02, 03, 00, 00, 13, 00, 14, 4a, 00, 19, 00, 1a, 30, 46, 15, 03, 04, 00, 00, 19, 00, 1a, 46, 00, 1f, 00, 20, 30, 42, 11, 04, 05, 00, 00, 1f, 00, 20, 42, 00, 24, 00, 27, 30, 09, 0d, 05, 00, 00, 00, 24, 00, 27, 03, 01, 05, 01, 02]
+Raw bytes (139): 0x[01, 01, 13, 07, 05, 0b, 19, 0f, 15, 13, 11, 17, 0d, 01, 09, 01, 05, 05, 09, 05, 09, 05, 4b, 09, 0d, 05, 4b, 09, 0d, 05, 47, 4b, 11, 09, 0d, 05, 47, 4b, 11, 09, 0d, 0e, 01, 20, 01, 00, 41, 02, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 06, 05, 00, 0d, 00, 2a, 30, 05, 1a, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 22, 09, 02, 03, 00, 00, 13, 00, 14, 22, 00, 19, 00, 1a, 30, 2e, 0d, 03, 04, 00, 00, 19, 00, 1a, 2e, 00, 1f, 00, 20, 30, 42, 11, 04, 05, 00, 00, 1f, 00, 20, 42, 00, 24, 00, 27, 30, 15, 19, 05, 00, 00, 00, 24, 00, 27, 02, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 19
-- expression 0 operands: lhs = Expression(1, Add), rhs = Expression(6, Sub)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(1)
 - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(6)
 - expression 2 operands: lhs = Expression(3, Add), rhs = Counter(5)
 - expression 3 operands: lhs = Expression(4, Add), rhs = Counter(4)
-- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
 - expression 6 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 7 operands: lhs = Counter(1), rhs = Counter(6)
-- expression 8 operands: lhs = Counter(1), rhs = Counter(6)
-- expression 9 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 10 operands: lhs = Counter(1), rhs = Counter(6)
-- expression 11 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 12 operands: lhs = Counter(1), rhs = Counter(6)
-- expression 13 operands: lhs = Expression(17, Sub), rhs = Counter(4)
-- expression 14 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 15 operands: lhs = Counter(1), rhs = Counter(6)
-- expression 16 operands: lhs = Expression(17, Sub), rhs = Counter(4)
-- expression 17 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 18 operands: lhs = Counter(1), rhs = Counter(6)
+- expression 7 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 9 operands: lhs = Counter(1), rhs = Expression(18, Add)
+- expression 10 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 11 operands: lhs = Counter(1), rhs = Expression(18, Add)
+- expression 12 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 13 operands: lhs = Counter(1), rhs = Expression(17, Add)
+- expression 14 operands: lhs = Expression(18, Add), rhs = Counter(4)
+- expression 15 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 16 operands: lhs = Counter(1), rhs = Expression(17, Add)
+- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(4)
+- expression 18 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 14
 - Code(Counter(0)) at (prev + 32, 1) to (start + 0, 65)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = (((((c2 + c3) + c4) + c5) + c6) + (c0 - c1))
+- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
+    = ((((((c0 + c2) + c3) + c4) + c5) + c6) - c1)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 5 } at (prev + 0, 13) to (start + 0, 42)
 - MCDCBranch { true: Counter(1), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 19) to (start + 0, 20)
-- MCDCBranch { true: Expression(18, Sub), false: Counter(6), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
-    true  = (c1 - c6)
-    false = c6
-- Code(Expression(18, Sub)) at (prev + 0, 25) to (start + 0, 26)
-    = (c1 - c6)
-- MCDCBranch { true: Expression(17, Sub), false: Counter(5), condition_id: 3, true_next_id: 4, false_next_id: 0 } at (prev + 0, 25) to (start + 0, 26)
-    true  = ((c1 - c6) - c5)
-    false = c5
-- Code(Expression(17, Sub)) at (prev + 0, 31) to (start + 0, 32)
-    = ((c1 - c6) - c5)
+- MCDCBranch { true: Expression(8, Sub), false: Counter(2), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
+    true  = (c1 - c2)
+    false = c2
+- Code(Expression(8, Sub)) at (prev + 0, 25) to (start + 0, 26)
+    = (c1 - c2)
+- MCDCBranch { true: Expression(11, Sub), false: Counter(3), condition_id: 3, true_next_id: 4, false_next_id: 0 } at (prev + 0, 25) to (start + 0, 26)
+    true  = (c1 - (c2 + c3))
+    false = c3
+- Code(Expression(11, Sub)) at (prev + 0, 31) to (start + 0, 32)
+    = (c1 - (c2 + c3))
 - MCDCBranch { true: Expression(16, Sub), false: Counter(4), condition_id: 4, true_next_id: 5, false_next_id: 0 } at (prev + 0, 31) to (start + 0, 32)
-    true  = (((c1 - c6) - c5) - c4)
+    true  = (c1 - ((c2 + c3) + c4))
     false = c4
 - Code(Expression(16, Sub)) at (prev + 0, 36) to (start + 0, 39)
-    = (((c1 - c6) - c5) - c4)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 5, true_next_id: 0, false_next_id: 0 } at (prev + 0, 36) to (start + 0, 39)
-    true  = c2
-    false = c3
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = (((((c2 + c3) + c4) + c5) + c6) + (c0 - c1))
+    = (c1 - ((c2 + c3) + c4))
+- MCDCBranch { true: Counter(5), false: Counter(6), condition_id: 5, true_next_id: 0, false_next_id: 0 } at (prev + 0, 36) to (start + 0, 39)
+    true  = c5
+    false = c6
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 1, 2)
+    = ((((((c0 + c2) + c3) + c4) + c5) + c6) - c1)
 Highest counter ID seen: c6
 
diff --git a/tests/coverage/nested_loops.cov-map b/tests/coverage/nested_loops.cov-map
index 21871ef3206..6ba5887d243 100644
--- a/tests/coverage/nested_loops.cov-map
+++ b/tests/coverage/nested_loops.cov-map
@@ -1,52 +1,46 @@
 Function name: nested_loops::main
-Raw bytes (115): 0x[01, 01, 17, 01, 57, 05, 09, 03, 0d, 4e, 53, 03, 0d, 15, 19, 4b, 09, 4e, 53, 03, 0d, 15, 19, 46, 05, 4b, 09, 4e, 53, 03, 0d, 15, 19, 42, 19, 46, 05, 4b, 09, 4e, 53, 03, 0d, 15, 19, 05, 09, 11, 0d, 0d, 01, 01, 01, 02, 1b, 03, 04, 13, 00, 20, 4e, 01, 0d, 01, 18, 4b, 02, 12, 00, 17, 46, 01, 10, 00, 16, 05, 01, 11, 00, 16, 42, 01, 0e, 03, 16, 3e, 04, 11, 01, 1b, 11, 02, 15, 00, 21, 15, 01, 18, 02, 12, 19, 03, 0d, 00, 0e, 57, 02, 09, 00, 17, 5b, 02, 01, 00, 02]
+Raw bytes (103): 0x[01, 01, 11, 27, 09, 01, 05, 03, 0d, 13, 0d, 17, 15, 03, 11, 1f, 0d, 23, 15, 27, 11, 01, 05, 2f, 0d, 3b, 15, 01, 11, 3b, 0d, 01, 11, 05, 09, 0d, 19, 0d, 01, 01, 01, 02, 1b, 03, 04, 13, 00, 20, 0a, 01, 0d, 01, 18, 0e, 02, 12, 00, 17, 1a, 01, 10, 00, 16, 05, 01, 11, 00, 16, 2a, 01, 0e, 03, 16, 36, 04, 11, 01, 1b, 19, 02, 15, 00, 21, 11, 01, 18, 02, 12, 15, 03, 0d, 00, 0e, 3f, 02, 09, 00, 17, 43, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 23
-- expression 0 operands: lhs = Counter(0), rhs = Expression(21, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+Number of expressions: 17
+- expression 0 operands: lhs = Expression(9, Add), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(19, Sub), rhs = Expression(20, Add)
-- expression 4 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 6 operands: lhs = Expression(18, Add), rhs = Counter(2)
-- expression 7 operands: lhs = Expression(19, Sub), rhs = Expression(20, Add)
-- expression 8 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 9 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 10 operands: lhs = Expression(17, Sub), rhs = Counter(1)
-- expression 11 operands: lhs = Expression(18, Add), rhs = Counter(2)
-- expression 12 operands: lhs = Expression(19, Sub), rhs = Expression(20, Add)
-- expression 13 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 14 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 15 operands: lhs = Expression(16, Sub), rhs = Counter(6)
-- expression 16 operands: lhs = Expression(17, Sub), rhs = Counter(1)
-- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(2)
-- expression 18 operands: lhs = Expression(19, Sub), rhs = Expression(20, Add)
-- expression 19 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 20 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 21 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 22 operands: lhs = Counter(4), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(5)
+- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(4)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(3)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(5)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(4)
+- expression 9 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(3)
+- expression 11 operands: lhs = Expression(14, Add), rhs = Counter(5)
+- expression 12 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(3)
+- expression 14 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 15 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 16 operands: lhs = Counter(3), rhs = Counter(6)
 Number of file 0 mappings: 13
 - Code(Counter(0)) at (prev + 1, 1) to (start + 2, 27)
 - Code(Expression(0, Add)) at (prev + 4, 19) to (start + 0, 32)
-    = (c0 + (c1 + c2))
-- Code(Expression(19, Sub)) at (prev + 1, 13) to (start + 1, 24)
-    = ((c0 + (c1 + c2)) - c3)
-- Code(Expression(18, Add)) at (prev + 2, 18) to (start + 0, 23)
-    = (((c0 + (c1 + c2)) - c3) + (c5 + c6))
-- Code(Expression(17, Sub)) at (prev + 1, 16) to (start + 0, 22)
-    = ((((c0 + (c1 + c2)) - c3) + (c5 + c6)) - c2)
+    = ((c0 + c1) + c2)
+- Code(Expression(2, Sub)) at (prev + 1, 13) to (start + 1, 24)
+    = (((c0 + c1) + c2) - c3)
+- Code(Expression(3, Sub)) at (prev + 2, 18) to (start + 0, 23)
+    = (((((c0 + c1) + c2) + c4) + c5) - c3)
+- Code(Expression(6, Sub)) at (prev + 1, 16) to (start + 0, 22)
+    = ((((c0 + c1) + c4) + c5) - c3)
 - Code(Counter(1)) at (prev + 1, 17) to (start + 0, 22)
-- Code(Expression(16, Sub)) at (prev + 1, 14) to (start + 3, 22)
-    = (((((c0 + (c1 + c2)) - c3) + (c5 + c6)) - c2) - c1)
-- Code(Expression(15, Sub)) at (prev + 4, 17) to (start + 1, 27)
-    = ((((((c0 + (c1 + c2)) - c3) + (c5 + c6)) - c2) - c1) - c6)
-- Code(Counter(4)) at (prev + 2, 21) to (start + 0, 33)
-- Code(Counter(5)) at (prev + 1, 24) to (start + 2, 18)
-- Code(Counter(6)) at (prev + 3, 13) to (start + 0, 14)
-- Code(Expression(21, Add)) at (prev + 2, 9) to (start + 0, 23)
+- Code(Expression(10, Sub)) at (prev + 1, 14) to (start + 3, 22)
+    = (((c0 + c4) + c5) - c3)
+- Code(Expression(13, Sub)) at (prev + 4, 17) to (start + 1, 27)
+    = ((c0 + c4) - c3)
+- Code(Counter(6)) at (prev + 2, 21) to (start + 0, 33)
+- Code(Counter(4)) at (prev + 1, 24) to (start + 2, 18)
+- Code(Counter(5)) at (prev + 3, 13) to (start + 0, 14)
+- Code(Expression(15, Add)) at (prev + 2, 9) to (start + 0, 23)
     = (c1 + c2)
-- Code(Expression(22, Add)) at (prev + 2, 1) to (start + 0, 2)
-    = (c4 + c3)
+- Code(Expression(16, Add)) at (prev + 2, 1) to (start + 0, 2)
+    = (c3 + c6)
 Highest counter ID seen: c6
 
diff --git a/tests/coverage/overflow.cov-map b/tests/coverage/overflow.cov-map
index f6bfb465bf9..01abcc15003 100644
--- a/tests/coverage/overflow.cov-map
+++ b/tests/coverage/overflow.cov-map
@@ -1,29 +1,30 @@
 Function name: overflow::main
-Raw bytes (65): 0x[01, 01, 08, 01, 1b, 05, 1f, 09, 0d, 03, 11, 16, 05, 03, 11, 05, 1f, 09, 0d, 09, 01, 10, 01, 01, 1b, 03, 02, 0b, 00, 18, 16, 01, 0c, 00, 1a, 05, 00, 1b, 03, 0a, 12, 03, 13, 00, 20, 09, 00, 21, 03, 0a, 0d, 03, 09, 00, 0a, 1b, 01, 09, 00, 17, 11, 02, 05, 01, 02]
+Raw bytes (67): 0x[01, 01, 09, 07, 0d, 0b, 09, 01, 05, 03, 11, 17, 11, 1b, 0d, 01, 09, 23, 0d, 05, 09, 09, 01, 10, 01, 01, 1b, 03, 02, 0b, 00, 18, 0e, 01, 0c, 00, 1a, 05, 00, 1b, 03, 0a, 12, 03, 13, 00, 20, 09, 00, 21, 03, 0a, 0d, 03, 09, 00, 0a, 1f, 01, 09, 00, 17, 11, 02, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 8
-- expression 0 operands: lhs = Counter(0), rhs = Expression(6, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+Number of expressions: 9
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 3 operands: lhs = Expression(0, Add), rhs = Counter(4)
-- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(1)
-- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(4)
-- expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(4)
+- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(3)
+- expression 6 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(3)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 16, 1) to (start + 1, 27)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
-    = (c0 + (c1 + (c2 + c3)))
-- Code(Expression(5, Sub)) at (prev + 1, 12) to (start + 0, 26)
-    = ((c0 + (c1 + (c2 + c3))) - c4)
+    = (((c0 + c1) + c2) + c3)
+- Code(Expression(3, Sub)) at (prev + 1, 12) to (start + 0, 26)
+    = ((((c0 + c1) + c2) + c3) - c4)
 - Code(Counter(1)) at (prev + 0, 27) to (start + 3, 10)
 - Code(Expression(4, Sub)) at (prev + 3, 19) to (start + 0, 32)
-    = (((c0 + (c1 + (c2 + c3))) - c4) - c1)
+    = (((c0 + c2) + c3) - c4)
 - Code(Counter(2)) at (prev + 0, 33) to (start + 3, 10)
 - Code(Counter(3)) at (prev + 3, 9) to (start + 0, 10)
-- Code(Expression(6, Add)) at (prev + 1, 9) to (start + 0, 23)
-    = (c1 + (c2 + c3))
+- Code(Expression(7, Add)) at (prev + 1, 9) to (start + 0, 23)
+    = ((c1 + c2) + c3)
 - Code(Counter(4)) at (prev + 2, 5) to (start + 1, 2)
 Highest counter ID seen: c4
 
diff --git a/tests/coverage/panic_unwind.cov-map b/tests/coverage/panic_unwind.cov-map
index 58a796ff3a2..005c4babbea 100644
--- a/tests/coverage/panic_unwind.cov-map
+++ b/tests/coverage/panic_unwind.cov-map
@@ -1,29 +1,30 @@
 Function name: panic_unwind::main
-Raw bytes (65): 0x[01, 01, 08, 01, 1b, 05, 1f, 09, 0d, 03, 11, 16, 05, 03, 11, 05, 1f, 09, 0d, 09, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 16, 01, 0c, 00, 1a, 05, 00, 1b, 02, 0a, 12, 02, 13, 00, 20, 09, 00, 21, 02, 0a, 0d, 02, 09, 00, 0a, 1b, 01, 09, 00, 17, 11, 02, 05, 01, 02]
+Raw bytes (67): 0x[01, 01, 09, 07, 0d, 0b, 09, 01, 05, 03, 11, 17, 11, 1b, 0d, 01, 09, 23, 0d, 05, 09, 09, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 0e, 01, 0c, 00, 1a, 05, 00, 1b, 02, 0a, 12, 02, 13, 00, 20, 09, 00, 21, 02, 0a, 0d, 02, 09, 00, 0a, 1f, 01, 09, 00, 17, 11, 02, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 8
-- expression 0 operands: lhs = Counter(0), rhs = Expression(6, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+Number of expressions: 9
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 3 operands: lhs = Expression(0, Add), rhs = Counter(4)
-- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(1)
-- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(4)
-- expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(4)
+- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(3)
+- expression 6 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(3)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 13, 1) to (start + 1, 27)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
-    = (c0 + (c1 + (c2 + c3)))
-- Code(Expression(5, Sub)) at (prev + 1, 12) to (start + 0, 26)
-    = ((c0 + (c1 + (c2 + c3))) - c4)
+    = (((c0 + c1) + c2) + c3)
+- Code(Expression(3, Sub)) at (prev + 1, 12) to (start + 0, 26)
+    = ((((c0 + c1) + c2) + c3) - c4)
 - Code(Counter(1)) at (prev + 0, 27) to (start + 2, 10)
 - Code(Expression(4, Sub)) at (prev + 2, 19) to (start + 0, 32)
-    = (((c0 + (c1 + (c2 + c3))) - c4) - c1)
+    = (((c0 + c2) + c3) - c4)
 - Code(Counter(2)) at (prev + 0, 33) to (start + 2, 10)
 - Code(Counter(3)) at (prev + 2, 9) to (start + 0, 10)
-- Code(Expression(6, Add)) at (prev + 1, 9) to (start + 0, 23)
-    = (c1 + (c2 + c3))
+- Code(Expression(7, Add)) at (prev + 1, 9) to (start + 0, 23)
+    = ((c1 + c2) + c3)
 - Code(Counter(4)) at (prev + 2, 5) to (start + 1, 2)
 Highest counter ID seen: c4
 
diff --git a/tests/coverage/simple_match.cov-map b/tests/coverage/simple_match.cov-map
index d8bf9eae4bc..8f973742959 100644
--- a/tests/coverage/simple_match.cov-map
+++ b/tests/coverage/simple_match.cov-map
@@ -1,29 +1,29 @@
 Function name: simple_match::main
-Raw bytes (72): 0x[01, 01, 09, 01, 05, 01, 23, 09, 0d, 1f, 11, 01, 23, 09, 0d, 1f, 11, 01, 23, 09, 0d, 0a, 01, 04, 01, 07, 0f, 05, 07, 10, 02, 06, 02, 02, 05, 00, 06, 1f, 05, 09, 00, 0d, 1a, 05, 0d, 00, 16, 09, 02, 0d, 00, 0e, 1a, 02, 11, 02, 12, 09, 04, 0d, 07, 0e, 0d, 0a, 0d, 00, 0f, 11, 03, 01, 00, 02]
+Raw bytes (72): 0x[01, 01, 09, 01, 05, 23, 0d, 01, 09, 1f, 11, 23, 0d, 01, 09, 1f, 11, 23, 0d, 01, 09, 0a, 01, 04, 01, 07, 0f, 05, 07, 10, 02, 06, 02, 02, 05, 00, 06, 1f, 05, 09, 00, 0d, 1a, 05, 0d, 00, 16, 09, 02, 0d, 00, 0e, 1a, 02, 11, 02, 12, 09, 04, 0d, 07, 0e, 0d, 0a, 0d, 00, 0f, 11, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 9
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Expression(8, Add)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Expression(8, Add), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 - expression 3 operands: lhs = Expression(7, Add), rhs = Counter(4)
-- expression 4 operands: lhs = Counter(0), rhs = Expression(8, Add)
-- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(8, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
 - expression 6 operands: lhs = Expression(7, Add), rhs = Counter(4)
-- expression 7 operands: lhs = Counter(0), rhs = Expression(8, Add)
-- expression 8 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(3)
+- expression 8 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 4, 1) to (start + 7, 15)
 - Code(Counter(1)) at (prev + 7, 16) to (start + 2, 6)
 - Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6)
     = (c0 - c1)
 - Code(Expression(7, Add)) at (prev + 5, 9) to (start + 0, 13)
-    = (c0 + (c2 + c3))
+    = ((c0 + c2) + c3)
 - Code(Expression(6, Sub)) at (prev + 5, 13) to (start + 0, 22)
-    = ((c0 + (c2 + c3)) - c4)
+    = (((c0 + c2) + c3) - c4)
 - Code(Counter(2)) at (prev + 2, 13) to (start + 0, 14)
 - Code(Expression(6, Sub)) at (prev + 2, 17) to (start + 2, 18)
-    = ((c0 + (c2 + c3)) - c4)
+    = (((c0 + c2) + c3) - c4)
 - Code(Counter(2)) at (prev + 4, 13) to (start + 7, 14)
 - Code(Counter(3)) at (prev + 10, 13) to (start + 0, 15)
 - Code(Counter(4)) at (prev + 3, 1) to (start + 0, 2)
diff --git a/tests/coverage/try_error_result.cov-map b/tests/coverage/try_error_result.cov-map
index 246a1ba738b..7fbd2cc642e 100644
--- a/tests/coverage/try_error_result.cov-map
+++ b/tests/coverage/try_error_result.cov-map
@@ -55,162 +55,162 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c1
 
 Function name: try_error_result::test1
-Raw bytes (75): 0x[01, 01, 08, 01, 07, 00, 09, 03, 0d, 12, 1d, 03, 0d, 1b, 0d, 1f, 00, 11, 00, 0b, 01, 0d, 01, 02, 17, 03, 07, 09, 00, 0e, 12, 02, 09, 04, 1a, 1d, 06, 0d, 00, 29, 11, 00, 29, 00, 2a, 00, 01, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0e, 04, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0d, 03, 05, 00, 0b, 17, 01, 01, 00, 02]
+Raw bytes (75): 0x[01, 01, 08, 07, 09, 01, 00, 03, 0d, 03, 13, 0d, 11, 1b, 00, 1f, 00, 0d, 15, 0b, 01, 0d, 01, 02, 17, 03, 07, 09, 00, 0e, 0a, 02, 09, 04, 1a, 11, 06, 0d, 00, 29, 15, 00, 29, 00, 2a, 00, 01, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0e, 04, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0d, 03, 05, 00, 0b, 17, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 8
-- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Zero, rhs = Counter(2)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Zero
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(4, Sub), rhs = Counter(7)
-- expression 4 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(0, Add), rhs = Expression(4, Add)
+- expression 4 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 5 operands: lhs = Expression(6, Add), rhs = Zero
 - expression 6 operands: lhs = Expression(7, Add), rhs = Zero
-- expression 7 operands: lhs = Counter(4), rhs = Zero
+- expression 7 operands: lhs = Counter(3), rhs = Counter(5)
 Number of file 0 mappings: 11
 - Code(Counter(0)) at (prev + 13, 1) to (start + 2, 23)
 - Code(Expression(0, Add)) at (prev + 7, 9) to (start + 0, 14)
-    = (c0 + (Zero + c2))
-- Code(Expression(4, Sub)) at (prev + 2, 9) to (start + 4, 26)
-    = ((c0 + (Zero + c2)) - c3)
-- Code(Counter(7)) at (prev + 6, 13) to (start + 0, 41)
-- Code(Counter(4)) at (prev + 0, 41) to (start + 0, 42)
+    = ((c0 + Zero) + c2)
+- Code(Expression(2, Sub)) at (prev + 2, 9) to (start + 4, 26)
+    = (((c0 + Zero) + c2) - c3)
+- Code(Counter(4)) at (prev + 6, 13) to (start + 0, 41)
+- Code(Counter(5)) at (prev + 0, 41) to (start + 0, 42)
 - Code(Zero) at (prev + 1, 13) to (start + 0, 42)
 - Code(Zero) at (prev + 0, 42) to (start + 0, 43)
 - Code(Expression(3, Sub)) at (prev + 4, 13) to (start + 0, 42)
-    = (((c0 + (Zero + c2)) - c3) - c7)
+    = (((c0 + Zero) + c2) - (c3 + c4))
 - Code(Zero) at (prev + 0, 42) to (start + 0, 43)
 - Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11)
 - Code(Expression(5, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = (((c4 + Zero) + Zero) + c3)
-Highest counter ID seen: c7
+    = (((c3 + c5) + Zero) + Zero)
+Highest counter ID seen: c5
 
 Function name: try_error_result::test2
-Raw bytes (358): 0x[01, 01, 3b, 01, 07, 05, 09, 03, 0d, 41, 11, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 4a, 15, 41, 11, 46, 19, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 5e, 25, 49, 21, 49, 21, 5e, 25, 49, 21, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, 92, 01, 41, 03, 0d, 8e, 01, 29, 92, 01, 41, 03, 0d, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, a6, 01, 35, 45, 31, 45, 31, a6, 01, 35, 45, 31, ba, 01, 3d, 4d, 39, 4d, 39, ba, 01, 3d, 4d, 39, c3, 01, 0d, c7, 01, db, 01, cb, 01, cf, 01, 11, 15, d3, 01, d7, 01, 19, 1d, 21, 25, df, 01, e3, 01, 29, 2d, e7, 01, eb, 01, 31, 35, 39, 3d, 28, 01, 3d, 01, 03, 17, 03, 08, 09, 00, 0e, 92, 01, 02, 09, 04, 1a, 41, 06, 0d, 00, 2f, 11, 00, 2f, 00, 30, 4a, 00, 31, 03, 35, 15, 04, 11, 00, 12, 46, 02, 11, 04, 12, 3e, 05, 11, 00, 14, 46, 00, 17, 00, 41, 19, 00, 41, 00, 42, 42, 00, 43, 00, 5f, 1d, 00, 5f, 00, 60, 3e, 01, 0d, 00, 20, 5a, 01, 11, 00, 14, 49, 00, 17, 00, 41, 21, 00, 41, 00, 42, 5e, 00, 43, 00, 60, 25, 00, 60, 00, 61, 5a, 01, 0d, 00, 20, 86, 01, 04, 11, 00, 14, 8e, 01, 00, 17, 00, 42, 29, 00, 42, 00, 43, 8a, 01, 00, 44, 00, 61, 2d, 00, 61, 00, 62, 86, 01, 01, 0d, 00, 20, a2, 01, 01, 11, 00, 14, 45, 00, 17, 01, 36, 31, 01, 36, 00, 37, a6, 01, 01, 12, 00, 2f, 35, 00, 2f, 00, 30, a2, 01, 01, 0d, 00, 20, b6, 01, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 39, 02, 11, 00, 12, ba, 01, 01, 12, 00, 2f, 3d, 01, 11, 00, 12, b6, 01, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, bf, 01, 01, 01, 00, 02]
+Raw bytes (355): 0x[01, 01, 3b, 07, 09, 01, 05, 03, 0d, 11, 15, 11, 4b, 15, 19, 11, 43, 47, 21, 4b, 1d, 15, 19, 11, 4b, 15, 19, 11, 47, 4b, 1d, 15, 19, 11, 43, 47, 21, 4b, 1d, 15, 19, 45, 5f, 25, 29, 45, 25, 45, 5f, 25, 29, 03, 8b, 01, 8f, 01, 31, 93, 01, 2d, 0d, 11, 03, 93, 01, 0d, 11, 03, 8f, 01, 93, 01, 2d, 0d, 11, 03, 8b, 01, 8f, 01, 31, 93, 01, 2d, 0d, 11, 49, a7, 01, 35, 39, 49, 35, 49, a7, 01, 35, 39, 4d, bb, 01, 3d, 41, 4d, 3d, 4d, bb, 01, 3d, 41, c3, 01, 41, c7, 01, 3d, cb, 01, 39, cf, 01, 35, d3, 01, 31, d7, 01, 2d, db, 01, 29, df, 01, 25, e3, 01, 21, e7, 01, 1d, eb, 01, 19, 0d, 15, 28, 01, 3d, 01, 03, 17, 03, 08, 09, 00, 0e, 0a, 02, 09, 04, 1a, 11, 06, 0d, 00, 2f, 15, 00, 2f, 00, 30, 0e, 00, 31, 03, 35, 19, 04, 11, 00, 12, 2a, 02, 11, 04, 12, 3e, 05, 11, 00, 14, 2a, 00, 17, 00, 41, 1d, 00, 41, 00, 42, 32, 00, 43, 00, 5f, 21, 00, 5f, 00, 60, 3e, 01, 0d, 00, 20, 5a, 01, 11, 00, 14, 45, 00, 17, 00, 41, 25, 00, 41, 00, 42, 56, 00, 43, 00, 60, 29, 00, 60, 00, 61, 5a, 01, 0d, 00, 20, 86, 01, 04, 11, 00, 14, 72, 00, 17, 00, 42, 2d, 00, 42, 00, 43, 7a, 00, 44, 00, 61, 31, 00, 61, 00, 62, 86, 01, 01, 0d, 00, 20, a2, 01, 01, 11, 00, 14, 49, 00, 17, 01, 36, 35, 01, 36, 00, 37, 9e, 01, 01, 12, 00, 2f, 39, 00, 2f, 00, 30, a2, 01, 01, 0d, 00, 20, b6, 01, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 3d, 02, 11, 00, 12, b2, 01, 01, 12, 00, 2f, 41, 01, 11, 00, 12, b6, 01, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, bf, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 59
-- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(16), rhs = Counter(4)
-- expression 4 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 5 operands: lhs = Counter(16), rhs = Counter(4)
-- expression 6 operands: lhs = Expression(16, Sub), rhs = Counter(7)
-- expression 7 operands: lhs = Expression(17, Sub), rhs = Counter(6)
-- expression 8 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 9 operands: lhs = Counter(16), rhs = Counter(4)
-- expression 10 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 11 operands: lhs = Counter(16), rhs = Counter(4)
-- expression 12 operands: lhs = Expression(17, Sub), rhs = Counter(6)
-- expression 13 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 14 operands: lhs = Counter(16), rhs = Counter(4)
-- expression 15 operands: lhs = Expression(16, Sub), rhs = Counter(7)
-- expression 16 operands: lhs = Expression(17, Sub), rhs = Counter(6)
-- expression 17 operands: lhs = Expression(18, Sub), rhs = Counter(5)
-- expression 18 operands: lhs = Counter(16), rhs = Counter(4)
-- expression 19 operands: lhs = Expression(23, Sub), rhs = Counter(9)
-- expression 20 operands: lhs = Counter(18), rhs = Counter(8)
-- expression 21 operands: lhs = Counter(18), rhs = Counter(8)
-- expression 22 operands: lhs = Expression(23, Sub), rhs = Counter(9)
-- expression 23 operands: lhs = Counter(18), rhs = Counter(8)
-- expression 24 operands: lhs = Expression(34, Sub), rhs = Counter(11)
-- expression 25 operands: lhs = Expression(35, Sub), rhs = Counter(10)
-- expression 26 operands: lhs = Expression(36, Sub), rhs = Counter(16)
-- expression 27 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 28 operands: lhs = Expression(36, Sub), rhs = Counter(16)
-- expression 29 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 30 operands: lhs = Expression(35, Sub), rhs = Counter(10)
-- expression 31 operands: lhs = Expression(36, Sub), rhs = Counter(16)
-- expression 32 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 33 operands: lhs = Expression(34, Sub), rhs = Counter(11)
-- expression 34 operands: lhs = Expression(35, Sub), rhs = Counter(10)
-- expression 35 operands: lhs = Expression(36, Sub), rhs = Counter(16)
-- expression 36 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 37 operands: lhs = Expression(41, Sub), rhs = Counter(13)
-- expression 38 operands: lhs = Counter(17), rhs = Counter(12)
-- expression 39 operands: lhs = Counter(17), rhs = Counter(12)
-- expression 40 operands: lhs = Expression(41, Sub), rhs = Counter(13)
-- expression 41 operands: lhs = Counter(17), rhs = Counter(12)
-- expression 42 operands: lhs = Expression(46, Sub), rhs = Counter(15)
-- expression 43 operands: lhs = Counter(19), rhs = Counter(14)
-- expression 44 operands: lhs = Counter(19), rhs = Counter(14)
-- expression 45 operands: lhs = Expression(46, Sub), rhs = Counter(15)
-- expression 46 operands: lhs = Counter(19), rhs = Counter(14)
-- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(3)
-- expression 48 operands: lhs = Expression(49, Add), rhs = Expression(54, Add)
-- expression 49 operands: lhs = Expression(50, Add), rhs = Expression(51, Add)
-- expression 50 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 51 operands: lhs = Expression(52, Add), rhs = Expression(53, Add)
-- expression 52 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 53 operands: lhs = Counter(8), rhs = Counter(9)
-- expression 54 operands: lhs = Expression(55, Add), rhs = Expression(56, Add)
-- expression 55 operands: lhs = Counter(10), rhs = Counter(11)
-- expression 56 operands: lhs = Expression(57, Add), rhs = Expression(58, Add)
-- expression 57 operands: lhs = Counter(12), rhs = Counter(13)
-- expression 58 operands: lhs = Counter(14), rhs = Counter(15)
+- expression 3 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 4 operands: lhs = Counter(4), rhs = Expression(18, Add)
+- expression 5 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 6 operands: lhs = Counter(4), rhs = Expression(16, Add)
+- expression 7 operands: lhs = Expression(17, Add), rhs = Counter(8)
+- expression 8 operands: lhs = Expression(18, Add), rhs = Counter(7)
+- expression 9 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 10 operands: lhs = Counter(4), rhs = Expression(18, Add)
+- expression 11 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 12 operands: lhs = Counter(4), rhs = Expression(17, Add)
+- expression 13 operands: lhs = Expression(18, Add), rhs = Counter(7)
+- expression 14 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 15 operands: lhs = Counter(4), rhs = Expression(16, Add)
+- expression 16 operands: lhs = Expression(17, Add), rhs = Counter(8)
+- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(7)
+- expression 18 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 19 operands: lhs = Counter(17), rhs = Expression(23, Add)
+- expression 20 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 21 operands: lhs = Counter(17), rhs = Counter(9)
+- expression 22 operands: lhs = Counter(17), rhs = Expression(23, Add)
+- expression 23 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 24 operands: lhs = Expression(0, Add), rhs = Expression(34, Add)
+- expression 25 operands: lhs = Expression(35, Add), rhs = Counter(12)
+- expression 26 operands: lhs = Expression(36, Add), rhs = Counter(11)
+- expression 27 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 28 operands: lhs = Expression(0, Add), rhs = Expression(36, Add)
+- expression 29 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 30 operands: lhs = Expression(0, Add), rhs = Expression(35, Add)
+- expression 31 operands: lhs = Expression(36, Add), rhs = Counter(11)
+- expression 32 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 33 operands: lhs = Expression(0, Add), rhs = Expression(34, Add)
+- expression 34 operands: lhs = Expression(35, Add), rhs = Counter(12)
+- expression 35 operands: lhs = Expression(36, Add), rhs = Counter(11)
+- expression 36 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 37 operands: lhs = Counter(18), rhs = Expression(41, Add)
+- expression 38 operands: lhs = Counter(13), rhs = Counter(14)
+- expression 39 operands: lhs = Counter(18), rhs = Counter(13)
+- expression 40 operands: lhs = Counter(18), rhs = Expression(41, Add)
+- expression 41 operands: lhs = Counter(13), rhs = Counter(14)
+- expression 42 operands: lhs = Counter(19), rhs = Expression(46, Add)
+- expression 43 operands: lhs = Counter(15), rhs = Counter(16)
+- expression 44 operands: lhs = Counter(19), rhs = Counter(15)
+- expression 45 operands: lhs = Counter(19), rhs = Expression(46, Add)
+- expression 46 operands: lhs = Counter(15), rhs = Counter(16)
+- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(16)
+- expression 48 operands: lhs = Expression(49, Add), rhs = Counter(15)
+- expression 49 operands: lhs = Expression(50, Add), rhs = Counter(14)
+- expression 50 operands: lhs = Expression(51, Add), rhs = Counter(13)
+- expression 51 operands: lhs = Expression(52, Add), rhs = Counter(12)
+- expression 52 operands: lhs = Expression(53, Add), rhs = Counter(11)
+- expression 53 operands: lhs = Expression(54, Add), rhs = Counter(10)
+- expression 54 operands: lhs = Expression(55, Add), rhs = Counter(9)
+- expression 55 operands: lhs = Expression(56, Add), rhs = Counter(8)
+- expression 56 operands: lhs = Expression(57, Add), rhs = Counter(7)
+- expression 57 operands: lhs = Expression(58, Add), rhs = Counter(6)
+- expression 58 operands: lhs = Counter(3), rhs = Counter(5)
 Number of file 0 mappings: 40
 - Code(Counter(0)) at (prev + 61, 1) to (start + 3, 23)
 - Code(Expression(0, Add)) at (prev + 8, 9) to (start + 0, 14)
-    = (c0 + (c1 + c2))
-- Code(Expression(36, Sub)) at (prev + 2, 9) to (start + 4, 26)
-    = ((c0 + (c1 + c2)) - c3)
-- Code(Counter(16)) at (prev + 6, 13) to (start + 0, 47)
-- Code(Counter(4)) at (prev + 0, 47) to (start + 0, 48)
-- Code(Expression(18, Sub)) at (prev + 0, 49) to (start + 3, 53)
-    = (c16 - c4)
-- Code(Counter(5)) at (prev + 4, 17) to (start + 0, 18)
-- Code(Expression(17, Sub)) at (prev + 2, 17) to (start + 4, 18)
-    = ((c16 - c4) - c5)
+    = ((c0 + c1) + c2)
+- Code(Expression(2, Sub)) at (prev + 2, 9) to (start + 4, 26)
+    = (((c0 + c1) + c2) - c3)
+- Code(Counter(4)) at (prev + 6, 13) to (start + 0, 47)
+- Code(Counter(5)) at (prev + 0, 47) to (start + 0, 48)
+- Code(Expression(3, Sub)) at (prev + 0, 49) to (start + 3, 53)
+    = (c4 - c5)
+- Code(Counter(6)) at (prev + 4, 17) to (start + 0, 18)
+- Code(Expression(10, Sub)) at (prev + 2, 17) to (start + 4, 18)
+    = (c4 - (c5 + c6))
 - Code(Expression(15, Sub)) at (prev + 5, 17) to (start + 0, 20)
-    = ((((c16 - c4) - c5) - c6) - c7)
-- Code(Expression(17, Sub)) at (prev + 0, 23) to (start + 0, 65)
-    = ((c16 - c4) - c5)
-- Code(Counter(6)) at (prev + 0, 65) to (start + 0, 66)
-- Code(Expression(16, Sub)) at (prev + 0, 67) to (start + 0, 95)
-    = (((c16 - c4) - c5) - c6)
-- Code(Counter(7)) at (prev + 0, 95) to (start + 0, 96)
+    = (c4 - (((c5 + c6) + c7) + c8))
+- Code(Expression(10, Sub)) at (prev + 0, 23) to (start + 0, 65)
+    = (c4 - (c5 + c6))
+- Code(Counter(7)) at (prev + 0, 65) to (start + 0, 66)
+- Code(Expression(12, Sub)) at (prev + 0, 67) to (start + 0, 95)
+    = (c4 - ((c5 + c6) + c7))
+- Code(Counter(8)) at (prev + 0, 95) to (start + 0, 96)
 - Code(Expression(15, Sub)) at (prev + 1, 13) to (start + 0, 32)
-    = ((((c16 - c4) - c5) - c6) - c7)
+    = (c4 - (((c5 + c6) + c7) + c8))
 - Code(Expression(22, Sub)) at (prev + 1, 17) to (start + 0, 20)
-    = ((c18 - c8) - c9)
-- Code(Counter(18)) at (prev + 0, 23) to (start + 0, 65)
-- Code(Counter(8)) at (prev + 0, 65) to (start + 0, 66)
-- Code(Expression(23, Sub)) at (prev + 0, 67) to (start + 0, 96)
-    = (c18 - c8)
-- Code(Counter(9)) at (prev + 0, 96) to (start + 0, 97)
+    = (c17 - (c9 + c10))
+- Code(Counter(17)) at (prev + 0, 23) to (start + 0, 65)
+- Code(Counter(9)) at (prev + 0, 65) to (start + 0, 66)
+- Code(Expression(21, Sub)) at (prev + 0, 67) to (start + 0, 96)
+    = (c17 - c9)
+- Code(Counter(10)) at (prev + 0, 96) to (start + 0, 97)
 - Code(Expression(22, Sub)) at (prev + 1, 13) to (start + 0, 32)
-    = ((c18 - c8) - c9)
+    = (c17 - (c9 + c10))
 - Code(Expression(33, Sub)) at (prev + 4, 17) to (start + 0, 20)
-    = (((((c0 + (c1 + c2)) - c3) - c16) - c10) - c11)
-- Code(Expression(35, Sub)) at (prev + 0, 23) to (start + 0, 66)
-    = (((c0 + (c1 + c2)) - c3) - c16)
-- Code(Counter(10)) at (prev + 0, 66) to (start + 0, 67)
-- Code(Expression(34, Sub)) at (prev + 0, 68) to (start + 0, 97)
-    = ((((c0 + (c1 + c2)) - c3) - c16) - c10)
-- Code(Counter(11)) at (prev + 0, 97) to (start + 0, 98)
+    = (((c0 + c1) + c2) - (((c3 + c4) + c11) + c12))
+- Code(Expression(28, Sub)) at (prev + 0, 23) to (start + 0, 66)
+    = (((c0 + c1) + c2) - (c3 + c4))
+- Code(Counter(11)) at (prev + 0, 66) to (start + 0, 67)
+- Code(Expression(30, Sub)) at (prev + 0, 68) to (start + 0, 97)
+    = (((c0 + c1) + c2) - ((c3 + c4) + c11))
+- Code(Counter(12)) at (prev + 0, 97) to (start + 0, 98)
 - Code(Expression(33, Sub)) at (prev + 1, 13) to (start + 0, 32)
-    = (((((c0 + (c1 + c2)) - c3) - c16) - c10) - c11)
+    = (((c0 + c1) + c2) - (((c3 + c4) + c11) + c12))
 - Code(Expression(40, Sub)) at (prev + 1, 17) to (start + 0, 20)
-    = ((c17 - c12) - c13)
-- Code(Counter(17)) at (prev + 0, 23) to (start + 1, 54)
-- Code(Counter(12)) at (prev + 1, 54) to (start + 0, 55)
-- Code(Expression(41, Sub)) at (prev + 1, 18) to (start + 0, 47)
-    = (c17 - c12)
-- Code(Counter(13)) at (prev + 0, 47) to (start + 0, 48)
+    = (c18 - (c13 + c14))
+- Code(Counter(18)) at (prev + 0, 23) to (start + 1, 54)
+- Code(Counter(13)) at (prev + 1, 54) to (start + 0, 55)
+- Code(Expression(39, Sub)) at (prev + 1, 18) to (start + 0, 47)
+    = (c18 - c13)
+- Code(Counter(14)) at (prev + 0, 47) to (start + 0, 48)
 - Code(Expression(40, Sub)) at (prev + 1, 13) to (start + 0, 32)
-    = ((c17 - c12) - c13)
+    = (c18 - (c13 + c14))
 - Code(Expression(45, Sub)) at (prev + 1, 17) to (start + 0, 20)
-    = ((c19 - c14) - c15)
+    = (c19 - (c15 + c16))
 - Code(Counter(19)) at (prev + 0, 23) to (start + 1, 54)
-- Code(Counter(14)) at (prev + 2, 17) to (start + 0, 18)
-- Code(Expression(46, Sub)) at (prev + 1, 18) to (start + 0, 47)
-    = (c19 - c14)
-- Code(Counter(15)) at (prev + 1, 17) to (start + 0, 18)
+- Code(Counter(15)) at (prev + 2, 17) to (start + 0, 18)
+- Code(Expression(44, Sub)) at (prev + 1, 18) to (start + 0, 47)
+    = (c19 - c15)
+- Code(Counter(16)) at (prev + 1, 17) to (start + 0, 18)
 - Code(Expression(45, Sub)) at (prev + 2, 13) to (start + 0, 32)
-    = ((c19 - c14) - c15)
+    = (c19 - (c15 + c16))
 - Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11)
 - Code(Expression(47, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = ((((c4 + c5) + ((c6 + c7) + (c8 + c9))) + ((c10 + c11) + ((c12 + c13) + (c14 + c15)))) + c3)
+    = ((((((((((((c3 + c5) + c6) + c7) + c8) + c9) + c10) + c11) + c12) + c13) + c14) + c15) + c16)
 Highest counter ID seen: c19
 
diff --git a/tests/coverage/unicode.cov-map b/tests/coverage/unicode.cov-map
index 769930110d6..630ab4ce47e 100644
--- a/tests/coverage/unicode.cov-map
+++ b/tests/coverage/unicode.cov-map
@@ -1,14 +1,14 @@
 Function name: unicode::main
-Raw bytes (61): 0x[01, 01, 06, 01, 05, 16, 0d, 01, 09, 11, 13, 16, 0d, 01, 09, 09, 01, 0e, 01, 00, 0b, 05, 01, 09, 00, 0c, 03, 00, 10, 00, 1b, 05, 00, 1c, 00, 28, 01, 02, 08, 00, 25, 09, 00, 29, 00, 46, 11, 00, 47, 02, 06, 13, 02, 05, 00, 06, 0f, 02, 05, 01, 02]
+Raw bytes (61): 0x[01, 01, 06, 01, 05, 0b, 09, 01, 11, 13, 09, 17, 11, 01, 0d, 09, 01, 0e, 01, 00, 0b, 05, 01, 09, 00, 0c, 03, 00, 10, 00, 1b, 05, 00, 1c, 00, 28, 01, 02, 08, 00, 25, 09, 00, 29, 00, 46, 0d, 00, 47, 02, 06, 06, 02, 05, 00, 06, 0e, 02, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 6
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(5, Sub), rhs = Counter(3)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(4), rhs = Expression(4, Add)
-- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(2)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(4)
+- expression 5 operands: lhs = Counter(0), rhs = Counter(3)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 14, 1) to (start + 0, 11)
 - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12)
@@ -17,12 +17,12 @@ Number of file 0 mappings: 9
 - Code(Counter(1)) at (prev + 0, 28) to (start + 0, 40)
 - Code(Counter(0)) at (prev + 2, 8) to (start + 0, 37)
 - Code(Counter(2)) at (prev + 0, 41) to (start + 0, 70)
-- Code(Counter(4)) at (prev + 0, 71) to (start + 2, 6)
-- Code(Expression(4, Add)) at (prev + 2, 5) to (start + 0, 6)
-    = ((c0 - c2) + c3)
-- Code(Expression(3, Add)) at (prev + 2, 5) to (start + 1, 2)
-    = (c4 + ((c0 - c2) + c3))
-Highest counter ID seen: c4
+- Code(Counter(3)) at (prev + 0, 71) to (start + 2, 6)
+- Code(Expression(1, Sub)) at (prev + 2, 5) to (start + 0, 6)
+    = ((c0 + c4) - c2)
+- Code(Expression(3, Sub)) at (prev + 2, 5) to (start + 1, 2)
+    = (((c0 + c3) + c4) - c2)
+Highest counter ID seen: c3
 
 Function name: unicode::ä»– (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 1e, 19, 00, 25]
diff --git a/tests/coverage/unused.cov-map b/tests/coverage/unused.cov-map
index e865ac3ee62..4eae63f380c 100644
--- a/tests/coverage/unused.cov-map
+++ b/tests/coverage/unused.cov-map
@@ -1,18 +1,18 @@
 Function name: unused::foo::<f32>
-Raw bytes (42): 0x[01, 01, 04, 01, 0f, 05, 09, 03, 0d, 05, 09, 06, 01, 03, 01, 01, 12, 03, 02, 0b, 00, 11, 0a, 01, 09, 00, 0f, 09, 00, 13, 00, 19, 0f, 01, 09, 00, 0f, 0d, 02, 01, 00, 02]
+Raw bytes (42): 0x[01, 01, 04, 07, 09, 01, 05, 03, 0d, 05, 09, 06, 01, 03, 01, 01, 12, 03, 02, 0b, 00, 11, 0a, 01, 09, 00, 0f, 09, 00, 13, 00, 19, 0f, 01, 09, 00, 0f, 0d, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
-- expression 0 operands: lhs = Counter(0), rhs = Expression(3, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 6
 - Code(Counter(0)) at (prev + 3, 1) to (start + 1, 18)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 17)
-    = (c0 + (c1 + c2))
+    = ((c0 + c1) + c2)
 - Code(Expression(2, Sub)) at (prev + 1, 9) to (start + 0, 15)
-    = ((c0 + (c1 + c2)) - c3)
+    = (((c0 + c1) + c2) - c3)
 - Code(Counter(2)) at (prev + 0, 19) to (start + 0, 25)
 - Code(Expression(3, Add)) at (prev + 1, 9) to (start + 0, 15)
     = (c1 + c2)
@@ -20,20 +20,20 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c3
 
 Function name: unused::foo::<u32>
-Raw bytes (42): 0x[01, 01, 04, 01, 0f, 05, 09, 03, 0d, 05, 09, 06, 01, 03, 01, 01, 12, 03, 02, 0b, 00, 11, 0a, 01, 09, 00, 0f, 09, 00, 13, 00, 19, 0f, 01, 09, 00, 0f, 0d, 02, 01, 00, 02]
+Raw bytes (42): 0x[01, 01, 04, 07, 09, 01, 05, 03, 0d, 05, 09, 06, 01, 03, 01, 01, 12, 03, 02, 0b, 00, 11, 0a, 01, 09, 00, 0f, 09, 00, 13, 00, 19, 0f, 01, 09, 00, 0f, 0d, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
-- expression 0 operands: lhs = Counter(0), rhs = Expression(3, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 6
 - Code(Counter(0)) at (prev + 3, 1) to (start + 1, 18)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 17)
-    = (c0 + (c1 + c2))
+    = ((c0 + c1) + c2)
 - Code(Expression(2, Sub)) at (prev + 1, 9) to (start + 0, 15)
-    = ((c0 + (c1 + c2)) - c3)
+    = (((c0 + c1) + c2) - c3)
 - Code(Counter(2)) at (prev + 0, 19) to (start + 0, 25)
 - Code(Expression(3, Add)) at (prev + 1, 9) to (start + 0, 15)
     = (c1 + c2)
diff --git a/tests/coverage/while_early_ret.cov-map b/tests/coverage/while_early_ret.cov-map
index 6254dfbcf01..ade770597e2 100644
--- a/tests/coverage/while_early_ret.cov-map
+++ b/tests/coverage/while_early_ret.cov-map
@@ -1,27 +1,26 @@
 Function name: while_early_ret::main
-Raw bytes (61): 0x[01, 01, 06, 01, 05, 03, 09, 0e, 05, 03, 09, 17, 09, 0d, 11, 09, 01, 05, 01, 01, 1b, 03, 03, 09, 02, 0a, 0e, 05, 0d, 02, 0e, 0a, 06, 15, 02, 16, 0d, 04, 15, 00, 1b, 11, 04, 15, 00, 1b, 05, 03, 0a, 03, 0a, 09, 06, 05, 00, 0b, 13, 01, 01, 00, 02]
+Raw bytes (59): 0x[01, 01, 05, 01, 05, 03, 09, 01, 09, 13, 11, 09, 0d, 09, 01, 05, 01, 01, 1b, 03, 03, 09, 02, 0a, 06, 05, 0d, 02, 0e, 0a, 06, 15, 02, 16, 0d, 04, 15, 00, 1b, 11, 04, 15, 00, 1b, 05, 03, 0a, 03, 0a, 09, 06, 05, 00, 0b, 0f, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Expression(0, Add), rhs = Counter(2)
-- expression 2 operands: lhs = Expression(3, Sub), rhs = Counter(1)
-- expression 3 operands: lhs = Expression(0, Add), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(2)
-- expression 5 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(4)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 5, 1) to (start + 1, 27)
 - Code(Expression(0, Add)) at (prev + 3, 9) to (start + 2, 10)
     = (c0 + c1)
-- Code(Expression(3, Sub)) at (prev + 5, 13) to (start + 2, 14)
+- Code(Expression(1, Sub)) at (prev + 5, 13) to (start + 2, 14)
     = ((c0 + c1) - c2)
 - Code(Expression(2, Sub)) at (prev + 6, 21) to (start + 2, 22)
-    = (((c0 + c1) - c2) - c1)
+    = (c0 - c2)
 - Code(Counter(3)) at (prev + 4, 21) to (start + 0, 27)
 - Code(Counter(4)) at (prev + 4, 21) to (start + 0, 27)
 - Code(Counter(1)) at (prev + 3, 10) to (start + 3, 10)
 - Code(Counter(2)) at (prev + 6, 5) to (start + 0, 11)
-- Code(Expression(4, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = ((c3 + c4) + c2)
+- Code(Expression(3, Add)) at (prev + 1, 1) to (start + 0, 2)
+    = ((c2 + c3) + c4)
 Highest counter ID seen: c4
 
diff --git a/tests/coverage/yield.cov-map b/tests/coverage/yield.cov-map
index 578994a4530..e01ec8f9edb 100644
--- a/tests/coverage/yield.cov-map
+++ b/tests/coverage/yield.cov-map
@@ -1,17 +1,17 @@
 Function name: yield::main
-Raw bytes (106): 0x[01, 01, 0b, 05, 00, 0d, 11, 22, 15, 0d, 11, 11, 15, 22, 15, 0d, 11, 22, 15, 0d, 11, 19, 1d, 25, 29, 10, 01, 07, 01, 01, 16, 01, 07, 0b, 00, 2e, 0d, 01, 27, 00, 29, 03, 01, 0e, 00, 34, 0d, 02, 0b, 00, 2e, 22, 01, 22, 00, 27, 1e, 00, 2c, 00, 2e, 13, 01, 0e, 00, 34, 1e, 03, 09, 00, 16, 1e, 08, 0b, 00, 2e, 21, 01, 27, 00, 29, 27, 01, 0e, 00, 34, 21, 02, 0b, 00, 2e, 2d, 01, 27, 00, 29, 2b, 01, 0e, 00, 34, 2d, 02, 01, 00, 02]
+Raw bytes (106): 0x[01, 01, 0b, 05, 00, 0d, 11, 0d, 23, 11, 15, 11, 15, 0d, 23, 11, 15, 0d, 23, 11, 15, 19, 1d, 25, 29, 10, 01, 07, 01, 01, 16, 01, 07, 0b, 00, 2e, 0d, 01, 27, 00, 29, 03, 01, 0e, 00, 34, 0d, 02, 0b, 00, 2e, 06, 01, 22, 00, 27, 1e, 00, 2c, 00, 2e, 23, 01, 0e, 00, 34, 1e, 03, 09, 00, 16, 1e, 08, 0b, 00, 2e, 21, 01, 27, 00, 29, 27, 01, 0e, 00, 34, 21, 02, 0b, 00, 2e, 2d, 01, 27, 00, 29, 2b, 01, 0e, 00, 34, 2d, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 11
 - expression 0 operands: lhs = Counter(1), rhs = Zero
 - expression 1 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 2 operands: lhs = Expression(8, Sub), rhs = Counter(5)
-- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 2 operands: lhs = Counter(3), rhs = Expression(8, Add)
+- expression 3 operands: lhs = Counter(4), rhs = Counter(5)
 - expression 4 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 5 operands: lhs = Expression(8, Sub), rhs = Counter(5)
-- expression 6 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(5)
-- expression 8 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 5 operands: lhs = Counter(3), rhs = Expression(8, Add)
+- expression 6 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 7 operands: lhs = Counter(3), rhs = Expression(8, Add)
+- expression 8 operands: lhs = Counter(4), rhs = Counter(5)
 - expression 9 operands: lhs = Counter(6), rhs = Counter(7)
 - expression 10 operands: lhs = Counter(9), rhs = Counter(10)
 Number of file 0 mappings: 16
@@ -21,16 +21,16 @@ Number of file 0 mappings: 16
 - Code(Expression(0, Add)) at (prev + 1, 14) to (start + 0, 52)
     = (c1 + Zero)
 - Code(Counter(3)) at (prev + 2, 11) to (start + 0, 46)
-- Code(Expression(8, Sub)) at (prev + 1, 34) to (start + 0, 39)
+- Code(Expression(1, Sub)) at (prev + 1, 34) to (start + 0, 39)
     = (c3 - c4)
 - Code(Expression(7, Sub)) at (prev + 0, 44) to (start + 0, 46)
-    = ((c3 - c4) - c5)
-- Code(Expression(4, Add)) at (prev + 1, 14) to (start + 0, 52)
+    = (c3 - (c4 + c5))
+- Code(Expression(8, Add)) at (prev + 1, 14) to (start + 0, 52)
     = (c4 + c5)
 - Code(Expression(7, Sub)) at (prev + 3, 9) to (start + 0, 22)
-    = ((c3 - c4) - c5)
+    = (c3 - (c4 + c5))
 - Code(Expression(7, Sub)) at (prev + 8, 11) to (start + 0, 46)
-    = ((c3 - c4) - c5)
+    = (c3 - (c4 + c5))
 - Code(Counter(8)) at (prev + 1, 39) to (start + 0, 41)
 - Code(Expression(9, Add)) at (prev + 1, 14) to (start + 0, 52)
     = (c6 + c7)
diff --git a/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff b/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff
index cbb11d50f79..8dd23e4d6a3 100644
--- a/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff
+++ b/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff
@@ -30,15 +30,12 @@
 +     coverage ExpressionId(0) => Expression { lhs: Counter(1), op: Add, rhs: Counter(2) };
 +     coverage ExpressionId(1) => Expression { lhs: Expression(0), op: Add, rhs: Counter(3) };
 +     coverage ExpressionId(2) => Expression { lhs: Counter(0), op: Subtract, rhs: Expression(1) };
-+     coverage ExpressionId(3) => Expression { lhs: Counter(3), op: Add, rhs: Counter(2) };
-+     coverage ExpressionId(4) => Expression { lhs: Expression(3), op: Add, rhs: Counter(1) };
-+     coverage ExpressionId(5) => Expression { lhs: Expression(4), op: Add, rhs: Expression(2) };
 +     coverage Code(Counter(0)) => 14:1 - 15:21;
-+     coverage Code(Counter(3)) => 16:17 - 16:33;
++     coverage Code(Counter(1)) => 16:17 - 16:33;
 +     coverage Code(Counter(2)) => 17:17 - 17:33;
-+     coverage Code(Counter(1)) => 18:17 - 18:33;
++     coverage Code(Counter(3)) => 18:17 - 18:33;
 +     coverage Code(Expression(2)) => 19:17 - 19:33;
-+     coverage Code(Expression(5)) => 21:1 - 21:2;
++     coverage Code(Counter(0)) => 21:1 - 21:2;
 + 
       bb0: {
 +         Coverage::CounterIncrement(0);
@@ -55,7 +52,7 @@
       }
   
       bb2: {
-+         Coverage::CounterIncrement(3);
++         Coverage::CounterIncrement(1);
           falseEdge -> [real: bb8, imaginary: bb3];
       }
   
@@ -65,7 +62,7 @@
       }
   
       bb4: {
-+         Coverage::CounterIncrement(1);
++         Coverage::CounterIncrement(3);
           falseEdge -> [real: bb6, imaginary: bb5];
       }
   
@@ -127,7 +124,6 @@
       }
   
       bb13: {
-+         Coverage::ExpressionUsed(5);
           StorageDead(_1);
           return;
       }
diff --git a/tests/ui/associated-consts/associated-const-type-parameter-pattern.rs b/tests/ui/associated-consts/associated-const-type-parameter-pattern.rs
index b5798adc71c..e6c80a7e54e 100644
--- a/tests/ui/associated-consts/associated-const-type-parameter-pattern.rs
+++ b/tests/ui/associated-consts/associated-const-type-parameter-pattern.rs
@@ -18,17 +18,17 @@ impl Foo for Def {
 pub fn test<A: Foo, B: Foo>(arg: EFoo) {
     match arg {
         A::X => println!("A::X"),
-        //~^ error: constant pattern depends on a generic parameter
+        //~^ ERROR constant pattern cannot depend on generic parameters
         B::X => println!("B::X"),
-        //~^ error: constant pattern depends on a generic parameter
+        //~^ ERROR constant pattern cannot depend on generic parameters
         _ => (),
     }
 }
 
 pub fn test_let_pat<A: Foo, B: Foo>(arg: EFoo, A::X: EFoo) {
-    //~^ ERROR constant pattern depends on a generic parameter
+    //~^ ERROR constant pattern cannot depend on generic parameters
     let A::X = arg;
-    //~^ ERROR constant pattern depends on a generic parameter
+    //~^ ERROR constant pattern cannot depend on generic parameters
 }
 
 fn main() {
diff --git a/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr b/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr
index adc8f399207..a8256f775a6 100644
--- a/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr
+++ b/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr
@@ -1,26 +1,57 @@
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/associated-const-type-parameter-pattern.rs:20:9
    |
+LL | pub trait Foo {
+   | -------------
+LL |     const X: EFoo;
+   |     ------------- constant defined here
+...
+LL | pub fn test<A: Foo, B: Foo>(arg: EFoo) {
+   |             - constant depends on this generic parameter
+LL |     match arg {
 LL |         A::X => println!("A::X"),
-   |         ^^^^
+   |         ^^^^ `const` depends on a generic parameter
 
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/associated-const-type-parameter-pattern.rs:22:9
    |
+LL | pub trait Foo {
+   | -------------
+LL |     const X: EFoo;
+   |     ------------- constant defined here
+...
+LL | pub fn test<A: Foo, B: Foo>(arg: EFoo) {
+   |                     - constant depends on this generic parameter
+...
 LL |         B::X => println!("B::X"),
-   |         ^^^^
+   |         ^^^^ `const` depends on a generic parameter
 
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/associated-const-type-parameter-pattern.rs:30:9
    |
+LL | pub trait Foo {
+   | -------------
+LL |     const X: EFoo;
+   |     ------------- constant defined here
+...
+LL | pub fn test_let_pat<A: Foo, B: Foo>(arg: EFoo, A::X: EFoo) {
+   |                     - constant depends on this generic parameter
+LL |
 LL |     let A::X = arg;
-   |         ^^^^
+   |         ^^^^ `const` depends on a generic parameter
 
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/associated-const-type-parameter-pattern.rs:28:48
    |
+LL | pub trait Foo {
+   | -------------
+LL |     const X: EFoo;
+   |     ------------- constant defined here
+...
 LL | pub fn test_let_pat<A: Foo, B: Foo>(arg: EFoo, A::X: EFoo) {
-   |                                                ^^^^
+   |                     -                          ^^^^ `const` depends on a generic parameter
+   |                     |
+   |                     constant depends on this generic parameter
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/binding/const-param.rs b/tests/ui/binding/const-param.rs
index 2d051808fe0..98bc90f508a 100644
--- a/tests/ui/binding/const-param.rs
+++ b/tests/ui/binding/const-param.rs
@@ -2,7 +2,7 @@
 
 fn check<const N: usize>() {
     match 1 {
-        N => {} //~ ERROR const parameters cannot be referenced in patterns
+        N => {} //~ ERROR constant parameters cannot be referenced in patterns
         _ => {}
     }
 }
diff --git a/tests/ui/binding/const-param.stderr b/tests/ui/binding/const-param.stderr
index e68893a59e4..b0b8108945c 100644
--- a/tests/ui/binding/const-param.stderr
+++ b/tests/ui/binding/const-param.stderr
@@ -1,8 +1,11 @@
-error[E0158]: const parameters cannot be referenced in patterns
+error[E0158]: constant parameters cannot be referenced in patterns
   --> $DIR/const-param.rs:5:9
    |
+LL | fn check<const N: usize>() {
+   |          -------------- constant defined here
+LL |     match 1 {
 LL |         N => {}
-   |         ^
+   |         ^ can't be used in patterns
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/binop/binary-op-on-fn-ptr-eq.rs b/tests/ui/binop/binary-op-on-fn-ptr-eq.rs
index a5ec63587f9..47b79f3855f 100644
--- a/tests/ui/binop/binary-op-on-fn-ptr-eq.rs
+++ b/tests/ui/binop/binary-op-on-fn-ptr-eq.rs
@@ -1,6 +1,9 @@
 //@ run-pass
 // Tests equality between supertype and subtype of a function
 // See the issue #91636
+
+#![allow(unpredictable_function_pointer_comparisons)]
+
 fn foo(_a: &str) {}
 
 fn main() {
diff --git a/tests/ui/box/unit/unique-ffi-symbols.rs b/tests/ui/box/unit/unique-ffi-symbols.rs
index 65a9a32b2bb..75877f8397e 100644
--- a/tests/ui/box/unit/unique-ffi-symbols.rs
+++ b/tests/ui/box/unit/unique-ffi-symbols.rs
@@ -1,6 +1,9 @@
 //@ run-pass
 // We used to have a __rust_abi shim that resulted in duplicated symbols
 // whenever the item path wasn't enough to disambiguate between them.
+
+#![allow(unpredictable_function_pointer_comparisons)]
+
 fn main() {
     let a = {
         extern "C" fn good() -> i32 { return 0; }
diff --git a/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs b/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs
index d163238c6d5..5a67d34d6e5 100644
--- a/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs
+++ b/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 
-// Regression test for #128176.
+// Regression test for #128176. Previously we would call `type_of` on the `1` anon const
+// before the anon const had been lowered and had the `type_of` fed with a result.
 
 #![feature(generic_const_exprs)]
 #![feature(dyn_compatible_for_dispatch)]
diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs
index 09f7e2ba5b1..270496d45a6 100644
--- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs
+++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs
@@ -12,8 +12,7 @@ impl Opcode2 {
 
 pub fn example2(msg_type: Opcode2) -> impl FnMut(&[u8]) {
     move |i| match msg_type {
-        Opcode2::OP2 => unimplemented!(),
-        //~^ ERROR: could not evaluate constant pattern
+        Opcode2::OP2 => unimplemented!(), // ok, `const` already emitted an error
     }
 }
 
diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr
index 9442eac0cf5..d95a8861230 100644
--- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr
+++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr
@@ -17,13 +17,7 @@ help: you might be missing a type parameter
 LL | pub struct Opcode2<S>(&'a S);
    |                   +++
 
-error: could not evaluate constant pattern
-  --> $DIR/ice-type-mismatch-when-copying-112824.rs:15:9
-   |
-LL |         Opcode2::OP2 => unimplemented!(),
-   |         ^^^^^^^^^^^^
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0261, E0412.
 For more information about an error, try `rustc --explain E0261`.
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-2.rs b/tests/ui/consts/const-eval/const-eval-overflow-2.rs
index c19a0c443ec..bae8a7ce243 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-2.rs
+++ b/tests/ui/consts/const-eval/const-eval-overflow-2.rs
@@ -12,8 +12,7 @@ const NEG_NEG_128: i8 = -NEG_128; //~ ERROR constant
 
 fn main() {
     match -128i8 {
-        NEG_NEG_128 => println!("A"),
-        //~^ ERROR could not evaluate constant pattern
+        NEG_NEG_128 => println!("A"), // ok, `const` error already emitted
         _ => println!("B"),
     }
 }
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-2.stderr b/tests/ui/consts/const-eval/const-eval-overflow-2.stderr
index fc0baf11051..5599ff931e8 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-2.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow-2.stderr
@@ -4,12 +4,6 @@ error[E0080]: evaluation of constant value failed
 LL | const NEG_NEG_128: i8 = -NEG_128;
    |                         ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
 
-error: could not evaluate constant pattern
-  --> $DIR/const-eval-overflow-2.rs:15:9
-   |
-LL |         NEG_NEG_128 => println!("A"),
-   |         ^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr b/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr
index 8175fe6016a..18935626af1 100644
--- a/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr
+++ b/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr
@@ -7,12 +7,6 @@ LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error: could not evaluate constant pattern
-  --> $DIR/ref_to_int_match.rs:7:14
-   |
-LL |         10..=BAR => {},
-   |              ^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr b/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr
index 8175fe6016a..18935626af1 100644
--- a/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr
+++ b/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr
@@ -7,12 +7,6 @@ LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error: could not evaluate constant pattern
-  --> $DIR/ref_to_int_match.rs:7:14
-   |
-LL |         10..=BAR => {},
-   |              ^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ref_to_int_match.rs b/tests/ui/consts/const-eval/ref_to_int_match.rs
index c627ad97bb0..be9420e0215 100644
--- a/tests/ui/consts/const-eval/ref_to_int_match.rs
+++ b/tests/ui/consts/const-eval/ref_to_int_match.rs
@@ -4,7 +4,7 @@ fn main() {
     let n: Int = 40;
     match n {
         0..=10 => {},
-        10..=BAR => {}, //~ ERROR could not evaluate constant pattern
+        10..=BAR => {}, // ok, `const` error already emitted
         _ => {},
     }
 }
diff --git a/tests/ui/consts/const-extern-function.rs b/tests/ui/consts/const-extern-function.rs
index acc438189cb..7629d63266a 100644
--- a/tests/ui/consts/const-extern-function.rs
+++ b/tests/ui/consts/const-extern-function.rs
@@ -1,5 +1,7 @@
 //@ run-pass
+
 #![allow(non_upper_case_globals)]
+#![allow(unpredictable_function_pointer_comparisons)]
 
 extern "C" fn foopy() {}
 
diff --git a/tests/ui/consts/const_in_pattern/cross-crate-fail.rs b/tests/ui/consts/const_in_pattern/cross-crate-fail.rs
index 163a47f4333..f02e780f30e 100644
--- a/tests/ui/consts/const_in_pattern/cross-crate-fail.rs
+++ b/tests/ui/consts/const_in_pattern/cross-crate-fail.rs
@@ -9,15 +9,13 @@ fn main() {
     let _ = Defaulted;
     match None {
         consts::SOME => panic!(),
-        //~^ must be annotated with `#[derive(PartialEq)]`
-
+        //~^ ERROR constant of non-structural type `CustomEq` in a pattern
         _ => {}
     }
 
     match None {
         <Defaulted as consts::AssocConst>::SOME  => panic!(),
-        //~^ must be annotated with `#[derive(PartialEq)]`
-
+        //~^ ERROR constant of non-structural type `CustomEq` in a pattern
         _ => {}
     }
 }
diff --git a/tests/ui/consts/const_in_pattern/cross-crate-fail.stderr b/tests/ui/consts/const_in_pattern/cross-crate-fail.stderr
index e0f97a9abd2..7cada883645 100644
--- a/tests/ui/consts/const_in_pattern/cross-crate-fail.stderr
+++ b/tests/ui/consts/const_in_pattern/cross-crate-fail.stderr
@@ -1,19 +1,33 @@
-error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `CustomEq` in a pattern
   --> $DIR/cross-crate-fail.rs:11:9
    |
 LL |         consts::SOME => panic!(),
-   |         ^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^ constant of non-structural type
+   |
+  ::: $DIR/auxiliary/consts.rs:1:1
+   |
+LL | pub struct CustomEq;
+   | ------------------- `CustomEq` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | pub const SOME: Option<CustomEq> = Some(CustomEq);
+   | -------------------------------- constant defined here
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
-error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/cross-crate-fail.rs:18:9
+error: constant of non-structural type `CustomEq` in a pattern
+  --> $DIR/cross-crate-fail.rs:17:9
    |
 LL |         <Defaulted as consts::AssocConst>::SOME  => panic!(),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
+   |
+  ::: $DIR/auxiliary/consts.rs:1:1
+   |
+LL | pub struct CustomEq;
+   | ------------------- `CustomEq` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const SOME: Option<CustomEq> = Some(CustomEq);
+   |     ---------------------------- constant defined here
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
index aa208341c13..0453a88e43d 100644
--- a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
+++ b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
@@ -1,26 +1,46 @@
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:9:9
    |
+LL | const C: *const u8 = &0;
+   | ------------------ constant defined here
+...
 LL |         C => {}
-   |         ^
+   |         ^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:16:9
    |
+LL | const C_INNER: (*const u8, u8) = (C, 0);
+   | ------------------------------ constant defined here
+...
 LL |         C_INNER => {}
-   |         ^^^^^^^
+   |         ^^^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:27:9
    |
+LL | const D: *const [u8; 4] = b"abcd";
+   | ----------------------- constant defined here
+...
 LL |         D => {}
-   |         ^
+   |         ^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:32:9
    |
+LL | const STR: *const str = "abcd";
+   | --------------------- constant defined here
+...
 LL |         STR => {}
-   |         ^^^
+   |         ^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/consts/const_in_pattern/issue-44333.stderr b/tests/ui/consts/const_in_pattern/issue-44333.stderr
index d377bfd95f9..61b45377c76 100644
--- a/tests/ui/consts/const_in_pattern/issue-44333.stderr
+++ b/tests/ui/consts/const_in_pattern/issue-44333.stderr
@@ -1,14 +1,24 @@
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-44333.rs:15:9
    |
+LL | const FOO: Func = foo;
+   | --------------- constant defined here
+...
 LL |         FOO => println!("foo"),
-   |         ^^^
+   |         ^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-44333.rs:16:9
    |
+LL | const BAR: Func = bar;
+   | --------------- constant defined here
+...
 LL |         BAR => println!("bar"),
-   |         ^^^
+   |         ^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const_in_pattern/issue-65466.rs b/tests/ui/consts/const_in_pattern/issue-65466.rs
index 62efce64876..82838657b02 100644
--- a/tests/ui/consts/const_in_pattern/issue-65466.rs
+++ b/tests/ui/consts/const_in_pattern/issue-65466.rs
@@ -11,7 +11,7 @@ const C: &[O<B>] = &[O::None];
 fn main() {
     let x = O::None;
     match &[x][..] {
-        C => (), //~ERROR: the type must implement `PartialEq`
+        C => (), //~ ERROR constant of non-structural type `&[O<B>]` in a pattern
         _ => (),
     }
 }
diff --git a/tests/ui/consts/const_in_pattern/issue-65466.stderr b/tests/ui/consts/const_in_pattern/issue-65466.stderr
index 7d5e5b5b0c6..511a38bbc00 100644
--- a/tests/ui/consts/const_in_pattern/issue-65466.stderr
+++ b/tests/ui/consts/const_in_pattern/issue-65466.stderr
@@ -1,8 +1,16 @@
-error: to use a constant of type `&[O<B>]` in a pattern, the type must implement `PartialEq`
+error: constant of non-structural type `&[O<B>]` in a pattern
   --> $DIR/issue-65466.rs:14:9
    |
+LL | struct B;
+   | -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+LL |
+LL | const C: &[O<B>] = &[O::None];
+   | ---------------- constant defined here
+...
 LL |         C => (),
-   |         ^
+   |         ^ constant of non-structural type
+   |
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const_in_pattern/no-eq-branch-fail.rs b/tests/ui/consts/const_in_pattern/no-eq-branch-fail.rs
index cf013c1a790..91ef5ac5329 100644
--- a/tests/ui/consts/const_in_pattern/no-eq-branch-fail.rs
+++ b/tests/ui/consts/const_in_pattern/no-eq-branch-fail.rs
@@ -16,8 +16,7 @@ const BAR_BAZ: Foo = if 42 == 42 {
 
 fn main() {
     match Foo::Qux(NoEq) {
-        BAR_BAZ => panic!(),
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        BAR_BAZ => panic!(), //~ ERROR constant of non-structural type `Foo` in a pattern
         _ => {}
     }
 }
diff --git a/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr b/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr
index 7766c6ce683..154c94c6d38 100644
--- a/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr
+++ b/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr
@@ -1,10 +1,15 @@
-error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `Foo` in a pattern
   --> $DIR/no-eq-branch-fail.rs:19:9
    |
+LL | enum Foo {
+   | -------- `Foo` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const BAR_BAZ: Foo = if 42 == 42 {
+   | ------------------ constant defined here
+...
 LL |         BAR_BAZ => panic!(),
-   |         ^^^^^^^
+   |         ^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.rs b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.rs
index 645e1418912..e555ecfeb8f 100644
--- a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.rs
+++ b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.rs
@@ -26,7 +26,7 @@ fn main() {
 
     match None {
         NO_PARTIAL_EQ_NONE => println!("NO_PARTIAL_EQ_NONE"),
-        //~^ ERROR must implement `PartialEq`
+        //~^ ERROR constant of non-structural type `Option<NoPartialEq>` in a pattern
         _ => panic!("whoops"),
     }
 }
diff --git a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
index ed531a1fead..43894f00886 100644
--- a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
+++ b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
@@ -1,8 +1,16 @@
-error: to use a constant of type `Option<NoPartialEq>` in a pattern, the type must implement `PartialEq`
+error: constant of non-structural type `Option<NoPartialEq>` in a pattern
   --> $DIR/reject_non_partial_eq.rs:28:9
    |
+LL | struct NoPartialEq(u32);
+   | ------------------ must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const NO_PARTIAL_EQ_NONE: Option<NoPartialEq> = None;
+   | --------------------------------------------- constant defined here
+...
 LL |         NO_PARTIAL_EQ_NONE => println!("NO_PARTIAL_EQ_NONE"),
-   |         ^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^ constant of non-structural type
+   |
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const_in_pattern/reject_non_structural.rs b/tests/ui/consts/const_in_pattern/reject_non_structural.rs
index e3dcecec960..39e5f732a89 100644
--- a/tests/ui/consts/const_in_pattern/reject_non_structural.rs
+++ b/tests/ui/consts/const_in_pattern/reject_non_structural.rs
@@ -17,9 +17,29 @@ struct NoPartialEq;
 
 #[derive(Copy, Clone, Debug)]
 struct NoDerive;
+//~^ NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
+//~| NOTE must be annotated with `#[derive(PartialEq)]`
 
 // This impl makes `NoDerive` irreflexive.
 impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+//~^ NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
+//~| NOTE StructuralPartialEq.html for details
 
 impl Eq for NoDerive { }
 
@@ -36,65 +56,55 @@ fn main() {
     #[derive(PartialEq, Eq, Debug)]
     enum Derive<X> { Some(X), None, }
 
-    const ENUM: Derive<NoDerive> = Derive::Some(NoDerive);
+    const ENUM: Derive<NoDerive> = Derive::Some(NoDerive); //~ NOTE constant defined here
     match Derive::Some(NoDerive) { ENUM => dbg!(ENUM), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    const FIELD: OND = TrivialEq(Some(NoDerive)).0;
+    const FIELD: OND = TrivialEq(Some(NoDerive)).0; //~ NOTE constant defined here
     match Some(NoDerive) { FIELD => dbg!(FIELD), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
     const NO_DERIVE_SOME: OND = Some(NoDerive);
-    const INDIRECT: OND = NO_DERIVE_SOME;
+    const INDIRECT: OND = NO_DERIVE_SOME; //~ NOTE constant defined here
     match Some(NoDerive) {INDIRECT => dbg!(INDIRECT), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    const TUPLE: (OND, OND) = (None, Some(NoDerive));
+    const TUPLE: (OND, OND) = (None, Some(NoDerive)); //~ NOTE constant defined here
     match (None, Some(NoDerive)) { TUPLE => dbg!(TUPLE), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    const TYPE_ASCRIPTION: OND = type_ascribe!(Some(NoDerive), OND);
+    const TYPE_ASCRIPTION: OND = type_ascribe!(Some(NoDerive), OND); //~ NOTE constant defined here
     match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    const ARRAY: [OND; 2] = [None, Some(NoDerive)];
+    const ARRAY: [OND; 2] = [None, Some(NoDerive)]; //~ NOTE constant defined here
     match [None, Some(NoDerive)] { ARRAY => dbg!(ARRAY), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    const REPEAT: [OND; 2] = [Some(NoDerive); 2];
+    const REPEAT: [OND; 2] = [Some(NoDerive); 2]; //~ NOTE constant defined here
     match [Some(NoDerive); 2] { REPEAT => dbg!(REPEAT), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    trait Trait: Sized { const ASSOC: Option<Self>; }
+    trait Trait: Sized { const ASSOC: Option<Self>; } //~ NOTE constant defined here
     impl Trait for NoDerive { const ASSOC: Option<NoDerive> = Some(NoDerive); }
     match Some(NoDerive) { NoDerive::ASSOC => dbg!(NoDerive::ASSOC), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    const BLOCK: OND = { NoDerive; Some(NoDerive) };
+    const BLOCK: OND = { NoDerive; Some(NoDerive) }; //~ NOTE constant defined here
     match Some(NoDerive) { BLOCK => dbg!(BLOCK), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 
-    const ADDR_OF: &OND = &Some(NoDerive);
+    const ADDR_OF: &OND = &Some(NoDerive); //~ NOTE constant defined here
     match &Some(NoDerive) { ADDR_OF => dbg!(ADDR_OF), _ => panic!("whoops"), };
-    //~^ ERROR must be annotated with `#[derive(PartialEq)]`
-    //~| NOTE the traits must be derived
-    //~| NOTE StructuralPartialEq.html for details
+    //~^ ERROR constant of non-structural type `NoDerive` in a pattern
+    //~| NOTE constant of non-structural type
 }
diff --git a/tests/ui/consts/const_in_pattern/reject_non_structural.stderr b/tests/ui/consts/const_in_pattern/reject_non_structural.stderr
index c068db42e4d..fa16d0b06a7 100644
--- a/tests/ui/consts/const_in_pattern/reject_non_structural.stderr
+++ b/tests/ui/consts/const_in_pattern/reject_non_structural.stderr
@@ -1,92 +1,173 @@
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:40:36
-   |
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:60:36
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const ENUM: Derive<NoDerive> = Derive::Some(NoDerive);
+   |     ---------------------------- constant defined here
 LL |     match Derive::Some(NoDerive) { ENUM => dbg!(ENUM), _ => panic!("whoops"), };
-   |                                    ^^^^
+   |                                    ^^^^ constant of non-structural type
+   |
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:46:28
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:65:28
    |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const FIELD: OND = TrivialEq(Some(NoDerive)).0;
+   |     ---------------- constant defined here
 LL |     match Some(NoDerive) { FIELD => dbg!(FIELD), _ => panic!("whoops"), };
-   |                            ^^^^^
+   |                            ^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:53:27
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:71:27
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const INDIRECT: OND = NO_DERIVE_SOME;
+   |     ------------------- constant defined here
 LL |     match Some(NoDerive) {INDIRECT => dbg!(INDIRECT), _ => panic!("whoops"), };
-   |                           ^^^^^^^^
+   |                           ^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:59:36
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:76:36
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const TUPLE: (OND, OND) = (None, Some(NoDerive));
+   |     ----------------------- constant defined here
 LL |     match (None, Some(NoDerive)) { TUPLE => dbg!(TUPLE), _ => panic!("whoops"), };
-   |                                    ^^^^^
+   |                                    ^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:65:28
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:81:28
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const TYPE_ASCRIPTION: OND = type_ascribe!(Some(NoDerive), OND);
+   |     -------------------------- constant defined here
 LL |     match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
-   |                            ^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:71:36
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:86:36
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const ARRAY: [OND; 2] = [None, Some(NoDerive)];
+   |     --------------------- constant defined here
 LL |     match [None, Some(NoDerive)] { ARRAY => dbg!(ARRAY), _ => panic!("whoops"), };
-   |                                    ^^^^^
+   |                                    ^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:77:33
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:91:33
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const REPEAT: [OND; 2] = [Some(NoDerive); 2];
+   |     ---------------------- constant defined here
 LL |     match [Some(NoDerive); 2] { REPEAT => dbg!(REPEAT), _ => panic!("whoops"), };
-   |                                 ^^^^^^
+   |                                 ^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:84:28
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:97:28
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     trait Trait: Sized { const ASSOC: Option<Self>; }
+   |     ------------------   ------------------------- constant defined here
+LL |     impl Trait for NoDerive { const ASSOC: Option<NoDerive> = Some(NoDerive); }
 LL |     match Some(NoDerive) { NoDerive::ASSOC => dbg!(NoDerive::ASSOC), _ => panic!("whoops"), };
-   |                            ^^^^^^^^^^^^^^^
+   |                            ^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:90:28
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:102:28
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const BLOCK: OND = { NoDerive; Some(NoDerive) };
+   |     ---------------- constant defined here
 LL |     match Some(NoDerive) { BLOCK => dbg!(BLOCK), _ => panic!("whoops"), };
-   |                            ^^^^^
+   |                            ^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
-
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/reject_non_structural.rs:96:29
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: constant of non-structural type `NoDerive` in a pattern
+  --> $DIR/reject_non_structural.rs:107:29
+   |
+LL | struct NoDerive;
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const ADDR_OF: &OND = &Some(NoDerive);
+   |     ------------------- constant defined here
 LL |     match &Some(NoDerive) { ADDR_OF => dbg!(ADDR_OF), _ => panic!("whoops"), };
-   |                             ^^^^^^^
+   |                             ^^^^^^^ constant of non-structural type
+   |
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/reject_non_structural.rs:32:1
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 10 previous errors
 
diff --git a/tests/ui/consts/const_refs_to_static_fail_invalid.rs b/tests/ui/consts/const_refs_to_static_fail_invalid.rs
index a160862a0fa..aa101cf9d8a 100644
--- a/tests/ui/consts/const_refs_to_static_fail_invalid.rs
+++ b/tests/ui/consts/const_refs_to_static_fail_invalid.rs
@@ -11,7 +11,7 @@ fn invalid() {
 
     // This must be rejected here (or earlier), since it's not a valid `&bool`.
     match &true {
-        C => {} //~ERROR: could not evaluate constant pattern
+        C => {} // ok, `const` already emitted an error
         _ => {}
     }
 }
@@ -27,7 +27,7 @@ fn extern_() {
 
     // This must be rejected here (or earlier), since the pattern cannot be read.
     match &0 {
-        C => {} //~ERROR: could not evaluate constant pattern
+        C => {} // ok, `const` already emitted an error
         _ => {}
     }
 }
@@ -42,7 +42,7 @@ fn mutable() {
     // This *must not build*, the constant we are matching against
     // could change its value!
     match &42 {
-        C => {} //~ERROR: could not evaluate constant pattern
+        C => {} // ok, `const` already emitted an error
         _ => {}
     }
 }
diff --git a/tests/ui/consts/const_refs_to_static_fail_invalid.stderr b/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
index 0153f501174..c9d5cb60bf7 100644
--- a/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
+++ b/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
@@ -31,24 +31,6 @@ LL |     const C: &i32 = unsafe { &S_MUT };
                HEX_DUMP
            }
 
-error: could not evaluate constant pattern
-  --> $DIR/const_refs_to_static_fail_invalid.rs:14:9
-   |
-LL |         C => {}
-   |         ^
-
-error: could not evaluate constant pattern
-  --> $DIR/const_refs_to_static_fail_invalid.rs:30:9
-   |
-LL |         C => {}
-   |         ^
-
-error: could not evaluate constant pattern
-  --> $DIR/const_refs_to_static_fail_invalid.rs:45:9
-   |
-LL |         C => {}
-   |         ^
-
-error: aborting due to 6 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/invalid-inline-const-in-match-arm.stderr b/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
index 2e48837bdcd..b22f99f40d3 100644
--- a/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
+++ b/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
@@ -11,7 +11,7 @@ error: could not evaluate constant pattern
   --> $DIR/invalid-inline-const-in-match-arm.rs:5:9
    |
 LL |         const { (|| {})() } => {}
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^ could not evaluate constant
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/issue-43105.rs b/tests/ui/consts/issue-43105.rs
index 20b78d64209..a4ee34c0532 100644
--- a/tests/ui/consts/issue-43105.rs
+++ b/tests/ui/consts/issue-43105.rs
@@ -5,8 +5,7 @@ const NUM: u8 = xyz();
 
 fn main() {
     match 1 {
-        NUM => unimplemented!(),
-        //~^ ERROR could not evaluate constant pattern
+        NUM => unimplemented!(), // ok, the `const` already emitted an error
         _ => unimplemented!(),
     }
 }
diff --git a/tests/ui/consts/issue-43105.stderr b/tests/ui/consts/issue-43105.stderr
index 856a8f0dab6..0e08feb58de 100644
--- a/tests/ui/consts/issue-43105.stderr
+++ b/tests/ui/consts/issue-43105.stderr
@@ -6,12 +6,6 @@ LL | const NUM: u8 = xyz();
    |
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error: could not evaluate constant pattern
-  --> $DIR/issue-43105.rs:8:9
-   |
-LL |         NUM => unimplemented!(),
-   |         ^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/issue-73976-polymorphic.rs b/tests/ui/consts/issue-73976-polymorphic.rs
index 2c576d1f9ef..98b4005792d 100644
--- a/tests/ui/consts/issue-73976-polymorphic.rs
+++ b/tests/ui/consts/issue-73976-polymorphic.rs
@@ -18,7 +18,7 @@ impl<T: 'static> GetTypeId<T> {
 
 const fn check_type_id<T: 'static>() -> bool {
     matches!(GetTypeId::<T>::VALUE, GetTypeId::<T>::VALUE)
-    //~^ ERROR constant pattern depends on a generic parameter
+    //~^ ERROR constant pattern cannot depend on generic parameters
 }
 
 pub struct GetTypeNameLen<T>(T);
@@ -29,7 +29,7 @@ impl<T: 'static> GetTypeNameLen<T> {
 
 const fn check_type_name_len<T: 'static>() -> bool {
     matches!(GetTypeNameLen::<T>::VALUE, GetTypeNameLen::<T>::VALUE)
-    //~^ ERROR constant pattern depends on a generic parameter
+    //~^ ERROR constant pattern cannot depend on generic parameters
 }
 
 fn main() {
diff --git a/tests/ui/consts/issue-73976-polymorphic.stderr b/tests/ui/consts/issue-73976-polymorphic.stderr
index 8a44eb9854f..ec9512a2616 100644
--- a/tests/ui/consts/issue-73976-polymorphic.stderr
+++ b/tests/ui/consts/issue-73976-polymorphic.stderr
@@ -1,14 +1,28 @@
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/issue-73976-polymorphic.rs:20:37
    |
+LL | impl<T: 'static> GetTypeId<T> {
+   | -----------------------------
+LL |     pub const VALUE: TypeId = TypeId::of::<T>();
+   |     ----------------------- constant defined here
+...
+LL | const fn check_type_id<T: 'static>() -> bool {
+   |                        - constant depends on this generic parameter
 LL |     matches!(GetTypeId::<T>::VALUE, GetTypeId::<T>::VALUE)
-   |                                     ^^^^^^^^^^^^^^^^^^^^^
+   |                                     ^^^^^^^^^^^^^^^^^^^^^ `const` depends on a generic parameter
 
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/issue-73976-polymorphic.rs:31:42
    |
+LL | impl<T: 'static> GetTypeNameLen<T> {
+   | ----------------------------------
+LL |     pub const VALUE: usize = any::type_name::<T>().len();
+   |     ---------------------- constant defined here
+...
+LL | const fn check_type_name_len<T: 'static>() -> bool {
+   |                              - constant depends on this generic parameter
 LL |     matches!(GetTypeNameLen::<T>::VALUE, GetTypeNameLen::<T>::VALUE)
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^ `const` depends on a generic parameter
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/issue-78655.rs b/tests/ui/consts/issue-78655.rs
index cd95ee32c60..b0f862e8418 100644
--- a/tests/ui/consts/issue-78655.rs
+++ b/tests/ui/consts/issue-78655.rs
@@ -4,6 +4,5 @@ const FOO: *const u32 = {
 };
 
 fn main() {
-    let FOO = FOO;
-    //~^ ERROR could not evaluate constant pattern
+    let FOO = FOO; // ok, the `const` already emitted an error
 }
diff --git a/tests/ui/consts/issue-78655.stderr b/tests/ui/consts/issue-78655.stderr
index ccaed03b4c1..6a93c1a8cec 100644
--- a/tests/ui/consts/issue-78655.stderr
+++ b/tests/ui/consts/issue-78655.stderr
@@ -11,12 +11,6 @@ help: consider assigning a value
 LL |     let x = 42;
    |           ++++
 
-error: could not evaluate constant pattern
-  --> $DIR/issue-78655.rs:7:9
-   |
-LL |     let FOO = FOO;
-   |         ^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/consts/issue-79137-toogeneric.rs b/tests/ui/consts/issue-79137-toogeneric.rs
index a80c9f48d7b..43e06f3d676 100644
--- a/tests/ui/consts/issue-79137-toogeneric.rs
+++ b/tests/ui/consts/issue-79137-toogeneric.rs
@@ -10,7 +10,7 @@ impl<T> GetVariantCount<T> {
 
 const fn check_variant_count<T>() -> bool {
     matches!(GetVariantCount::<T>::VALUE, GetVariantCount::<T>::VALUE)
-    //~^ ERROR constant pattern depends on a generic parameter
+    //~^ ERROR constant pattern cannot depend on generic parameters
 }
 
 fn main() {
diff --git a/tests/ui/consts/issue-79137-toogeneric.stderr b/tests/ui/consts/issue-79137-toogeneric.stderr
index de81512ec6d..33e32a7d15d 100644
--- a/tests/ui/consts/issue-79137-toogeneric.stderr
+++ b/tests/ui/consts/issue-79137-toogeneric.stderr
@@ -1,8 +1,15 @@
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/issue-79137-toogeneric.rs:12:43
    |
+LL | impl<T> GetVariantCount<T> {
+   | --------------------------
+LL |     pub const VALUE: usize = std::mem::variant_count::<T>();
+   |     ---------------------- constant defined here
+...
+LL | const fn check_variant_count<T>() -> bool {
+   |                              - constant depends on this generic parameter
 LL |     matches!(GetVariantCount::<T>::VALUE, GetVariantCount::<T>::VALUE)
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `const` depends on a generic parameter
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/issue-87046.stderr b/tests/ui/consts/issue-87046.stderr
index 0f965e1ac3f..36e2564fae6 100644
--- a/tests/ui/consts/issue-87046.stderr
+++ b/tests/ui/consts/issue-87046.stderr
@@ -1,6 +1,9 @@
 error: cannot use unsized non-slice type `Username` in constant patterns
   --> $DIR/issue-87046.rs:28:13
    |
+LL | pub const ROOT_USER: &Username = Username::from_str("root");
+   | ------------------------------ constant defined here
+...
 LL |             ROOT_USER => true,
    |             ^^^^^^^^^
 
diff --git a/tests/ui/consts/issue-89088.rs b/tests/ui/consts/issue-89088.rs
index 02a786e7465..f6dbf8f0125 100644
--- a/tests/ui/consts/issue-89088.rs
+++ b/tests/ui/consts/issue-89088.rs
@@ -13,7 +13,7 @@ fn main() {
     let var = A::Field(Cow::Borrowed("bar"));
 
     match &var {
-        FOO => todo!(), //~ERROR derive(PartialEq)
+        FOO => todo!(), //~ ERROR constant of non-structural type `Cow<'_, str>` in a pattern
         _ => todo!()
     }
 }
diff --git a/tests/ui/consts/issue-89088.stderr b/tests/ui/consts/issue-89088.stderr
index 362c63a2a45..56025e0d9b2 100644
--- a/tests/ui/consts/issue-89088.stderr
+++ b/tests/ui/consts/issue-89088.stderr
@@ -1,10 +1,15 @@
-error: to use a constant of type `Cow<'_, str>` in a pattern, `Cow<'_, str>` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `Cow<'_, str>` in a pattern
   --> $DIR/issue-89088.rs:16:9
    |
+LL | const FOO: &A = &A::Field(Cow::Borrowed("foo"));
+   | ------------- constant defined here
+...
 LL |         FOO => todo!(),
-   |         ^^^
+   |         ^^^ constant of non-structural type
+  --> $SRC_DIR/alloc/src/borrow.rs:LL:COL
+   |
+   = note: `Cow<'_, str>` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/match_ice.rs b/tests/ui/consts/match_ice.rs
index ed1fd78809b..477a2de09a4 100644
--- a/tests/ui/consts/match_ice.rs
+++ b/tests/ui/consts/match_ice.rs
@@ -8,8 +8,7 @@ struct T;
 fn main() {
     const C: &S = &S;
     match C {
-        C => {}
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        C => {} //~ ERROR constant of non-structural type `S` in a pattern
     }
     const K: &T = &T;
     match K {
diff --git a/tests/ui/consts/match_ice.stderr b/tests/ui/consts/match_ice.stderr
index 472c24a5cbe..95e96bbbd67 100644
--- a/tests/ui/consts/match_ice.stderr
+++ b/tests/ui/consts/match_ice.stderr
@@ -1,10 +1,15 @@
-error: to use a constant of type `S` in a pattern, `S` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `S` in a pattern
   --> $DIR/match_ice.rs:11:9
    |
+LL | struct S;
+   | -------- `S` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const C: &S = &S;
+   |     ----------- constant defined here
+LL |     match C {
 LL |         C => {}
-   |         ^
+   |         ^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
index a6d75658c75..facb21a04ef 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
@@ -37,16 +37,14 @@ const U8_MUT3: &u8 = {
 
 pub fn test(x: &[u8; 1]) -> bool {
     match x {
-        SLICE_MUT => true,
-        //~^ ERROR could not evaluate constant pattern
+        SLICE_MUT => true, // ok, `const` error already emitted
         &[1..] => false,
     }
 }
 
 pub fn test2(x: &u8) -> bool {
     match x {
-        U8_MUT => true,
-        //~^ ERROR could not evaluate constant pattern
+        U8_MUT => true, // ok, `const` error already emitted
         &(1..) => false,
     }
 }
@@ -55,15 +53,13 @@ pub fn test2(x: &u8) -> bool {
 // the errors above otherwise stop compilation too early?
 pub fn test3(x: &u8) -> bool {
     match x {
-        U8_MUT2 => true,
-        //~^ ERROR could not evaluate constant pattern
+        U8_MUT2 => true, // ok, `const` error already emitted
         &(1..) => false,
     }
 }
 pub fn test4(x: &u8) -> bool {
     match x {
-        U8_MUT3 => true,
-        //~^ ERROR could not evaluate constant pattern
+        U8_MUT3 => true, // ok, `const` error already emitted
         &(1..) => false,
     }
 }
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr
index 147d3f238f7..8f8271cce38 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr
@@ -37,30 +37,6 @@ error[E0080]: evaluation of constant value failed
 LL |         match static_cross_crate::OPT_ZERO {
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory
 
-error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:40:9
-   |
-LL |         SLICE_MUT => true,
-   |         ^^^^^^^^^
-
-error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:48:9
-   |
-LL |         U8_MUT => true,
-   |         ^^^^^^
-
-error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:58:9
-   |
-LL |         U8_MUT2 => true,
-   |         ^^^^^^^
-
-error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:65:9
-   |
-LL |         U8_MUT3 => true,
-   |         ^^^^^^^
-
-error: aborting due to 8 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/missing_assoc_const_type.rs b/tests/ui/consts/missing_assoc_const_type.rs
index 633998e9bc1..61042bfa96d 100644
--- a/tests/ui/consts/missing_assoc_const_type.rs
+++ b/tests/ui/consts/missing_assoc_const_type.rs
@@ -9,14 +9,13 @@ trait Range {
 
 struct TwoDigits;
 impl Range for TwoDigits {
-    const FIRST:  = 10;
-    //~^ ERROR: missing type for `const` item
+    const FIRST:  = 10; //~ ERROR missing type for `const` item
     const LAST: u8 = 99;
 }
 
 const fn digits(x: u8) -> usize {
     match x {
-        TwoDigits::FIRST..=TwoDigits::LAST => 0, //~ ERROR: could not evaluate constant pattern
+        TwoDigits::FIRST..=TwoDigits::LAST => 0, // ok, `const` error already emitted
         0..=9 | 100..=255 => panic!(),
     }
 }
diff --git a/tests/ui/consts/missing_assoc_const_type.stderr b/tests/ui/consts/missing_assoc_const_type.stderr
index ef7ff962d2d..28af1f0f321 100644
--- a/tests/ui/consts/missing_assoc_const_type.stderr
+++ b/tests/ui/consts/missing_assoc_const_type.stderr
@@ -4,11 +4,5 @@ error: missing type for `const` item
 LL |     const FIRST:  = 10;
    |                 ^ help: provide a type for the associated constant: `u8`
 
-error: could not evaluate constant pattern
-  --> $DIR/missing_assoc_const_type.rs:19:9
-   |
-LL |         TwoDigits::FIRST..=TwoDigits::LAST => 0,
-   |         ^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/transmute-size-mismatch-before-typeck.rs b/tests/ui/consts/transmute-size-mismatch-before-typeck.rs
index 44eac5b16cc..ffb143da2d4 100644
--- a/tests/ui/consts/transmute-size-mismatch-before-typeck.rs
+++ b/tests/ui/consts/transmute-size-mismatch-before-typeck.rs
@@ -5,7 +5,7 @@
 
 fn main() {
     match &b""[..] {
-        ZST => {} //~ ERROR: could not evaluate constant pattern
+        ZST => {} // ok, `const` error already emitted
     }
 }
 
diff --git a/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr b/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr
index e0d658db997..6bc7e7203aa 100644
--- a/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr
+++ b/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr
@@ -7,12 +7,6 @@ LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
    = note: source type: `usize` (word size)
    = note: target type: `&[u8]` (2 * word size)
 
-error: could not evaluate constant pattern
-  --> $DIR/transmute-size-mismatch-before-typeck.rs:8:9
-   |
-LL |         ZST => {}
-   |         ^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs
index 07c13239a2c..c98ec1de17e 100644
--- a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs
+++ b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs
@@ -3,8 +3,6 @@
 trait X {
     fn test() -> Self::Assoc<{ async {} }>;
     //~^ ERROR associated type `Assoc` not found for `Self`
-    //~| ERROR associated type `Assoc` not found for `Self`
-
 }
 
 pub fn main() {}
diff --git a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr
index 864c6556d79..58553728753 100644
--- a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr
+++ b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr
@@ -4,14 +4,6 @@ error[E0220]: associated type `Assoc` not found for `Self`
 LL |     fn test() -> Self::Assoc<{ async {} }>;
    |                        ^^^^^ associated type `Assoc` not found
 
-error[E0220]: associated type `Assoc` not found for `Self`
-  --> $DIR/coroutine-in-orphaned-anon-const.rs:4:24
-   |
-LL |     fn test() -> Self::Assoc<{ async {} }>;
-   |                        ^^^^^ associated type `Assoc` not found
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/cross-crate/const-cross-crate-extern.rs b/tests/ui/cross-crate/const-cross-crate-extern.rs
index 8d48a6a5206..0ec8753c30f 100644
--- a/tests/ui/cross-crate/const-cross-crate-extern.rs
+++ b/tests/ui/cross-crate/const-cross-crate-extern.rs
@@ -1,6 +1,8 @@
 //@ run-pass
 //@ aux-build:cci_const.rs
+
 #![allow(non_upper_case_globals)]
+#![allow(unpredictable_function_pointer_comparisons)]
 
 extern crate cci_const;
 use cci_const::bar;
diff --git a/tests/ui/deriving/deriving-coerce-pointee-neg.rs b/tests/ui/deriving/deriving-coerce-pointee-neg.rs
index deef35cdf70..da25c854c54 100644
--- a/tests/ui/deriving/deriving-coerce-pointee-neg.rs
+++ b/tests/ui/deriving/deriving-coerce-pointee-neg.rs
@@ -29,7 +29,7 @@ struct NoFieldUnit<'a, #[pointee] T: ?Sized>();
 struct NoGeneric<'a>(&'a u8);
 
 #[derive(CoercePointee)]
-//~^ ERROR: exactly one generic type parameter must be marked as #[pointee] to derive CoercePointee traits
+//~^ ERROR: exactly one generic type parameter must be marked as `#[pointee]` to derive `CoercePointee` traits
 #[repr(transparent)]
 struct AmbiguousPointee<'a, T1: ?Sized, T2: ?Sized> {
     a: (&'a T1, &'a T2),
@@ -38,7 +38,7 @@ struct AmbiguousPointee<'a, T1: ?Sized, T2: ?Sized> {
 #[derive(CoercePointee)]
 #[repr(transparent)]
 struct TooManyPointees<'a, #[pointee] A: ?Sized, #[pointee] B: ?Sized>((&'a A, &'a B));
-//~^ ERROR: only one type parameter can be marked as `#[pointee]` when deriving CoercePointee traits
+//~^ ERROR: only one type parameter can be marked as `#[pointee]` when deriving `CoercePointee` traits
 
 #[derive(CoercePointee)]
 //~^ ERROR: `CoercePointee` can only be derived on `struct`s with `#[repr(transparent)]`
@@ -49,7 +49,7 @@ struct NotTransparent<'a, #[pointee] T: ?Sized> {
 #[derive(CoercePointee)]
 #[repr(transparent)]
 struct NoMaybeSized<'a, #[pointee] T> {
-    //~^ ERROR: `derive(CoercePointee)` requires T to be marked `?Sized`
+    //~^ ERROR: `derive(CoercePointee)` requires `T` to be marked `?Sized`
     ptr: &'a T,
 }
 
diff --git a/tests/ui/deriving/deriving-coerce-pointee-neg.stderr b/tests/ui/deriving/deriving-coerce-pointee-neg.stderr
index e590d636d0e..c1e8be49d37 100644
--- a/tests/ui/deriving/deriving-coerce-pointee-neg.stderr
+++ b/tests/ui/deriving/deriving-coerce-pointee-neg.stderr
@@ -30,7 +30,7 @@ LL | #[derive(CoercePointee)]
    |
    = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: exactly one generic type parameter must be marked as #[pointee] to derive CoercePointee traits
+error: exactly one generic type parameter must be marked as `#[pointee]` to derive `CoercePointee` traits
   --> $DIR/deriving-coerce-pointee-neg.rs:31:10
    |
 LL | #[derive(CoercePointee)]
@@ -38,11 +38,11 @@ LL | #[derive(CoercePointee)]
    |
    = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: only one type parameter can be marked as `#[pointee]` when deriving CoercePointee traits
+error: only one type parameter can be marked as `#[pointee]` when deriving `CoercePointee` traits
   --> $DIR/deriving-coerce-pointee-neg.rs:40:39
    |
 LL | struct TooManyPointees<'a, #[pointee] A: ?Sized, #[pointee] B: ?Sized>((&'a A, &'a B));
-   |                                       ^                     ^
+   |                                       ^                     - here another type parameter is marked as `#[pointee]`
 
 error: `CoercePointee` can only be derived on `struct`s with `#[repr(transparent)]`
   --> $DIR/deriving-coerce-pointee-neg.rs:43:10
@@ -52,7 +52,7 @@ LL | #[derive(CoercePointee)]
    |
    = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: `derive(CoercePointee)` requires T to be marked `?Sized`
+error: `derive(CoercePointee)` requires `T` to be marked `?Sized`
   --> $DIR/deriving-coerce-pointee-neg.rs:51:36
    |
 LL | struct NoMaybeSized<'a, #[pointee] T> {
diff --git a/tests/ui/extern/extern-compare-with-return-type.rs b/tests/ui/extern/extern-compare-with-return-type.rs
index 316e8b2fc73..7d1027d5e77 100644
--- a/tests/ui/extern/extern-compare-with-return-type.rs
+++ b/tests/ui/extern/extern-compare-with-return-type.rs
@@ -2,6 +2,7 @@
 
 // Tests that we can compare various kinds of extern fn signatures.
 #![allow(non_camel_case_types)]
+#![allow(unpredictable_function_pointer_comparisons)]
 
 // `dbg!()` differentiates these functions to ensure they won't be merged.
 extern "C" fn voidret1() { dbg!() }
diff --git a/tests/ui/extern/extern-take-value.rs b/tests/ui/extern/extern-take-value.rs
index 56ed3328614..f3df82b2610 100644
--- a/tests/ui/extern/extern-take-value.rs
+++ b/tests/ui/extern/extern-take-value.rs
@@ -1,6 +1,8 @@
 //@ run-pass
 //@ aux-build:extern-take-value.rs
 
+#![allow(unpredictable_function_pointer_comparisons)]
+
 extern crate extern_take_value;
 
 pub fn main() {
diff --git a/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs b/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs
index 2e1c863e0f4..3ec958f2ebf 100644
--- a/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs
+++ b/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs
@@ -1,6 +1,8 @@
 //@ compile-flags: -C opt-level=3
 //@ run-pass
 
+#![allow(unpredictable_function_pointer_comparisons)]
+
 fn foo(_i: i32) -> i32 {
     1
 }
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr
index 72646b7bc76..9e04e90a98a 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr
@@ -1,5 +1,5 @@
 error[E0284]: type annotations needed: cannot satisfy `Foo == _`
-  --> $DIR/norm-before-method-resolution-opaque-type.rs:16:19
+  --> $DIR/norm-before-method-resolution-opaque-type.rs:15:19
    |
 LL | fn weird_bound<X>(x: &<X as Trait<'static>>::Out<Foo>) -> X
    |                   ^ cannot satisfy `Foo == _`
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr
index dbd0d5dc733..479f5984355 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr
@@ -1,5 +1,5 @@
 error: item does not constrain `Foo::{opaque#0}`, but has it in its signature
-  --> $DIR/norm-before-method-resolution-opaque-type.rs:16:4
+  --> $DIR/norm-before-method-resolution-opaque-type.rs:15:4
    |
 LL | fn weird_bound<X>(x: &<X as Trait<'static>>::Out<Foo>) -> X
    |    ^^^^^^^^^^^
@@ -11,16 +11,8 @@ note: this opaque type is in the signature
 LL | type Foo = impl Sized;
    |            ^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/norm-before-method-resolution-opaque-type.rs:13:12
-   |
-LL | type Foo = impl Sized;
-   |            ^^^^^^^^^^
-   |
-   = note: `Foo` must be used in combination with a concrete type within the same module
-
 error[E0507]: cannot move out of `*x` which is behind a shared reference
-  --> $DIR/norm-before-method-resolution-opaque-type.rs:23:13
+  --> $DIR/norm-before-method-resolution-opaque-type.rs:22:13
    |
 LL |     let x = *x;
    |             ^^ move occurs because `*x` has type `<X as Trait<'_>>::Out<Foo>`, which does not implement the `Copy` trait
@@ -31,6 +23,6 @@ LL -     let x = *x;
 LL +     let x = x;
    |
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs
index cf752f814c9..ffbfc622bb0 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs
@@ -11,7 +11,6 @@ impl<'a, T> Trait<'a> for T {
 }
 
 type Foo = impl Sized;
-//[old]~^ ERROR: unconstrained opaque type
 
 fn weird_bound<X>(x: &<X as Trait<'static>>::Out<Foo>) -> X
 //[old]~^ ERROR: item does not constrain
diff --git a/tests/ui/impl-trait/issues/issue-86800.rs b/tests/ui/impl-trait/issues/issue-86800.rs
index 5a6959ad7e6..ff1d273ae48 100644
--- a/tests/ui/impl-trait/issues/issue-86800.rs
+++ b/tests/ui/impl-trait/issues/issue-86800.rs
@@ -23,7 +23,6 @@ struct Context {
 type TransactionResult<O> = Result<O, ()>;
 
 type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
-//~^ ERROR unconstrained opaque type
 
 fn execute_transaction_fut<'f, F, O>(
     //~^ ERROR: item does not constrain
diff --git a/tests/ui/impl-trait/issues/issue-86800.stderr b/tests/ui/impl-trait/issues/issue-86800.stderr
index 095f648143c..fd9b8e7ac99 100644
--- a/tests/ui/impl-trait/issues/issue-86800.stderr
+++ b/tests/ui/impl-trait/issues/issue-86800.stderr
@@ -1,5 +1,5 @@
 error: item does not constrain `TransactionFuture::{opaque#0}`, but has it in its signature
-  --> $DIR/issue-86800.rs:28:4
+  --> $DIR/issue-86800.rs:27:4
    |
 LL | fn execute_transaction_fut<'f, F, O>(
    |    ^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,7 +12,7 @@ LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResu
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: item does not constrain `TransactionFuture::{opaque#0}`, but has it in its signature
-  --> $DIR/issue-86800.rs:40:14
+  --> $DIR/issue-86800.rs:39:14
    |
 LL |     async fn do_transaction<O>(
    |              ^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResu
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: item does not constrain `TransactionFuture::{opaque#0}`, but has it in its signature
-  --> $DIR/issue-86800.rs:44:5
+  --> $DIR/issue-86800.rs:43:5
    |
 LL | /     {
 LL | |
@@ -43,16 +43,8 @@ note: this opaque type is in the signature
 LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/issue-86800.rs:25:34
-   |
-LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `TransactionFuture` must be used in combination with a concrete type within the same module
-
 error[E0792]: expected generic lifetime parameter, found `'_`
-  --> $DIR/issue-86800.rs:35:5
+  --> $DIR/issue-86800.rs:34:5
    |
 LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
    |                        --- this generic parameter must be used with a generic lifetime parameter
@@ -61,7 +53,7 @@ LL |     f
    |     ^
 
 error[E0792]: expected generic lifetime parameter, found `'_`
-  --> $DIR/issue-86800.rs:44:5
+  --> $DIR/issue-86800.rs:43:5
    |
 LL |   type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
    |                          --- this generic parameter must be used with a generic lifetime parameter
@@ -75,6 +67,6 @@ LL | |         f(&mut transaction).await
 LL | |     }
    | |_____^
 
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.rs b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.rs
index dc9424c3ca7..3f41c5984b4 100644
--- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.rs
+++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.rs
@@ -2,7 +2,6 @@
 
 mod a {
     type Foo = impl PartialEq<(Foo, i32)>;
-    //~^ ERROR: unconstrained opaque type
 
     struct Bar;
 
diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
index 6485aa20710..b127bf41800 100644
--- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
+++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
@@ -1,5 +1,5 @@
 error[E0053]: method `eq` has an incompatible type for trait
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:10:30
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:9:30
    |
 LL |     type Foo = impl PartialEq<(Foo, i32)>;
    |                -------------------------- the found opaque type
@@ -15,7 +15,7 @@ LL |         fn eq(&self, _other: &(a::Bar, i32)) -> bool {
    |                              ~~~~~~~~~~~~~~
 
 error: item does not constrain `a::Foo::{opaque#0}`, but has it in its signature
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:10:12
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:9:12
    |
 LL |         fn eq(&self, _other: &(Foo, i32)) -> bool {
    |            ^^
@@ -27,16 +27,8 @@ note: this opaque type is in the signature
 LL |     type Foo = impl PartialEq<(Foo, i32)>;
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:4:16
-   |
-LL |     type Foo = impl PartialEq<(Foo, i32)>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `Foo` must be used in combination with a concrete type within the same module
-
 error[E0053]: method `eq` has an incompatible type for trait
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:25:30
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:24:30
    |
 LL |     type Foo = impl PartialEq<(Foo, i32)>;
    |                -------------------------- the expected opaque type
@@ -47,7 +39,7 @@ LL |         fn eq(&self, _other: &(Bar, i32)) -> bool {
    = note: expected signature `fn(&b::Bar, &(b::Foo, _)) -> _`
               found signature `fn(&b::Bar, &(b::Bar, _)) -> _`
 note: this item must have the opaque type in its signature in order to be able to register hidden types
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:25:12
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:24:12
    |
 LL |         fn eq(&self, _other: &(Bar, i32)) -> bool {
    |            ^^
@@ -57,13 +49,13 @@ LL |         fn eq(&self, _other: &(b::Foo, i32)) -> bool {
    |                              ~~~~~~~~~~~~~~
 
 error: unconstrained opaque type
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:19:16
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:18:16
    |
 LL |     type Foo = impl PartialEq<(Foo, i32)>;
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `Foo` must be used in combination with a concrete type within the same module
 
-error: aborting due to 5 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr b/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr
index b70676ece0e..7d02a0606fc 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr
+++ b/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr
@@ -11,14 +11,6 @@ note: this opaque type is in the signature
 LL | type A = impl Foo;
    |          ^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/two_tait_defining_each_other2.rs:6:10
-   |
-LL | type A = impl Foo;
-   |          ^^^^^^^^
-   |
-   = note: `A` must be used in combination with a concrete type within the same module
-
 error: opaque type's hidden type cannot be another opaque type from the same scope
   --> $DIR/two_tait_defining_each_other2.rs:14:5
    |
@@ -36,5 +28,5 @@ note: opaque type being used as hidden type
 LL | type A = impl Foo;
    |          ^^^^^^^^
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.rs b/tests/ui/impl-trait/two_tait_defining_each_other2.rs
index 3311c556568..1681b019418 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other2.rs
+++ b/tests/ui/impl-trait/two_tait_defining_each_other2.rs
@@ -3,7 +3,7 @@
 //@[next] compile-flags: -Znext-solver
 #![feature(type_alias_impl_trait)]
 
-type A = impl Foo; //[current]~ ERROR unconstrained opaque type
+type A = impl Foo;
 type B = impl Foo;
 
 trait Foo {}
diff --git a/tests/ui/inline-const/const-match-pat-generic.rs b/tests/ui/inline-const/const-match-pat-generic.rs
index 9d76fc2ad65..889c015e9ac 100644
--- a/tests/ui/inline-const/const-match-pat-generic.rs
+++ b/tests/ui/inline-const/const-match-pat-generic.rs
@@ -5,7 +5,7 @@
 fn foo<const V: usize>() {
     match 0 {
         const { V } => {},
-        //~^ ERROR constant pattern depends on a generic parameter
+        //~^ ERROR constant pattern cannot depend on generic parameters
         _ => {},
     }
 }
@@ -17,7 +17,7 @@ const fn f(x: usize) -> usize {
 fn bar<const V: usize>() {
     match 0 {
         const { f(V) } => {},
-        //~^ ERROR constant pattern depends on a generic parameter
+        //~^ ERROR constant pattern cannot depend on generic parameters
         _ => {},
     }
 }
diff --git a/tests/ui/inline-const/const-match-pat-generic.stderr b/tests/ui/inline-const/const-match-pat-generic.stderr
index 26f72b34eca..7d9e1d9e407 100644
--- a/tests/ui/inline-const/const-match-pat-generic.stderr
+++ b/tests/ui/inline-const/const-match-pat-generic.stderr
@@ -1,14 +1,14 @@
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/const-match-pat-generic.rs:7:9
    |
 LL |         const { V } => {},
-   |         ^^^^^^^^^^^
+   |         ^^^^^^^^^^^ `const` depends on a generic parameter
 
-error[E0158]: constant pattern depends on a generic parameter
+error[E0158]: constant pattern cannot depend on generic parameters
   --> $DIR/const-match-pat-generic.rs:19:9
    |
 LL |         const { f(V) } => {},
-   |         ^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^ `const` depends on a generic parameter
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/inline-const/pat-match-fndef.stderr b/tests/ui/inline-const/pat-match-fndef.stderr
index b189ec51ade..220437a0491 100644
--- a/tests/ui/inline-const/pat-match-fndef.stderr
+++ b/tests/ui/inline-const/pat-match-fndef.stderr
@@ -1,8 +1,8 @@
-error: `fn() {uwu}` cannot be used in patterns
+error: fn item `fn() {uwu}` cannot be used in patterns
   --> $DIR/pat-match-fndef.rs:8:9
    |
 LL |         const { uwu } => {}
-   |         ^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^ fn item can't be used in patterns
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-54696.rs b/tests/ui/issues/issue-54696.rs
index 75b1824f0b3..63ffbe42bcc 100644
--- a/tests/ui/issues/issue-54696.rs
+++ b/tests/ui/issues/issue-54696.rs
@@ -1,5 +1,7 @@
 //@ run-pass
 
+#![allow(unpredictable_function_pointer_comparisons)]
+
 fn main() {
     // We shouldn't promote this
     let _ = &(main as fn() == main as fn());
diff --git a/tests/ui/lint/fn-ptr-comparisons-weird.rs b/tests/ui/lint/fn-ptr-comparisons-weird.rs
new file mode 100644
index 00000000000..171fbfb8727
--- /dev/null
+++ b/tests/ui/lint/fn-ptr-comparisons-weird.rs
@@ -0,0 +1,15 @@
+//@ check-pass
+
+fn main() {
+    let f: fn() = main;
+    let g: fn() = main;
+
+    let _ = f > g;
+    //~^ WARN function pointer comparisons
+    let _ = f >= g;
+    //~^ WARN function pointer comparisons
+    let _ = f <= g;
+    //~^ WARN function pointer comparisons
+    let _ = f < g;
+    //~^ WARN function pointer comparisons
+}
diff --git a/tests/ui/lint/fn-ptr-comparisons-weird.stderr b/tests/ui/lint/fn-ptr-comparisons-weird.stderr
new file mode 100644
index 00000000000..f2371663922
--- /dev/null
+++ b/tests/ui/lint/fn-ptr-comparisons-weird.stderr
@@ -0,0 +1,43 @@
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons-weird.rs:7:13
+   |
+LL |     let _ = f > g;
+   |             ^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+   = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons-weird.rs:9:13
+   |
+LL |     let _ = f >= g;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons-weird.rs:11:13
+   |
+LL |     let _ = f <= g;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons-weird.rs:13:13
+   |
+LL |     let _ = f < g;
+   |             ^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+
+warning: 4 warnings emitted
+
diff --git a/tests/ui/lint/fn-ptr-comparisons.fixed b/tests/ui/lint/fn-ptr-comparisons.fixed
new file mode 100644
index 00000000000..22f16177a04
--- /dev/null
+++ b/tests/ui/lint/fn-ptr-comparisons.fixed
@@ -0,0 +1,58 @@
+//@ check-pass
+//@ run-rustfix
+
+extern "C" {
+    fn test();
+}
+
+fn a() {}
+
+extern "C" fn c() {}
+
+extern "C" fn args(_a: i32) -> i32 { 0 }
+
+#[derive(PartialEq, Eq)]
+struct A {
+    f: fn(),
+}
+
+fn main() {
+    let f: fn() = a;
+    let g: fn() = f;
+
+    let a1 = A { f };
+    let a2 = A { f };
+
+    let _ = std::ptr::fn_addr_eq(f, a as fn());
+    //~^ WARN function pointer comparisons
+    let _ = !std::ptr::fn_addr_eq(f, a as fn());
+    //~^ WARN function pointer comparisons
+    let _ = std::ptr::fn_addr_eq(f, g);
+    //~^ WARN function pointer comparisons
+    let _ = std::ptr::fn_addr_eq(f, f);
+    //~^ WARN function pointer comparisons
+    let _ = std::ptr::fn_addr_eq(g, g);
+    //~^ WARN function pointer comparisons
+    let _ = std::ptr::fn_addr_eq(g, g);
+    //~^ WARN function pointer comparisons
+    let _ = std::ptr::fn_addr_eq(g, g);
+    //~^ WARN function pointer comparisons
+    let _ = std::ptr::fn_addr_eq(a as fn(), g);
+    //~^ WARN function pointer comparisons
+
+    let cfn: extern "C" fn() = c;
+    let _ = std::ptr::fn_addr_eq(cfn, c as extern "C" fn());
+    //~^ WARN function pointer comparisons
+
+    let argsfn: extern "C" fn(i32) -> i32 = args;
+    let _ = std::ptr::fn_addr_eq(argsfn, args as extern "C" fn(i32) -> i32);
+    //~^ WARN function pointer comparisons
+
+    let t: unsafe extern "C" fn() = test;
+    let _ = std::ptr::fn_addr_eq(t, test as unsafe extern "C" fn());
+    //~^ WARN function pointer comparisons
+
+    let _ = a1 == a2; // should not warn
+    let _ = std::ptr::fn_addr_eq(a1.f, a2.f);
+    //~^ WARN function pointer comparisons
+}
diff --git a/tests/ui/lint/fn-ptr-comparisons.rs b/tests/ui/lint/fn-ptr-comparisons.rs
new file mode 100644
index 00000000000..90a8ab5c926
--- /dev/null
+++ b/tests/ui/lint/fn-ptr-comparisons.rs
@@ -0,0 +1,58 @@
+//@ check-pass
+//@ run-rustfix
+
+extern "C" {
+    fn test();
+}
+
+fn a() {}
+
+extern "C" fn c() {}
+
+extern "C" fn args(_a: i32) -> i32 { 0 }
+
+#[derive(PartialEq, Eq)]
+struct A {
+    f: fn(),
+}
+
+fn main() {
+    let f: fn() = a;
+    let g: fn() = f;
+
+    let a1 = A { f };
+    let a2 = A { f };
+
+    let _ = f == a;
+    //~^ WARN function pointer comparisons
+    let _ = f != a;
+    //~^ WARN function pointer comparisons
+    let _ = f == g;
+    //~^ WARN function pointer comparisons
+    let _ = f == f;
+    //~^ WARN function pointer comparisons
+    let _ = g == g;
+    //~^ WARN function pointer comparisons
+    let _ = g == g;
+    //~^ WARN function pointer comparisons
+    let _ = &g == &g;
+    //~^ WARN function pointer comparisons
+    let _ = a as fn() == g;
+    //~^ WARN function pointer comparisons
+
+    let cfn: extern "C" fn() = c;
+    let _ = cfn == c;
+    //~^ WARN function pointer comparisons
+
+    let argsfn: extern "C" fn(i32) -> i32 = args;
+    let _ = argsfn == args;
+    //~^ WARN function pointer comparisons
+
+    let t: unsafe extern "C" fn() = test;
+    let _ = t == test;
+    //~^ WARN function pointer comparisons
+
+    let _ = a1 == a2; // should not warn
+    let _ = a1.f == a2.f;
+    //~^ WARN function pointer comparisons
+}
diff --git a/tests/ui/lint/fn-ptr-comparisons.stderr b/tests/ui/lint/fn-ptr-comparisons.stderr
new file mode 100644
index 00000000000..eaba23a461a
--- /dev/null
+++ b/tests/ui/lint/fn-ptr-comparisons.stderr
@@ -0,0 +1,171 @@
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:26:13
+   |
+LL |     let _ = f == a;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+   = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(f, a as fn());
+   |             +++++++++++++++++++++ ~   ++++++++
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:28:13
+   |
+LL |     let _ = f != a;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = !std::ptr::fn_addr_eq(f, a as fn());
+   |             ++++++++++++++++++++++ ~   ++++++++
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:30:13
+   |
+LL |     let _ = f == g;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(f, g);
+   |             +++++++++++++++++++++ ~  +
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:32:13
+   |
+LL |     let _ = f == f;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(f, f);
+   |             +++++++++++++++++++++ ~  +
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:34:13
+   |
+LL |     let _ = g == g;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(g, g);
+   |             +++++++++++++++++++++ ~  +
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:36:13
+   |
+LL |     let _ = g == g;
+   |             ^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(g, g);
+   |             +++++++++++++++++++++ ~  +
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:38:13
+   |
+LL |     let _ = &g == &g;
+   |             ^^^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(g, g);
+   |             ~~~~~~~~~~~~~~~~~~~~~ ~  +
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:40:13
+   |
+LL |     let _ = a as fn() == g;
+   |             ^^^^^^^^^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(a as fn(), g);
+   |             +++++++++++++++++++++         ~  +
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:44:13
+   |
+LL |     let _ = cfn == c;
+   |             ^^^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(cfn, c as extern "C" fn());
+   |             +++++++++++++++++++++   ~   +++++++++++++++++++
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:48:13
+   |
+LL |     let _ = argsfn == args;
+   |             ^^^^^^^^^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(argsfn, args as extern "C" fn(i32) -> i32);
+   |             +++++++++++++++++++++      ~      +++++++++++++++++++++++++++++
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:52:13
+   |
+LL |     let _ = t == test;
+   |             ^^^^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(t, test as unsafe extern "C" fn());
+   |             +++++++++++++++++++++ ~      ++++++++++++++++++++++++++
+
+warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
+  --> $DIR/fn-ptr-comparisons.rs:56:13
+   |
+LL |     let _ = a1.f == a2.f;
+   |             ^^^^^^^^^^^^
+   |
+   = note: the address of the same function can vary between different codegen units
+   = note: furthermore, different functions could have the same address after being merged together
+   = note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
+help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
+   |
+LL |     let _ = std::ptr::fn_addr_eq(a1.f, a2.f);
+   |             +++++++++++++++++++++    ~     +
+
+warning: 12 warnings emitted
+
diff --git a/tests/ui/match/issue-70972-dyn-trait.stderr b/tests/ui/match/issue-70972-dyn-trait.stderr
index b0af50f8599..cec9c8539f4 100644
--- a/tests/ui/match/issue-70972-dyn-trait.stderr
+++ b/tests/ui/match/issue-70972-dyn-trait.stderr
@@ -1,8 +1,11 @@
-error: `dyn Send` cannot be used in patterns
+error: trait object `dyn Send` cannot be used in patterns
   --> $DIR/issue-70972-dyn-trait.rs:6:9
    |
+LL | const F: &'static dyn Send = &7u32;
+   | -------------------------- constant defined here
+...
 LL |         F => panic!(),
-   |         ^
+   |         ^ trait object can't be used in patterns
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/match/issue-72896-non-partial-eq-const.rs b/tests/ui/match/issue-72896-non-partial-eq-const.rs
index f15eae83896..e4fc1ac057d 100644
--- a/tests/ui/match/issue-72896-non-partial-eq-const.rs
+++ b/tests/ui/match/issue-72896-non-partial-eq-const.rs
@@ -16,7 +16,7 @@ const CONST_SET: EnumSet<Enum8> = EnumSet { __enumset_underlying: 3 };
 
 fn main() {
     match CONST_SET {
-        CONST_SET => { /* ok */ } //~ERROR: must implement `PartialEq`
+        CONST_SET => { /* ok */ } //~ ERROR constant of non-structural type `EnumSet<Enum8>` in a pattern
         _ => panic!("match fell through?"),
     }
 }
diff --git a/tests/ui/match/issue-72896-non-partial-eq-const.stderr b/tests/ui/match/issue-72896-non-partial-eq-const.stderr
index 4155586c160..1f82d3e822a 100644
--- a/tests/ui/match/issue-72896-non-partial-eq-const.stderr
+++ b/tests/ui/match/issue-72896-non-partial-eq-const.stderr
@@ -1,8 +1,16 @@
-error: to use a constant of type `EnumSet<Enum8>` in a pattern, the type must implement `PartialEq`
+error: constant of non-structural type `EnumSet<Enum8>` in a pattern
   --> $DIR/issue-72896-non-partial-eq-const.rs:19:9
    |
+LL | enum Enum8 { }
+   | ---------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const CONST_SET: EnumSet<Enum8> = EnumSet { __enumset_underlying: 3 };
+   | ------------------------------- constant defined here
+...
 LL |         CONST_SET => { /* ok */ }
-   |         ^^^^^^^^^
+   |         ^^^^^^^^^ constant of non-structural type
+   |
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs b/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs
index 44b7fae351c..45d519739eb 100644
--- a/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs
+++ b/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs
@@ -1,6 +1,8 @@
 //@ check-pass
 //@ compile-flags: -Zvalidate-mir
 
+#![allow(unpredictable_function_pointer_comparisons)]
+
 fn foo(_a: &str) {}
 
 fn main() {
diff --git a/tests/ui/parser/typed-self-param.rs b/tests/ui/parser/typed-self-param.rs
new file mode 100644
index 00000000000..e3d85ab891b
--- /dev/null
+++ b/tests/ui/parser/typed-self-param.rs
@@ -0,0 +1,14 @@
+struct S;
+
+impl S {
+    fn a(&self: Self) {}
+    //~^ ERROR type not allowed for shorthand `self` parameter
+    fn b(&mut self: Self) {}
+    //~^ ERROR type not allowed for shorthand `self` parameter
+    fn c<'c>(&'c mut self: Self) {}
+    //~^ ERROR type not allowed for shorthand `self` parameter
+    fn d<'d>(&'d self: Self) {}
+    //~^ ERROR type not allowed for shorthand `self` parameter
+}
+
+fn main() {}
diff --git a/tests/ui/parser/typed-self-param.stderr b/tests/ui/parser/typed-self-param.stderr
new file mode 100644
index 00000000000..c1ecd3b7fef
--- /dev/null
+++ b/tests/ui/parser/typed-self-param.stderr
@@ -0,0 +1,50 @@
+error: type not allowed for shorthand `self` parameter
+  --> $DIR/typed-self-param.rs:4:17
+   |
+LL |     fn a(&self: Self) {}
+   |                 ^^^^
+   |
+help: move the modifiers on `self` to the type
+   |
+LL -     fn a(&self: Self) {}
+LL +     fn a(self: &Self) {}
+   |
+
+error: type not allowed for shorthand `self` parameter
+  --> $DIR/typed-self-param.rs:6:21
+   |
+LL |     fn b(&mut self: Self) {}
+   |                     ^^^^
+   |
+help: move the modifiers on `self` to the type
+   |
+LL -     fn b(&mut self: Self) {}
+LL +     fn b(self: &mut Self) {}
+   |
+
+error: type not allowed for shorthand `self` parameter
+  --> $DIR/typed-self-param.rs:8:28
+   |
+LL |     fn c<'c>(&'c mut self: Self) {}
+   |                            ^^^^
+   |
+help: move the modifiers on `self` to the type
+   |
+LL -     fn c<'c>(&'c mut self: Self) {}
+LL +     fn c<'c>(self: &'c mut Self) {}
+   |
+
+error: type not allowed for shorthand `self` parameter
+  --> $DIR/typed-self-param.rs:10:24
+   |
+LL |     fn d<'d>(&'d self: Self) {}
+   |                        ^^^^
+   |
+help: move the modifiers on `self` to the type
+   |
+LL -     fn d<'d>(&'d self: Self) {}
+LL +     fn d<'d>(self: &'d Self) {}
+   |
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/pattern/issue-115599.rs b/tests/ui/pattern/issue-115599.rs
index 1521d728d95..47fe6b87da9 100644
--- a/tests/ui/pattern/issue-115599.rs
+++ b/tests/ui/pattern/issue-115599.rs
@@ -3,5 +3,5 @@ const CONST_STRING: String = String::new();
 fn main() {
     let empty_str = String::from("");
     if let CONST_STRING = empty_str {}
-    //~^ ERROR to use a constant of type `Vec<u8>` in a pattern, `Vec<u8>` must be annotated with `#[derive(PartialEq)]`
+    //~^ ERROR constant of non-structural type `Vec<u8>` in a pattern
 }
diff --git a/tests/ui/pattern/issue-115599.stderr b/tests/ui/pattern/issue-115599.stderr
index adab4e4d241..69d10728ccd 100644
--- a/tests/ui/pattern/issue-115599.stderr
+++ b/tests/ui/pattern/issue-115599.stderr
@@ -1,10 +1,15 @@
-error: to use a constant of type `Vec<u8>` in a pattern, `Vec<u8>` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `Vec<u8>` in a pattern
   --> $DIR/issue-115599.rs:5:12
    |
+LL | const CONST_STRING: String = String::new();
+   | -------------------------- constant defined here
+...
 LL |     if let CONST_STRING = empty_str {}
-   |            ^^^^^^^^^^^^
+   |            ^^^^^^^^^^^^ constant of non-structural type
+  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+   |
+   = note: `Vec<u8>` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/issue-72565.stderr b/tests/ui/pattern/issue-72565.stderr
index b503a17fe84..e2927ada0f7 100644
--- a/tests/ui/pattern/issue-72565.stderr
+++ b/tests/ui/pattern/issue-72565.stderr
@@ -1,8 +1,11 @@
-error: `dyn PartialEq<u32>` cannot be used in patterns
+error: trait object `dyn PartialEq<u32>` cannot be used in patterns
   --> $DIR/issue-72565.rs:6:9
    |
+LL | const F: &'static dyn PartialEq<u32> = &7u32;
+   | ------------------------------------ constant defined here
+...
 LL |         F => panic!(),
-   |         ^
+   |         ^ trait object can't be used in patterns
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/pattern/non-constant-in-const-path.stderr b/tests/ui/pattern/non-constant-in-const-path.stderr
index 53c3974f780..2ba4963e6dc 100644
--- a/tests/ui/pattern/non-constant-in-const-path.stderr
+++ b/tests/ui/pattern/non-constant-in-const-path.stderr
@@ -2,25 +2,31 @@ error[E0080]: runtime values cannot be referenced in patterns
   --> $DIR/non-constant-in-const-path.rs:8:15
    |
 LL |     let 0u8..=x = 0;
-   |               ^
+   |               ^ references a runtime value
 
 error[E0158]: statics cannot be referenced in patterns
   --> $DIR/non-constant-in-const-path.rs:10:15
    |
+LL | static FOO: u8 = 10;
+   | -------------- `static` defined here
+...
 LL |     let 0u8..=FOO = 0;
-   |               ^^^
+   |               ^^^ can't be used in patterns
 
 error[E0080]: runtime values cannot be referenced in patterns
   --> $DIR/non-constant-in-const-path.rs:13:15
    |
 LL |         0 ..= x => {}
-   |               ^
+   |               ^ references a runtime value
 
 error[E0158]: statics cannot be referenced in patterns
   --> $DIR/non-constant-in-const-path.rs:15:15
    |
+LL | static FOO: u8 = 10;
+   | -------------- `static` defined here
+...
 LL |         0 ..= FOO => {}
-   |               ^^^
+   |               ^^^ can't be used in patterns
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/pattern/non-structural-match-types.stderr b/tests/ui/pattern/non-structural-match-types.stderr
index 9075cf40dda..3588751bf66 100644
--- a/tests/ui/pattern/non-structural-match-types.stderr
+++ b/tests/ui/pattern/non-structural-match-types.stderr
@@ -1,14 +1,14 @@
-error: `{closure@$DIR/non-structural-match-types.rs:9:17: 9:19}` cannot be used in patterns
+error: closure `{closure@$DIR/non-structural-match-types.rs:9:17: 9:19}` cannot be used in patterns
   --> $DIR/non-structural-match-types.rs:9:9
    |
 LL |         const { || {} } => {}
-   |         ^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^ closure can't be used in patterns
 
-error: `{async block@$DIR/non-structural-match-types.rs:12:17: 12:22}` cannot be used in patterns
+error: `async` block `{async block@$DIR/non-structural-match-types.rs:12:17: 12:22}` cannot be used in patterns
   --> $DIR/non-structural-match-types.rs:12:9
    |
 LL |         const { async {} } => {}
-   |         ^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^ `async` block can't be used in patterns
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.rs b/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.rs
index f34093ef149..f09dcf8498f 100644
--- a/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.rs
+++ b/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.rs
@@ -12,7 +12,7 @@ const CONSTANT: &&MyType = &&MyType;
 
 fn main() {
     if let CONSTANT = &&MyType {
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `MyType` in a pattern
         println!("did match!");
     }
 }
diff --git a/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr b/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr
index 0b4d9972758..f9da0430f2e 100644
--- a/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr
+++ b/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `MyType` in a pattern, `MyType` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `MyType` in a pattern
   --> $DIR/const-partial_eq-fallback-ice.rs:14:12
    |
+LL | struct MyType;
+   | ------------- `MyType` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const CONSTANT: &&MyType = &&MyType;
+   | ------------------------ constant defined here
+...
 LL |     if let CONSTANT = &&MyType {
-   |            ^^^^^^^^
+   |            ^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/const-partial_eq-fallback-ice.rs:5:1
+   |
+LL | impl PartialEq<usize> for MyType {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/pattern/usefulness/consts-opaque.stderr b/tests/ui/pattern/usefulness/consts-opaque.stderr
index 32d385eecb4..d52451d9438 100644
--- a/tests/ui/pattern/usefulness/consts-opaque.stderr
+++ b/tests/ui/pattern/usefulness/consts-opaque.stderr
@@ -1,50 +1,90 @@
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:96:9
    |
+LL |     const QUUX: Quux = quux;
+   |     ---------------- constant defined here
+...
 LL |         QUUX => {}
-   |         ^^^^
+   |         ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:97:9
    |
+LL |     const QUUX: Quux = quux;
+   |     ---------------- constant defined here
+...
 LL |         QUUX => {}
-   |         ^^^^
+   |         ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:106:9
    |
+LL |     const WRAPQUUX: Wrap<Quux> = Wrap(quux);
+   |     -------------------------- constant defined here
+...
 LL |         WRAPQUUX => {}
-   |         ^^^^^^^^
+   |         ^^^^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:107:9
    |
+LL |     const WRAPQUUX: Wrap<Quux> = Wrap(quux);
+   |     -------------------------- constant defined here
+...
 LL |         WRAPQUUX => {}
-   |         ^^^^^^^^
+   |         ^^^^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:113:9
    |
+LL |     const WRAPQUUX: Wrap<Quux> = Wrap(quux);
+   |     -------------------------- constant defined here
+...
 LL |         WRAPQUUX => {}
-   |         ^^^^^^^^
+   |         ^^^^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:121:9
    |
+LL |     const WRAPQUUX: Wrap<Quux> = Wrap(quux);
+   |     -------------------------- constant defined here
+...
 LL |         WRAPQUUX => {}
-   |         ^^^^^^^^
+   |         ^^^^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:132:9
    |
+LL |     const WHOKNOWSQUUX: WhoKnows<Quux> = WhoKnows::Yay(quux);
+   |     ---------------------------------- constant defined here
+...
 LL |         WHOKNOWSQUUX => {}
-   |         ^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/consts-opaque.rs:134:9
    |
+LL |     const WHOKNOWSQUUX: WhoKnows<Quux> = WhoKnows::Yay(quux);
+   |     ---------------------------------- constant defined here
+...
 LL |         WHOKNOWSQUUX => {}
-   |         ^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
 error: unreachable pattern
   --> $DIR/consts-opaque.rs:48:9
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs
index 65a85a5ed68..e27c8048049 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs
@@ -20,7 +20,7 @@ const WRAP_DIRECT_INLINE: WrapInline = WrapInline(NoDerive(0));
 fn main() {
     match WRAP_DIRECT_INLINE {
         WRAP_DIRECT_INLINE => { panic!("WRAP_DIRECT_INLINE matched itself"); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `NoDerive` in a pattern
         _ => { println!("WRAP_DIRECT_INLINE did not match itself"); }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr
index cc5d4106331..8787d140e17 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `NoDerive` in a pattern
   --> $DIR/cant-hide-behind-direct-struct-embedded.rs:22:9
    |
+LL | struct NoDerive(#[allow(dead_code)] i32);
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const WRAP_DIRECT_INLINE: WrapInline = WrapInline(NoDerive(0));
+   | ------------------------------------ constant defined here
+...
 LL |         WRAP_DIRECT_INLINE => { panic!("WRAP_DIRECT_INLINE matched itself"); }
-   |         ^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/cant-hide-behind-direct-struct-embedded.rs:11:1
+   |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.rs
index f840b4040b6..713ff23573d 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.rs
@@ -19,7 +19,7 @@ const WRAP_DIRECT_PARAM: WrapParam<NoDerive> = WrapParam(NoDerive(0));
 fn main() {
     match WRAP_DIRECT_PARAM {
         WRAP_DIRECT_PARAM => { panic!("WRAP_DIRECT_PARAM matched itself"); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `NoDerive` in a pattern
         _ => { println!("WRAP_DIRECT_PARAM did not match itself"); }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr
index 3d00ef2dfbf..ec836db02ad 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `NoDerive` in a pattern
   --> $DIR/cant-hide-behind-direct-struct-param.rs:21:9
    |
+LL | struct NoDerive(i32);
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const WRAP_DIRECT_PARAM: WrapParam<NoDerive> = WrapParam(NoDerive(0));
+   | -------------------------------------------- constant defined here
+...
 LL |         WRAP_DIRECT_PARAM => { panic!("WRAP_DIRECT_PARAM matched itself"); }
-   |         ^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/cant-hide-behind-direct-struct-param.rs:10:1
+   |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs
index 898acefc83c..7766a469192 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs
@@ -20,7 +20,7 @@ const WRAP_DOUBLY_INDIRECT_INLINE: & &WrapInline = & &WrapInline(& & NoDerive(0)
 fn main() {
     match WRAP_DOUBLY_INDIRECT_INLINE {
         WRAP_DOUBLY_INDIRECT_INLINE => { panic!("WRAP_DOUBLY_INDIRECT_INLINE matched itself"); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `NoDerive` in a pattern
         _ => { println!("WRAP_DOUBLY_INDIRECT_INLINE correctly did not match itself"); }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.stderr
index 3636307e16c..fdc16fe300c 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `NoDerive` in a pattern
   --> $DIR/cant-hide-behind-doubly-indirect-embedded.rs:22:9
    |
+LL | struct NoDerive(#[allow(dead_code)] i32);
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const WRAP_DOUBLY_INDIRECT_INLINE: & &WrapInline = & &WrapInline(& & NoDerive(0));
+   | ------------------------------------------------ constant defined here
+...
 LL |         WRAP_DOUBLY_INDIRECT_INLINE => { panic!("WRAP_DOUBLY_INDIRECT_INLINE matched itself"); }
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/cant-hide-behind-doubly-indirect-embedded.rs:11:1
+   |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs
index 7cbaada88a3..ed84900b6e9 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs
@@ -20,7 +20,7 @@ const WRAP_DOUBLY_INDIRECT_PARAM: & &WrapParam<NoDerive> = & &WrapParam(& & NoDe
 fn main() {
     match WRAP_DOUBLY_INDIRECT_PARAM {
         WRAP_DOUBLY_INDIRECT_PARAM => { panic!("WRAP_DOUBLY_INDIRECT_PARAM matched itself"); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `NoDerive` in a pattern
         _ => { println!("WRAP_DOUBLY_INDIRECT_PARAM correctly did not match itself"); }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.stderr
index 40fd31762b2..b46fc041f14 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `NoDerive` in a pattern
   --> $DIR/cant-hide-behind-doubly-indirect-param.rs:22:9
    |
+LL | struct NoDerive(#[allow(dead_code)] i32);
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const WRAP_DOUBLY_INDIRECT_PARAM: & &WrapParam<NoDerive> = & &WrapParam(& & NoDerive(0));
+   | -------------------------------------------------------- constant defined here
+...
 LL |         WRAP_DOUBLY_INDIRECT_PARAM => { panic!("WRAP_DOUBLY_INDIRECT_PARAM matched itself"); }
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/cant-hide-behind-doubly-indirect-param.rs:11:1
+   |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs
index ac868efed6f..5743d7a24d3 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs
@@ -20,7 +20,7 @@ const WRAP_INDIRECT_INLINE: & &WrapInline = & &WrapInline(NoDerive(0));
 fn main() {
     match WRAP_INDIRECT_INLINE {
         WRAP_INDIRECT_INLINE => { panic!("WRAP_INDIRECT_INLINE matched itself"); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `NoDerive` in a pattern
         _ => { println!("WRAP_INDIRECT_INLINE did not match itself"); }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.stderr
index dbf1848326a..70f39aa01d8 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `NoDerive` in a pattern
   --> $DIR/cant-hide-behind-indirect-struct-embedded.rs:22:9
    |
+LL | struct NoDerive(#[allow(dead_code)] i32);
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const WRAP_INDIRECT_INLINE: & &WrapInline = & &WrapInline(NoDerive(0));
+   | ----------------------------------------- constant defined here
+...
 LL |         WRAP_INDIRECT_INLINE => { panic!("WRAP_INDIRECT_INLINE matched itself"); }
-   |         ^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/cant-hide-behind-indirect-struct-embedded.rs:11:1
+   |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs
index cbfabec6819..9226f9c3ecd 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs
@@ -20,7 +20,7 @@ const WRAP_INDIRECT_PARAM: & &WrapParam<NoDerive> = & &WrapParam(NoDerive(0));
 fn main() {
     match WRAP_INDIRECT_PARAM {
         WRAP_INDIRECT_PARAM => { panic!("WRAP_INDIRECT_PARAM matched itself"); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `NoDerive` in a pattern
         _ => { println!("WRAP_INDIRECT_PARAM correctly did not match itself"); }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.stderr
index 58acc11a744..fceb3acb025 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
+error: constant of non-structural type `NoDerive` in a pattern
   --> $DIR/cant-hide-behind-indirect-struct-param.rs:22:9
    |
+LL | struct NoDerive(#[allow(dead_code)] i32);
+   | --------------- `NoDerive` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const WRAP_INDIRECT_PARAM: & &WrapParam<NoDerive> = & &WrapParam(NoDerive(0));
+   | ------------------------------------------------- constant defined here
+...
 LL |         WRAP_INDIRECT_PARAM => { panic!("WRAP_INDIRECT_PARAM matched itself"); }
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/cant-hide-behind-indirect-struct-param.rs:11:1
+   |
+LL | impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-not-structurally-matchable.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-not-structurally-matchable.stderr
index 0bc1e7fc89b..cdbe72ca48f 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-not-structurally-matchable.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-not-structurally-matchable.stderr
@@ -1,62 +1,112 @@
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:41:14
    |
+LL |     const CFN1: Wrap<fn()> = Wrap(trivial);
+   |     ---------------------- constant defined here
+...
 LL |         Wrap(CFN1) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:49:14
    |
+LL |     const CFN2: Wrap<fn(SM)> = Wrap(sm_to);
+   |     ------------------------ constant defined here
+...
 LL |         Wrap(CFN2) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:57:14
    |
+LL |     const CFN3: Wrap<fn() -> SM> = Wrap(to_sm);
+   |     ---------------------------- constant defined here
+...
 LL |         Wrap(CFN3) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:65:14
    |
+LL |     const CFN4: Wrap<fn(NotSM)> = Wrap(not_sm_to);
+   |     --------------------------- constant defined here
+...
 LL |         Wrap(CFN4) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:73:14
    |
+LL |     const CFN5: Wrap<fn() -> NotSM> = Wrap(to_not_sm);
+   |     ------------------------------- constant defined here
+...
 LL |         Wrap(CFN5) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:81:14
    |
+LL |     const CFN6: Wrap<fn(&SM)> = Wrap(r_sm_to);
+   |     ------------------------- constant defined here
+...
 LL |         Wrap(CFN6) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:89:14
    |
+LL |     const CFN7: Wrap<fn(&()) -> &SM> = Wrap(r_to_r_sm);
+   |     -------------------------------- constant defined here
+...
 LL |         Wrap(CFN7) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:97:14
    |
+LL |     const CFN8: Wrap<fn(&NotSM)> = Wrap(r_not_sm_to);
+   |     ---------------------------- constant defined here
+...
 LL |         Wrap(CFN8) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:105:14
    |
+LL |     const CFN9: Wrap<fn(&()) -> &NotSM> = Wrap(r_to_r_not_sm);
+   |     ----------------------------------- constant defined here
+...
 LL |         Wrap(CFN9) => count += 1,
-   |              ^^^^
+   |              ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/fn-ptr-is-not-structurally-matchable.rs:127:9
    |
+LL |     const CFOO: Foo = Foo {
+   |     --------------- constant defined here
+...
 LL |         CFOO => count += 1,
-   |         ^^^^
+   |         ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
 error: aborting due to 10 previous errors
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs
index c01f8934c75..95a3be517a9 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs
@@ -12,8 +12,7 @@ const A: &[B] = &[];
 
 pub fn main() {
     match &[][..] {
-        A => (),
-        //~^ ERROR must implement `PartialEq`
+        A => (), //~ ERROR constant of non-structural type `&[B]` in a pattern
         _ => (),
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
index 736e4c30c8a..7d3b37686b8 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
@@ -1,8 +1,16 @@
-error: to use a constant of type `&[B]` in a pattern, the type must implement `PartialEq`
+error: constant of non-structural type `&[B]` in a pattern
   --> $DIR/issue-61188-match-slice-forbidden-without-eq.rs:15:9
    |
+LL | struct B(i32);
+   | -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+LL |
+LL | const A: &[B] = &[];
+   | ------------- constant defined here
+...
 LL |         A => (),
-   |         ^
+   |         ^ constant of non-structural type
+   |
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs
index 0fa2370c95b..843c5a38649 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs
@@ -13,27 +13,35 @@
 
 #[derive(Debug)]
 struct B(i32);
+//~^ NOTE `B` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+//~| NOTE `B` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
 
 // Overriding `PartialEq` to use this strange notion of "equality" exposes
 // whether `match` is using structural-equality or method-dispatch
 // under the hood, which is the antithesis of rust-lang/rfcs#1445
 impl PartialEq for B {
+//~^ NOTE the `PartialEq` trait must be derived, manual `impl`s are not sufficient
+//~| NOTE the `PartialEq` trait must be derived, manual `impl`s are not sufficient
     fn eq(&self, other: &B) -> bool { std::cmp::min(self.0, other.0) == 0 }
 }
 
 fn main() {
     const RR_B0: & & B = & & B(0);
     const RR_B1: & & B = & & B(1);
+    //~^ NOTE constant defined here
+    //~| NOTE constant defined here
 
     match RR_B0 {
         RR_B1 => { println!("CLAIM RR0: {:?} matches {:?}", RR_B1, RR_B0); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `B` in a pattern
+        //~| NOTE constant of non-structural type
         _ => { }
     }
 
     match RR_B1 {
         RR_B1 => { println!("CLAIM RR1: {:?} matches {:?}", RR_B1, RR_B1); }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `B` in a pattern
+        //~| NOTE constant of non-structural type
         _ => { }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.stderr
index e79b05fdf9d..34fffd99c2c 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.stderr
@@ -1,20 +1,38 @@
-error: to use a constant of type `B` in a pattern, `B` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:29:9
+error: constant of non-structural type `B` in a pattern
+  --> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:35:9
    |
+LL | struct B(i32);
+   | -------- `B` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const RR_B1: & & B = & & B(1);
+   |     ------------------ constant defined here
+...
 LL |         RR_B1 => { println!("CLAIM RR0: {:?} matches {:?}", RR_B1, RR_B0); }
-   |         ^^^^^
+   |         ^^^^^ constant of non-structural type
+   |
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:22:1
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+LL | impl PartialEq for B {
+   | ^^^^^^^^^^^^^^^^^^^^
 
-error: to use a constant of type `B` in a pattern, `B` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:35:9
+error: constant of non-structural type `B` in a pattern
+  --> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:42:9
    |
+LL | struct B(i32);
+   | -------- `B` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL |     const RR_B1: & & B = & & B(1);
+   |     ------------------ constant defined here
+...
 LL |         RR_B1 => { println!("CLAIM RR1: {:?} matches {:?}", RR_B1, RR_B1); }
-   |         ^^^^^
+   |         ^^^^^ constant of non-structural type
+   |
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:22:1
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+LL | impl PartialEq for B {
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr
index 7b1832ed0fa..ea6121839be 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr
@@ -1,14 +1,24 @@
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-63479-match-fnptr.rs:32:7
    |
+LL | const TEST: Fn = my_fn;
+   | -------------- constant defined here
+...
 LL |     B(TEST) => println!("matched"),
-   |       ^^^^
+   |       ^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
-error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
   --> $DIR/issue-63479-match-fnptr.rs:37:5
    |
+LL | const TEST2: (Fn, u8) = (TEST, 0);
+   | --------------------- constant defined here
+...
 LL |     TEST2 => println!("matched"),
-   |     ^^^^^
+   |     ^^^^^ can't be used in patterns
+   |
+   = note: see https://github.com/rust-lang/rust/issues/70861 for details
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-6804-nan-match.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-6804-nan-match.stderr
index 44b05ea31e9..7c49870e5d0 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-6804-nan-match.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-6804-nan-match.stderr
@@ -1,8 +1,11 @@
 error: cannot use NaN in patterns
   --> $DIR/issue-6804-nan-match.rs:14:9
    |
+LL | const NAN: f64 = f64::NAN;
+   | -------------- constant defined here
+...
 LL |         NAN => {},
-   |         ^^^
+   |         ^^^ evaluates to `NaN`, which is not allowed in patterns
    |
    = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
    = help: try using the `is_nan` method instead
@@ -10,8 +13,11 @@ LL |         NAN => {},
 error: cannot use NaN in patterns
   --> $DIR/issue-6804-nan-match.rs:19:10
    |
+LL | const NAN: f64 = f64::NAN;
+   | -------------- constant defined here
+...
 LL |         [NAN, _] => {},
-   |          ^^^
+   |          ^^^ evaluates to `NaN`, which is not allowed in patterns
    |
    = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
    = help: try using the `is_nan` method instead
@@ -19,8 +25,11 @@ LL |         [NAN, _] => {},
 error: cannot use NaN in patterns
   --> $DIR/issue-6804-nan-match.rs:24:9
    |
+LL | const C: MyType<f32> = MyType(f32::NAN);
+   | -------------------- constant defined here
+...
 LL |         C => {},
-   |         ^
+   |         ^ evaluates to `NaN`, which is not allowed in patterns
    |
    = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
    = help: try using the `is_nan` method instead
@@ -28,8 +37,11 @@ LL |         C => {},
 error: cannot use NaN in patterns
   --> $DIR/issue-6804-nan-match.rs:30:9
    |
+LL | const NAN: f64 = f64::NAN;
+   | -------------- constant defined here
+...
 LL |         NAN..=1.0 => {},
-   |         ^^^
+   |         ^^^ evaluates to `NaN`, which is not allowed in patterns
    |
    = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
    = help: try using the `is_nan` method instead
@@ -37,8 +49,11 @@ LL |         NAN..=1.0 => {},
 error: cannot use NaN in patterns
   --> $DIR/issue-6804-nan-match.rs:31:16
    |
+LL | const NAN: f64 = f64::NAN;
+   | -------------- constant defined here
+...
 LL |         -1.0..=NAN => {},
-   |                ^^^
+   |                ^^^ evaluates to `NaN`, which is not allowed in patterns
    |
    = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
    = help: try using the `is_nan` method instead
@@ -46,8 +61,11 @@ LL |         -1.0..=NAN => {},
 error: cannot use NaN in patterns
   --> $DIR/issue-6804-nan-match.rs:32:9
    |
+LL | const NAN: f64 = f64::NAN;
+   | -------------- constant defined here
+...
 LL |         NAN.. => {},
-   |         ^^^
+   |         ^^^ evaluates to `NaN`, which is not allowed in patterns
    |
    = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
    = help: try using the `is_nan` method instead
@@ -55,8 +73,11 @@ LL |         NAN.. => {},
 error: cannot use NaN in patterns
   --> $DIR/issue-6804-nan-match.rs:33:11
    |
+LL | const NAN: f64 = f64::NAN;
+   | -------------- constant defined here
+...
 LL |         ..NAN => {},
-   |           ^^^
+   |           ^^^ evaluates to `NaN`, which is not allowed in patterns
    |
    = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
    = help: try using the `is_nan` method instead
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.rs
index 9020eb291f5..74394698fbc 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.rs
@@ -1,3 +1,5 @@
+// Note: It is no longer true that both `Eq` and `PartialEq` must the derived, only the later.
+
 #[derive(Eq)]
 struct Foo {
     x: u32
@@ -15,7 +17,7 @@ fn main() {
     let y = Foo { x: 1 };
     match y {
         FOO => { }
-        //~^ ERROR must be annotated with `#[derive(PartialEq)]`
+        //~^ ERROR constant of non-structural type `Foo` in a pattern
         _ => { }
     }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr
index efd9c8c45af..bbcab3b62d0 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr
@@ -1,11 +1,20 @@
-error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq)]`
-  --> $DIR/match-requires-both-partialeq-and-eq.rs:17:9
+error: constant of non-structural type `Foo` in a pattern
+  --> $DIR/match-requires-both-partialeq-and-eq.rs:19:9
    |
+LL | struct Foo {
+   | ---------- `Foo` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
+LL | const FOO: Foo = Foo { x: 0 };
+   | -------------- constant defined here
+...
 LL |         FOO => { }
-   |         ^^^
+   |         ^^^ constant of non-structural type
    |
-   = note: the traits must be derived, manual `impl`s are not sufficient
-   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+  --> $DIR/match-requires-both-partialeq-and-eq.rs:8:1
+   |
+LL | impl PartialEq for Foo {
+   | ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/self/arbitrary-self-opaque.rs b/tests/ui/self/arbitrary-self-opaque.rs
index 3c2e2d9db72..c26ef658b69 100644
--- a/tests/ui/self/arbitrary-self-opaque.rs
+++ b/tests/ui/self/arbitrary-self-opaque.rs
@@ -2,7 +2,6 @@
 struct Foo;
 
 type Bar = impl Sized;
-//~^ ERROR unconstrained opaque type
 
 impl Foo {
     fn foo(self: Bar) {}
diff --git a/tests/ui/self/arbitrary-self-opaque.stderr b/tests/ui/self/arbitrary-self-opaque.stderr
index 5634b3d6e64..c75165d9f8e 100644
--- a/tests/ui/self/arbitrary-self-opaque.stderr
+++ b/tests/ui/self/arbitrary-self-opaque.stderr
@@ -1,5 +1,5 @@
 error[E0307]: invalid `self` parameter type: `Bar`
-  --> $DIR/arbitrary-self-opaque.rs:8:18
+  --> $DIR/arbitrary-self-opaque.rs:7:18
    |
 LL |     fn foo(self: Bar) {}
    |                  ^^^
@@ -8,7 +8,7 @@ LL |     fn foo(self: Bar) {}
    = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
 
 error: item does not constrain `Bar::{opaque#0}`, but has it in its signature
-  --> $DIR/arbitrary-self-opaque.rs:8:8
+  --> $DIR/arbitrary-self-opaque.rs:7:8
    |
 LL |     fn foo(self: Bar) {}
    |        ^^^
@@ -20,14 +20,6 @@ note: this opaque type is in the signature
 LL | type Bar = impl Sized;
    |            ^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/arbitrary-self-opaque.rs:4:12
-   |
-LL | type Bar = impl Sized;
-   |            ^^^^^^^^^^
-   |
-   = note: `Bar` must be used in combination with a concrete type within the same module
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0307`.
diff --git a/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs b/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs
new file mode 100644
index 00000000000..35612093aff
--- /dev/null
+++ b/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs
@@ -0,0 +1,26 @@
+//! Regression test for suggestions that were fired on empty spans
+//! involving macro-call statements. For some reason the semicolon
+//! is not included in the overall span of the macro-call statement.
+//!
+//! Issue 1: <https://github.com/rust-lang/rust/issues/133833>.
+//! Issue 2: <https://github.com/rust-lang/rust/issues/133834>.
+//! See also: <https://github.com/rust-lang/rust/issues/133845>.
+
+fn foo() -> String {
+    let mut list = {
+        println!();
+    };
+    list //~ ERROR mismatched types
+}
+
+fn bar() {
+    String::new()
+        .chars()
+        .filter(|x| !x.is_whitespace())
+        .map(|x| {
+            println!("Child spawned with the size: {}", x);
+        })
+        .collect::<String>(); //~ ERROR E0277
+}
+
+fn main() {}
diff --git a/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.stderr b/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.stderr
new file mode 100644
index 00000000000..4b83bfff863
--- /dev/null
+++ b/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.stderr
@@ -0,0 +1,50 @@
+error[E0308]: mismatched types
+  --> $DIR/semi-suggestion-when-stmt-and-expr-span-equal.rs:13:5
+   |
+LL |   fn foo() -> String {
+   |               ------ expected `String` because of return type
+LL |       let mut list = {
+   |  ____________________-
+LL | |         println!();
+LL | |     };
+   | |_____- this block is missing a tail expression
+LL |       list
+   |       ^^^^ expected `String`, found `()`
+
+error[E0277]: a value of type `String` cannot be built from an iterator over elements of type `()`
+  --> $DIR/semi-suggestion-when-stmt-and-expr-span-equal.rs:23:20
+   |
+LL |         .collect::<String>();
+   |          -------   ^^^^^^ value of type `String` cannot be built from `std::iter::Iterator<Item=()>`
+   |          |
+   |          required by a bound introduced by this call
+   |
+   = help: the trait `FromIterator<()>` is not implemented for `String`
+   = help: the following other types implement trait `FromIterator<A>`:
+             `String` implements `FromIterator<&char>`
+             `String` implements `FromIterator<&str>`
+             `String` implements `FromIterator<Box<str, A>>`
+             `String` implements `FromIterator<Cow<'_, str>>`
+             `String` implements `FromIterator<String>`
+             `String` implements `FromIterator<char>`
+note: the method call chain might not have had the expected associated types
+  --> $DIR/semi-suggestion-when-stmt-and-expr-span-equal.rs:20:10
+   |
+LL |       String::new()
+   |       ------------- this expression has type `String`
+LL |           .chars()
+   |            ------- `Iterator::Item` is `char` here
+LL |           .filter(|x| !x.is_whitespace())
+   |            ------------------------------ `Iterator::Item` remains `char` here
+LL |           .map(|x| {
+   |  __________^
+LL | |             println!("Child spawned with the size: {}", x);
+LL | |         })
+   | |__________^ `Iterator::Item` changed to `()` here
+note: required by a bound in `collect`
+  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs b/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs
index 48a98efea5e..0da68afb592 100644
--- a/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs
+++ b/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs
@@ -3,7 +3,6 @@
 trait X {
     fn a<T>() -> T::unknown<{}> {}
     //~^ ERROR: associated type `unknown` not found for `T`
-    //~| ERROR: associated type `unknown` not found for `T`
 }
 
 trait Y {
@@ -14,7 +13,6 @@ trait Y {
 trait Z<T> {
     fn a() -> T::unknown<{}> {}
     //~^ ERROR: associated type `unknown` not found for `T`
-    //~| ERROR: associated type `unknown` not found for `T`
 }
 
 fn main() {}
diff --git a/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr b/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr
index 9598c373e6e..49e41f75ff3 100644
--- a/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr
+++ b/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr
@@ -5,34 +5,18 @@ LL |     fn a<T>() -> T::unknown<{}> {}
    |                     ^^^^^^^ associated type `unknown` not found
 
 error[E0220]: associated type `unknown` not found for `T`
-  --> $DIR/unknown-assoc-with-const-arg.rs:15:18
+  --> $DIR/unknown-assoc-with-const-arg.rs:14:18
    |
 LL |     fn a() -> T::unknown<{}> {}
    |                  ^^^^^^^ associated type `unknown` not found
 
-error[E0220]: associated type `unknown` not found for `T`
-  --> $DIR/unknown-assoc-with-const-arg.rs:4:21
-   |
-LL |     fn a<T>() -> T::unknown<{}> {}
-   |                     ^^^^^^^ associated type `unknown` not found
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0220]: associated type `unknown` not found for `T`
-  --> $DIR/unknown-assoc-with-const-arg.rs:15:18
-   |
-LL |     fn a() -> T::unknown<{}> {}
-   |                  ^^^^^^^ associated type `unknown` not found
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
 error[E0433]: failed to resolve: use of undeclared type `NOT_EXIST`
-  --> $DIR/unknown-assoc-with-const-arg.rs:10:15
+  --> $DIR/unknown-assoc-with-const-arg.rs:9:15
    |
 LL |     fn a() -> NOT_EXIST::unknown<{}> {}
    |               ^^^^^^^^^ use of undeclared type `NOT_EXIST`
 
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0220, E0433.
 For more information about an error, try `rustc --explain E0220`.
diff --git a/tests/ui/type-alias-impl-trait/bad-tait-no-substs.rs b/tests/ui/type-alias-impl-trait/bad-tait-no-substs.rs
index 18cfb1c1f93..4b2ee344aa3 100644
--- a/tests/ui/type-alias-impl-trait/bad-tait-no-substs.rs
+++ b/tests/ui/type-alias-impl-trait/bad-tait-no-substs.rs
@@ -3,7 +3,6 @@
 #![feature(type_alias_impl_trait)]
 trait Trait<T> {}
 type Alias<'a, U> = impl Trait<U>;
-//~^ ERROR unconstrained opaque type
 
 pub enum UninhabitedVariants {
     Tuple(Alias),
diff --git a/tests/ui/type-alias-impl-trait/bad-tait-no-substs.stderr b/tests/ui/type-alias-impl-trait/bad-tait-no-substs.stderr
index cf366c55ea8..55df117d066 100644
--- a/tests/ui/type-alias-impl-trait/bad-tait-no-substs.stderr
+++ b/tests/ui/type-alias-impl-trait/bad-tait-no-substs.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/bad-tait-no-substs.rs:9:11
+  --> $DIR/bad-tait-no-substs.rs:8:11
    |
 LL |     Tuple(Alias),
    |           ^^^^^ expected named lifetime parameter
@@ -11,7 +11,7 @@ LL ~     Tuple(Alias<'a>),
    |
 
 error[E0107]: missing generics for type alias `Alias`
-  --> $DIR/bad-tait-no-substs.rs:9:11
+  --> $DIR/bad-tait-no-substs.rs:8:11
    |
 LL |     Tuple(Alias),
    |           ^^^^^ expected 1 generic argument
@@ -27,7 +27,7 @@ LL |     Tuple(Alias<U>),
    |                +++
 
 error[E0792]: non-defining opaque type use in defining scope
-  --> $DIR/bad-tait-no-substs.rs:9:11
+  --> $DIR/bad-tait-no-substs.rs:8:11
    |
 LL |     Tuple(Alias),
    |           ^^^^^ argument `'_` is not a generic parameter
@@ -39,7 +39,7 @@ LL | type Alias<'a, U> = impl Trait<U>;
    |                     ^^^^^^^^^^^^^
 
 error: item does not constrain `Alias::{opaque#0}`, but has it in its signature
-  --> $DIR/bad-tait-no-substs.rs:15:4
+  --> $DIR/bad-tait-no-substs.rs:14:4
    |
 LL | fn uwu(x: UninhabitedVariants) {
    |    ^^^
@@ -51,22 +51,14 @@ note: this opaque type is in the signature
 LL | type Alias<'a, U> = impl Trait<U>;
    |                     ^^^^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/bad-tait-no-substs.rs:5:21
-   |
-LL | type Alias<'a, U> = impl Trait<U>;
-   |                     ^^^^^^^^^^^^^
-   |
-   = note: `Alias` must be used in combination with a concrete type within the same module
-
 error[E0004]: non-exhaustive patterns: `UninhabitedVariants::Tuple(_)` not covered
-  --> $DIR/bad-tait-no-substs.rs:17:11
+  --> $DIR/bad-tait-no-substs.rs:16:11
    |
 LL |     match x {}
    |           ^ pattern `UninhabitedVariants::Tuple(_)` not covered
    |
 note: `UninhabitedVariants` defined here
-  --> $DIR/bad-tait-no-substs.rs:8:10
+  --> $DIR/bad-tait-no-substs.rs:7:10
    |
 LL | pub enum UninhabitedVariants {
    |          ^^^^^^^^^^^^^^^^^^^
@@ -80,7 +72,7 @@ LL +         UninhabitedVariants::Tuple(_) => todo!(),
 LL +     }
    |
 
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0004, E0106, E0107, E0792.
 For more information about an error, try `rustc --explain E0004`.
diff --git a/tests/ui/type-alias-impl-trait/const_generic_type.infer.stderr b/tests/ui/type-alias-impl-trait/const_generic_type.infer.stderr
index b7999a695e7..5b77bb6c2bc 100644
--- a/tests/ui/type-alias-impl-trait/const_generic_type.infer.stderr
+++ b/tests/ui/type-alias-impl-trait/const_generic_type.infer.stderr
@@ -1,5 +1,5 @@
 error: `Bar` is forbidden as the type of a const generic parameter
-  --> $DIR/const_generic_type.rs:8:24
+  --> $DIR/const_generic_type.rs:7:24
    |
 LL | async fn test<const N: crate::Bar>() {
    |                        ^^^^^^^^^^
diff --git a/tests/ui/type-alias-impl-trait/const_generic_type.no_infer.stderr b/tests/ui/type-alias-impl-trait/const_generic_type.no_infer.stderr
index ec8a51b0818..8888f2d49df 100644
--- a/tests/ui/type-alias-impl-trait/const_generic_type.no_infer.stderr
+++ b/tests/ui/type-alias-impl-trait/const_generic_type.no_infer.stderr
@@ -1,5 +1,5 @@
 error: `Bar` is forbidden as the type of a const generic parameter
-  --> $DIR/const_generic_type.rs:8:24
+  --> $DIR/const_generic_type.rs:7:24
    |
 LL | async fn test<const N: crate::Bar>() {
    |                        ^^^^^^^^^^
@@ -7,7 +7,7 @@ LL | async fn test<const N: crate::Bar>() {
    = note: the only supported types are integers, `bool`, and `char`
 
 error: item does not constrain `Bar::{opaque#0}`, but has it in its signature
-  --> $DIR/const_generic_type.rs:8:10
+  --> $DIR/const_generic_type.rs:7:10
    |
 LL | async fn test<const N: crate::Bar>() {
    |          ^^^^
@@ -20,7 +20,7 @@ LL | type Bar = impl std::fmt::Display;
    |            ^^^^^^^^^^^^^^^^^^^^^^
 
 error: item does not constrain `Bar::{opaque#0}`, but has it in its signature
-  --> $DIR/const_generic_type.rs:8:38
+  --> $DIR/const_generic_type.rs:7:38
    |
 LL |   async fn test<const N: crate::Bar>() {
    |  ______________________________________^
@@ -39,13 +39,5 @@ note: this opaque type is in the signature
 LL | type Bar = impl std::fmt::Display;
    |            ^^^^^^^^^^^^^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/const_generic_type.rs:5:12
-   |
-LL | type Bar = impl std::fmt::Display;
-   |            ^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `Bar` must be used in combination with a concrete type within the same module
-
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/type-alias-impl-trait/const_generic_type.rs b/tests/ui/type-alias-impl-trait/const_generic_type.rs
index de493d04f81..7149370048b 100644
--- a/tests/ui/type-alias-impl-trait/const_generic_type.rs
+++ b/tests/ui/type-alias-impl-trait/const_generic_type.rs
@@ -3,7 +3,6 @@
 
 #![feature(type_alias_impl_trait)]
 type Bar = impl std::fmt::Display;
-//[no_infer]~^ ERROR: unconstrained opaque type
 
 async fn test<const N: crate::Bar>() {
     //~^ ERROR: `Bar` is forbidden as the type of a const generic parameter
diff --git a/tests/ui/type-alias-impl-trait/hkl_forbidden4.rs b/tests/ui/type-alias-impl-trait/hkl_forbidden4.rs
index 96c905ef3a9..fd06ea677c3 100644
--- a/tests/ui/type-alias-impl-trait/hkl_forbidden4.rs
+++ b/tests/ui/type-alias-impl-trait/hkl_forbidden4.rs
@@ -8,7 +8,6 @@
 use std::future::Future;
 
 type FutNothing<'a> = impl 'a + Future<Output = ()>;
-//~^ ERROR: unconstrained opaque type
 
 async fn operation(_: &mut ()) -> () {
     //~^ ERROR: concrete type differs from previous
diff --git a/tests/ui/type-alias-impl-trait/hkl_forbidden4.stderr b/tests/ui/type-alias-impl-trait/hkl_forbidden4.stderr
index 0c2772683a9..08ebc3208d7 100644
--- a/tests/ui/type-alias-impl-trait/hkl_forbidden4.stderr
+++ b/tests/ui/type-alias-impl-trait/hkl_forbidden4.stderr
@@ -1,5 +1,5 @@
 error: item does not constrain `FutNothing::{opaque#0}`, but has it in its signature
-  --> $DIR/hkl_forbidden4.rs:19:10
+  --> $DIR/hkl_forbidden4.rs:18:10
    |
 LL | async fn call<F>(_f: F)
    |          ^^^^
@@ -12,7 +12,7 @@ LL | type FutNothing<'a> = impl 'a + Future<Output = ()>;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: item does not constrain `FutNothing::{opaque#0}`, but has it in its signature
-  --> $DIR/hkl_forbidden4.rs:23:1
+  --> $DIR/hkl_forbidden4.rs:22:1
    |
 LL | / {
 LL | |
@@ -27,16 +27,8 @@ note: this opaque type is in the signature
 LL | type FutNothing<'a> = impl 'a + Future<Output = ()>;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/hkl_forbidden4.rs:10:23
-   |
-LL | type FutNothing<'a> = impl 'a + Future<Output = ()>;
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `FutNothing` must be used in combination with a concrete type within the same module
-
 error[E0792]: expected generic lifetime parameter, found `'any`
-  --> $DIR/hkl_forbidden4.rs:15:5
+  --> $DIR/hkl_forbidden4.rs:14:5
    |
 LL | async fn operation(_: &mut ()) -> () {
    |                       - this generic parameter must be used with a generic lifetime parameter
@@ -45,19 +37,19 @@ LL |     call(operation).await
    |     ^^^^^^^^^^^^^^^
 
 error: concrete type differs from previous defining opaque type use
-  --> $DIR/hkl_forbidden4.rs:13:1
+  --> $DIR/hkl_forbidden4.rs:12:1
    |
 LL | async fn operation(_: &mut ()) -> () {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `FutNothing<'_>`, got `{async fn body of operation()}`
    |
 note: previous use here
-  --> $DIR/hkl_forbidden4.rs:15:5
+  --> $DIR/hkl_forbidden4.rs:14:5
    |
 LL |     call(operation).await
    |     ^^^^^^^^^^^^^^^
 
 error[E0792]: expected generic lifetime parameter, found `'any`
-  --> $DIR/hkl_forbidden4.rs:23:1
+  --> $DIR/hkl_forbidden4.rs:22:1
    |
 LL |   type FutNothing<'a> = impl 'a + Future<Output = ()>;
    |                   -- this generic parameter must be used with a generic lifetime parameter
@@ -68,6 +60,6 @@ LL | |
 LL | | }
    | |_^
 
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference3.rs b/tests/ui/type-alias-impl-trait/nested-tait-inference3.rs
index a7d824c5a6a..aaf2812532d 100644
--- a/tests/ui/type-alias-impl-trait/nested-tait-inference3.rs
+++ b/tests/ui/type-alias-impl-trait/nested-tait-inference3.rs
@@ -4,7 +4,6 @@
 use std::fmt::Debug;
 
 type FooX = impl Debug;
-//~^ ERROR unconstrained opaque type
 
 trait Foo<A> {}
 
diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr b/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr
index 9ccd9544896..969409ebc59 100644
--- a/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr
+++ b/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr
@@ -1,5 +1,5 @@
 error: item does not constrain `FooX::{opaque#0}`, but has it in its signature
-  --> $DIR/nested-tait-inference3.rs:13:4
+  --> $DIR/nested-tait-inference3.rs:12:4
    |
 LL | fn foo() -> impl Foo<FooX> {
    |    ^^^
@@ -11,13 +11,5 @@ note: this opaque type is in the signature
 LL | type FooX = impl Debug;
    |             ^^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/nested-tait-inference3.rs:6:13
-   |
-LL | type FooX = impl Debug;
-   |             ^^^^^^^^^^
-   |
-   = note: `FooX` must be used in combination with a concrete type within the same module
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs b/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs
index 3954672500b..41238c27351 100644
--- a/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs
+++ b/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs
@@ -5,7 +5,6 @@
 
 mod foo {
     pub type Foo = impl Copy;
-    //~^ ERROR unconstrained opaque type
 
     // make compiler happy about using 'Foo'
     pub fn bar(x: Foo) -> Foo {
diff --git a/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr b/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr
index d95a4a8a727..eed88c5df4f 100644
--- a/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr
+++ b/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr
@@ -1,5 +1,5 @@
 error: item does not constrain `Foo::{opaque#0}`, but has it in its signature
-  --> $DIR/no_inferrable_concrete_type.rs:11:12
+  --> $DIR/no_inferrable_concrete_type.rs:10:12
    |
 LL |     pub fn bar(x: Foo) -> Foo {
    |            ^^^
@@ -11,13 +11,5 @@ note: this opaque type is in the signature
 LL |     pub type Foo = impl Copy;
    |                    ^^^^^^^^^
 
-error: unconstrained opaque type
-  --> $DIR/no_inferrable_concrete_type.rs:7:20
-   |
-LL |     pub type Foo = impl Copy;
-   |                    ^^^^^^^^^
-   |
-   = note: `Foo` must be used in combination with a concrete type within the same module
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr b/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr
index 98d71aa9a17..28f5d6728a9 100644
--- a/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr
+++ b/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr
@@ -1,8 +1,11 @@
-error: `Bar` cannot be used in patterns
+error: opaque type `Bar` cannot be used in patterns
   --> $DIR/structural-match-no-leak.rs:16:9
    |
+LL | const LEAK_FREE: bar::Bar = bar::leak_free();
+   | ------------------------- constant defined here
+...
 LL |         LEAK_FREE => (),
-   |         ^^^^^^^^^
+   |         ^^^^^^^^^ opaque type can't be used in patterns
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-alias-impl-trait/structural-match.stderr b/tests/ui/type-alias-impl-trait/structural-match.stderr
index c7478b0a135..b06b31a060f 100644
--- a/tests/ui/type-alias-impl-trait/structural-match.stderr
+++ b/tests/ui/type-alias-impl-trait/structural-match.stderr
@@ -1,8 +1,11 @@
-error: `foo::Foo` cannot be used in patterns
+error: opaque type `foo::Foo` cannot be used in patterns
   --> $DIR/structural-match.rs:18:9
    |
+LL | const VALUE: Foo = value();
+   | ---------------- constant defined here
+...
 LL |         VALUE => (),
-   |         ^^^^^
+   |         ^^^^^ opaque type can't be used in patterns
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs b/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs
index 3defe0cb44d..55f45ade388 100644
--- a/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs
+++ b/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs
@@ -1,4 +1,4 @@
-#![feature(pattern_types, core_pattern_type)]
+#![feature(pattern_types, pattern_type_macro)]
 #![allow(internal_features)]
 
 type Pat<const START: u32, const END: u32> =
diff --git a/tests/ui/type/pattern_types/bad_pat.rs b/tests/ui/type/pattern_types/bad_pat.rs
index 8ad042eeba6..6cb2a0f1f8e 100644
--- a/tests/ui/type/pattern_types/bad_pat.rs
+++ b/tests/ui/type/pattern_types/bad_pat.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types)]
-#![feature(core_pattern_types)]
-#![feature(core_pattern_type)]
+#![feature(pattern_type_macro)]
 
 use std::pat::pattern_type;
 
diff --git a/tests/ui/type/pattern_types/bad_pat.stderr b/tests/ui/type/pattern_types/bad_pat.stderr
index f5cf7930c83..c857cc3c3ad 100644
--- a/tests/ui/type/pattern_types/bad_pat.stderr
+++ b/tests/ui/type/pattern_types/bad_pat.stderr
@@ -1,5 +1,5 @@
 error[E0586]: inclusive range with no end
-  --> $DIR/bad_pat.rs:7:43
+  --> $DIR/bad_pat.rs:6:43
    |
 LL | type NonNullU32_2 = pattern_type!(u32 is 1..=);
    |                                           ^^^
@@ -12,7 +12,7 @@ LL + type NonNullU32_2 = pattern_type!(u32 is 1..);
    |
 
 error[E0586]: inclusive range with no end
-  --> $DIR/bad_pat.rs:9:40
+  --> $DIR/bad_pat.rs:8:40
    |
 LL | type Positive2 = pattern_type!(i32 is 0..=);
    |                                        ^^^
@@ -25,7 +25,7 @@ LL + type Positive2 = pattern_type!(i32 is 0..);
    |
 
 error: wildcard patterns are not permitted for pattern types
-  --> $DIR/bad_pat.rs:11:33
+  --> $DIR/bad_pat.rs:10:33
    |
 LL | type Wild = pattern_type!(() is _);
    |                                 ^
diff --git a/tests/ui/type/pattern_types/const_generics.rs b/tests/ui/type/pattern_types/const_generics.rs
index 5bc6fd54e0f..5cef0dc0305 100644
--- a/tests/ui/type/pattern_types/const_generics.rs
+++ b/tests/ui/type/pattern_types/const_generics.rs
@@ -1,8 +1,7 @@
 //@ check-pass
 
 #![feature(pattern_types)]
-#![feature(core_pattern_types)]
-#![feature(core_pattern_type)]
+#![feature(pattern_type_macro)]
 
 use std::pat::pattern_type;
 
diff --git a/tests/ui/type/pattern_types/derives.rs b/tests/ui/type/pattern_types/derives.rs
index b8b53e61102..3878c47554d 100644
--- a/tests/ui/type/pattern_types/derives.rs
+++ b/tests/ui/type/pattern_types/derives.rs
@@ -1,8 +1,7 @@
 //! Check that pattern types don't implement traits of their base automatically
 
 #![feature(pattern_types)]
-#![feature(core_pattern_types)]
-#![feature(core_pattern_type)]
+#![feature(pattern_type_macro)]
 
 use std::pat::pattern_type;
 
diff --git a/tests/ui/type/pattern_types/derives.stderr b/tests/ui/type/pattern_types/derives.stderr
index 1d4d3fc55c3..9d4baef621b 100644
--- a/tests/ui/type/pattern_types/derives.stderr
+++ b/tests/ui/type/pattern_types/derives.stderr
@@ -1,5 +1,5 @@
 error[E0369]: binary operation `==` cannot be applied to type `(i32) is 0..=999999999`
-  --> $DIR/derives.rs:11:20
+  --> $DIR/derives.rs:10:20
    |
 LL | #[derive(Clone, Copy, PartialEq)]
    |                       --------- in this derive macro expansion
diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types.rs b/tests/ui/type/pattern_types/feature-gate-pattern_types.rs
index e638f3c6c40..b90ba478402 100644
--- a/tests/ui/type/pattern_types/feature-gate-pattern_types.rs
+++ b/tests/ui/type/pattern_types/feature-gate-pattern_types.rs
@@ -3,12 +3,12 @@
 use std::pat::pattern_type;
 
 type NonNullU32 = pattern_type!(u32 is 1..);
-//~^ use of unstable library feature `core_pattern_type`
+//~^ use of unstable library feature `pattern_type_macro`
 type Percent = pattern_type!(u32 is 0..=100);
-//~^ use of unstable library feature `core_pattern_type`
+//~^ use of unstable library feature `pattern_type_macro`
 type Negative = pattern_type!(i32 is ..=0);
-//~^ use of unstable library feature `core_pattern_type`
+//~^ use of unstable library feature `pattern_type_macro`
 type Positive = pattern_type!(i32 is 0..);
-//~^ use of unstable library feature `core_pattern_type`
+//~^ use of unstable library feature `pattern_type_macro`
 type Always = pattern_type!(Option<u32> is Some(_));
-//~^ use of unstable library feature `core_pattern_type`
+//~^ use of unstable library feature `pattern_type_macro`
diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr b/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr
index 6cbadf370a7..69239d68bdc 100644
--- a/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr
+++ b/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr
@@ -1,51 +1,51 @@
-error[E0658]: use of unstable library feature `core_pattern_type`
+error[E0658]: use of unstable library feature `pattern_type_macro`
   --> $DIR/feature-gate-pattern_types.rs:5:19
    |
 LL | type NonNullU32 = pattern_type!(u32 is 1..);
    |                   ^^^^^^^^^^^^
    |
    = note: see issue #123646 <https://github.com/rust-lang/rust/issues/123646> for more information
-   = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable
+   = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error[E0658]: use of unstable library feature `core_pattern_type`
+error[E0658]: use of unstable library feature `pattern_type_macro`
   --> $DIR/feature-gate-pattern_types.rs:7:16
    |
 LL | type Percent = pattern_type!(u32 is 0..=100);
    |                ^^^^^^^^^^^^
    |
    = note: see issue #123646 <https://github.com/rust-lang/rust/issues/123646> for more information
-   = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable
+   = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error[E0658]: use of unstable library feature `core_pattern_type`
+error[E0658]: use of unstable library feature `pattern_type_macro`
   --> $DIR/feature-gate-pattern_types.rs:9:17
    |
 LL | type Negative = pattern_type!(i32 is ..=0);
    |                 ^^^^^^^^^^^^
    |
    = note: see issue #123646 <https://github.com/rust-lang/rust/issues/123646> for more information
-   = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable
+   = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error[E0658]: use of unstable library feature `core_pattern_type`
+error[E0658]: use of unstable library feature `pattern_type_macro`
   --> $DIR/feature-gate-pattern_types.rs:11:17
    |
 LL | type Positive = pattern_type!(i32 is 0..);
    |                 ^^^^^^^^^^^^
    |
    = note: see issue #123646 <https://github.com/rust-lang/rust/issues/123646> for more information
-   = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable
+   = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error[E0658]: use of unstable library feature `core_pattern_type`
+error[E0658]: use of unstable library feature `pattern_type_macro`
   --> $DIR/feature-gate-pattern_types.rs:13:15
    |
 LL | type Always = pattern_type!(Option<u32> is Some(_));
    |               ^^^^^^^^^^^^
    |
    = note: see issue #123646 <https://github.com/rust-lang/rust/issues/123646> for more information
-   = help: add `#![feature(core_pattern_type)]` to the crate attributes to enable
+   = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error: aborting due to 5 previous errors
diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types2.rs b/tests/ui/type/pattern_types/feature-gate-pattern_types2.rs
index d7b3ea58e02..50c355c8de6 100644
--- a/tests/ui/type/pattern_types/feature-gate-pattern_types2.rs
+++ b/tests/ui/type/pattern_types/feature-gate-pattern_types2.rs
@@ -1,7 +1,7 @@
 //@ compile-flags: -Zno-analysis
 //@ check-pass
 
-#![feature(core_pattern_type)]
+#![feature(pattern_type_macro)]
 
 use std::pat::pattern_type;
 
diff --git a/tests/ui/type/pattern_types/missing-is.rs b/tests/ui/type/pattern_types/missing-is.rs
index 2fbcc1908ef..564b41649d8 100644
--- a/tests/ui/type/pattern_types/missing-is.rs
+++ b/tests/ui/type/pattern_types/missing-is.rs
@@ -1,4 +1,4 @@
-#![feature(core_pattern_type, core_pattern_types)]
+#![feature(pattern_type_macro)]
 
 use std::pat::pattern_type;
 
diff --git a/tests/ui/type/pattern_types/range_patterns.rs b/tests/ui/type/pattern_types/range_patterns.rs
index 9eddc8cab7f..7c25edb1c3f 100644
--- a/tests/ui/type/pattern_types/range_patterns.rs
+++ b/tests/ui/type/pattern_types/range_patterns.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types, rustc_attrs)]
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 #![allow(incomplete_features)]
 
 //@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN"
diff --git a/tests/ui/type/pattern_types/range_patterns.stderr b/tests/ui/type/pattern_types/range_patterns.stderr
index 7bd0d826cab..0eed7c2ce1c 100644
--- a/tests/ui/type/pattern_types/range_patterns.stderr
+++ b/tests/ui/type/pattern_types/range_patterns.stderr
@@ -37,7 +37,7 @@ error: layout_of(NonZero<u32>) = Layout {
            max_repr_align: None,
            unadjusted_abi_align: Align(4 bytes),
        }
-  --> $DIR/range_patterns.rs:11:1
+  --> $DIR/range_patterns.rs:10:1
    |
 LL | type X = std::num::NonZeroU32;
    | ^^^^^^
@@ -74,7 +74,7 @@ error: layout_of((u32) is 1..=) = Layout {
            max_repr_align: None,
            unadjusted_abi_align: Align(4 bytes),
        }
-  --> $DIR/range_patterns.rs:13:1
+  --> $DIR/range_patterns.rs:12:1
    |
 LL | type Y = pattern_type!(u32 is 1..);
    | ^^^^^^
@@ -182,7 +182,7 @@ error: layout_of(Option<(u32) is 1..=>) = Layout {
            max_repr_align: None,
            unadjusted_abi_align: Align(4 bytes),
        }
-  --> $DIR/range_patterns.rs:15:1
+  --> $DIR/range_patterns.rs:14:1
    |
 LL | type Z = Option<pattern_type!(u32 is 1..)>;
    | ^^^^^^
@@ -290,7 +290,7 @@ error: layout_of(Option<NonZero<u32>>) = Layout {
            max_repr_align: None,
            unadjusted_abi_align: Align(4 bytes),
        }
-  --> $DIR/range_patterns.rs:17:1
+  --> $DIR/range_patterns.rs:16:1
    |
 LL | type A = Option<std::num::NonZeroU32>;
    | ^^^^^^
@@ -334,7 +334,7 @@ error: layout_of(NonZeroU32New) = Layout {
            max_repr_align: None,
            unadjusted_abi_align: Align(4 bytes),
        }
-  --> $DIR/range_patterns.rs:19:1
+  --> $DIR/range_patterns.rs:18:1
    |
 LL | struct NonZeroU32New(pattern_type!(u32 is 1..));
    | ^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs b/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs
index 9653a744c41..fe8feda0934 100644
--- a/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs
+++ b/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types, rustc_attrs)]
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 #![allow(incomplete_features)]
 
 //! check that pattern types can have traits implemented for them if
diff --git a/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr b/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr
index 784ebb0c9f0..ed2e4c0bd5f 100644
--- a/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr
+++ b/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr
@@ -1,12 +1,12 @@
 error[E0390]: cannot define inherent `impl` for primitive types outside of `core`
-  --> $DIR/range_patterns_inherent_impls.rs:13:1
+  --> $DIR/range_patterns_inherent_impls.rs:12:1
    |
 LL | impl Y {
    | ^^^^^^
    |
    = help: consider moving this inherent impl into `core` if possible
 help: alternatively add `#[rustc_allow_incoherent_impl]` to the relevant impl items
-  --> $DIR/range_patterns_inherent_impls.rs:15:5
+  --> $DIR/range_patterns_inherent_impls.rs:14:5
    |
 LL |     fn foo() {}
    |     ^^^^^^^^
diff --git a/tests/ui/type/pattern_types/range_patterns_trait_impls.rs b/tests/ui/type/pattern_types/range_patterns_trait_impls.rs
index f8c9af86281..1731cd470fe 100644
--- a/tests/ui/type/pattern_types/range_patterns_trait_impls.rs
+++ b/tests/ui/type/pattern_types/range_patterns_trait_impls.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types, rustc_attrs)]
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 #![allow(incomplete_features)]
 
 //! check that pattern types can have local traits
diff --git a/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs b/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs
index acde4580c1b..90f80a2f346 100644
--- a/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs
+++ b/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types, rustc_attrs)]
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 #![allow(incomplete_features)]
 
 //! check that pattern types can have local traits
diff --git a/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr b/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr
index df56db031ed..d5c539b6c52 100644
--- a/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr
+++ b/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr
@@ -1,5 +1,5 @@
 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
-  --> $DIR/range_patterns_trait_impls2.rs:13:1
+  --> $DIR/range_patterns_trait_impls2.rs:12:1
    |
 LL | impl Eq for Y {}
    | ^^^^^^^^^^^^-
diff --git a/tests/ui/type/pattern_types/range_patterns_unusable.rs b/tests/ui/type/pattern_types/range_patterns_unusable.rs
index 7cde44f4133..98f13ca0bc0 100644
--- a/tests/ui/type/pattern_types/range_patterns_unusable.rs
+++ b/tests/ui/type/pattern_types/range_patterns_unusable.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types, rustc_attrs)]
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 #![allow(incomplete_features)]
 
 //! Some practical niche checks.
diff --git a/tests/ui/type/pattern_types/range_patterns_unusable.stderr b/tests/ui/type/pattern_types/range_patterns_unusable.stderr
index aa0e592684b..8377d417452 100644
--- a/tests/ui/type/pattern_types/range_patterns_unusable.stderr
+++ b/tests/ui/type/pattern_types/range_patterns_unusable.stderr
@@ -1,5 +1,5 @@
 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
-  --> $DIR/range_patterns_unusable.rs:14:35
+  --> $DIR/range_patterns_unusable.rs:13:35
    |
 LL |     let _: Option<u32> = unsafe { std::mem::transmute(z) };
    |                                   ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/type/pattern_types/range_patterns_unusable_math.rs b/tests/ui/type/pattern_types/range_patterns_unusable_math.rs
index bc1ab75429d..ece4009e1e7 100644
--- a/tests/ui/type/pattern_types/range_patterns_unusable_math.rs
+++ b/tests/ui/type/pattern_types/range_patterns_unusable_math.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types, rustc_attrs)]
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 #![allow(incomplete_features)]
 
 //! check that pattern types don't have an `Add` impl.
diff --git a/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr b/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr
index e52d899a703..373615e3714 100644
--- a/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr
+++ b/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr
@@ -1,5 +1,5 @@
 error[E0369]: cannot add `u32` to `(u32) is 1..=`
-  --> $DIR/range_patterns_unusable_math.rs:15:15
+  --> $DIR/range_patterns_unusable_math.rs:14:15
    |
 LL |     let x = x + 1_u32;
    |             - ^ ----- u32
diff --git a/tests/ui/type/pattern_types/range_patterns_usage.rs b/tests/ui/type/pattern_types/range_patterns_usage.rs
index 2a9f736ae61..0ecbdcaa0f7 100644
--- a/tests/ui/type/pattern_types/range_patterns_usage.rs
+++ b/tests/ui/type/pattern_types/range_patterns_usage.rs
@@ -1,6 +1,5 @@
 #![feature(pattern_types, rustc_attrs)]
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 #![allow(incomplete_features)]
 //@ check-pass
 
diff --git a/tests/ui/type/pattern_types/unimplemented_pat.rs b/tests/ui/type/pattern_types/unimplemented_pat.rs
index c02160ff58a..b2398cec7c9 100644
--- a/tests/ui/type/pattern_types/unimplemented_pat.rs
+++ b/tests/ui/type/pattern_types/unimplemented_pat.rs
@@ -1,8 +1,7 @@
 //! This test ensures we do not ICE for unimplemented
 //! patterns unless the feature gate is enabled.
 
-#![feature(core_pattern_type)]
-#![feature(core_pattern_types)]
+#![feature(pattern_type_macro)]
 
 use std::pat::pattern_type;
 
diff --git a/tests/ui/type/pattern_types/unimplemented_pat.stderr b/tests/ui/type/pattern_types/unimplemented_pat.stderr
index 481c6017dcc..7b0f9cbaa6a 100644
--- a/tests/ui/type/pattern_types/unimplemented_pat.stderr
+++ b/tests/ui/type/pattern_types/unimplemented_pat.stderr
@@ -1,5 +1,5 @@
 error[E0658]: pattern types are unstable
-  --> $DIR/unimplemented_pat.rs:9:15
+  --> $DIR/unimplemented_pat.rs:8:15
    |
 LL | type Always = pattern_type!(Option<u32> is Some(_));
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL | type Always = pattern_type!(Option<u32> is Some(_));
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: pattern types are unstable
-  --> $DIR/unimplemented_pat.rs:12:16
+  --> $DIR/unimplemented_pat.rs:11:16
    |
 LL | type Binding = pattern_type!(Option<u32> is x);
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/union/union-const-pat.stderr b/tests/ui/union/union-const-pat.stderr
index e9dbb275944..59dc89c77a4 100644
--- a/tests/ui/union/union-const-pat.stderr
+++ b/tests/ui/union/union-const-pat.stderr
@@ -1,8 +1,11 @@
 error: cannot use unions in constant patterns
   --> $DIR/union-const-pat.rs:10:9
    |
+LL | const C: U = U { a: 10 };
+   | ---------- constant defined here
+...
 LL |         C => {}
-   |         ^
+   |         ^ can't use a `union` here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/unpretty/expanded-exhaustive.rs b/tests/ui/unpretty/expanded-exhaustive.rs
index 891021e8766..9af57fe4c3c 100644
--- a/tests/ui/unpretty/expanded-exhaustive.rs
+++ b/tests/ui/unpretty/expanded-exhaustive.rs
@@ -8,7 +8,6 @@
 #![feature(builtin_syntax)]
 #![feature(concat_idents)]
 #![feature(const_trait_impl)]
-#![feature(core_pattern_type)]
 #![feature(decl_macro)]
 #![feature(deref_patterns)]
 #![feature(explicit_tail_calls)]
@@ -18,6 +17,7 @@
 #![feature(never_patterns)]
 #![feature(never_type)]
 #![feature(pattern_types)]
+#![feature(pattern_type_macro)]
 #![feature(prelude_import)]
 #![feature(specialization)]
 #![feature(trace_macros)]
diff --git a/tests/ui/unpretty/expanded-exhaustive.stdout b/tests/ui/unpretty/expanded-exhaustive.stdout
index 007626e2c44..14a274415ca 100644
--- a/tests/ui/unpretty/expanded-exhaustive.stdout
+++ b/tests/ui/unpretty/expanded-exhaustive.stdout
@@ -9,7 +9,6 @@
 #![feature(builtin_syntax)]
 #![feature(concat_idents)]
 #![feature(const_trait_impl)]
-#![feature(core_pattern_type)]
 #![feature(decl_macro)]
 #![feature(deref_patterns)]
 #![feature(explicit_tail_calls)]
@@ -19,6 +18,7 @@
 #![feature(never_patterns)]
 #![feature(never_type)]
 #![feature(pattern_types)]
+#![feature(pattern_type_macro)]
 #![feature(prelude_import)]
 #![feature(specialization)]
 #![feature(trace_macros)]