about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/coverage/branch/guard.cov-map40
-rw-r--r--tests/coverage/branch/if-let.cov-map31
-rw-r--r--tests/coverage/branch/if.cov-map48
-rw-r--r--tests/coverage/branch/lazy-boolean.cov-map132
-rw-r--r--tests/coverage/branch/match-arms.cov-map57
-rw-r--r--tests/coverage/branch/while.cov-map13
-rw-r--r--tests/coverage/closure_macro.cov-map12
-rw-r--r--tests/coverage/closure_macro_async.cov-map12
-rw-r--r--tests/coverage/condition/conditions.cov-map138
-rw-r--r--tests/coverage/conditions.cov-map450
-rw-r--r--tests/coverage/continue.cov-map12
-rw-r--r--tests/coverage/coroutine.cov-map24
-rw-r--r--tests/coverage/inline.cov-map14
-rw-r--r--tests/coverage/loops_branches.cov-map177
-rw-r--r--tests/coverage/mcdc/condition-limit.cov-map112
-rw-r--r--tests/coverage/mcdc/if.cov-map203
-rw-r--r--tests/coverage/mcdc/inlined_expressions.cov-map17
-rw-r--r--tests/coverage/mcdc/nested_if.cov-map88
-rw-r--r--tests/coverage/mcdc/non_control_flow.cov-map207
-rw-r--r--tests/coverage/try_error_result.cov-map10
-rw-r--r--tests/coverage/unicode.cov-map15
-rw-r--r--tests/coverage/while_early_ret.cov-map12
-rw-r--r--tests/coverage/yield.cov-map35
-rw-r--r--tests/crashes/131227.rs16
-rw-r--r--tests/rustdoc-ui/issues/duplicate-panic-impl-107918.rs (renamed from tests/rustdoc-ui/issues/issue-107918.rs)1
-rw-r--r--tests/rustdoc-ui/issues/ice-associated-type-bounds-110900.rs (renamed from tests/rustdoc-ui/issues/issue-110900.rs)1
-rw-r--r--tests/rustdoc-ui/issues/ice-bare-dyn-106213.rs (renamed from tests/rustdoc-ui/issues/issue-106213.rs)1
-rw-r--r--tests/rustdoc-ui/issues/ice-bare-dyn-106213.stderr (renamed from tests/rustdoc-ui/issues/issue-106213.stderr)2
-rw-r--r--tests/rustdoc-ui/issues/ice-generic-type-alias-105742.rs (renamed from tests/rustdoc-ui/issues/issue-105742.rs)1
-rw-r--r--tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr (renamed from tests/rustdoc-ui/issues/issue-105742.stderr)148
-rw-r--r--tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.rs5
-rw-r--r--tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.stderr (renamed from tests/rustdoc-ui/issues/issue-105737.stderr)2
-rw-r--r--tests/rustdoc-ui/issues/ice-macro-hidden-exported-macro-defid-101076.rs (renamed from tests/rustdoc-ui/issues/issue-101076.rs)1
-rw-r--r--tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.rs (renamed from tests/rustdoc-ui/issues/issue-106226.rs)0
-rw-r--r--tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.stderr (renamed from tests/rustdoc-ui/issues/issue-106226.stderr)2
-rw-r--r--tests/rustdoc-ui/issues/ice-raw-str-105334.rs3
-rw-r--r--tests/rustdoc-ui/issues/ice-raw-str-105334.stderr (renamed from tests/rustdoc-ui/issues/issue-105334.stderr)2
-rw-r--r--tests/rustdoc-ui/issues/ice-typeof-102986.rs (renamed from tests/rustdoc-ui/issues/issue-102986.rs)1
-rw-r--r--tests/rustdoc-ui/issues/ice-typeof-102986.stderr (renamed from tests/rustdoc-ui/issues/issue-102986.stderr)2
-rw-r--r--tests/rustdoc-ui/issues/ice-unresolved-self-103997.rs (renamed from tests/rustdoc-ui/issues/issue-103997.rs)1
-rw-r--r--tests/rustdoc-ui/issues/ice-unresolved-self-103997.stderr (renamed from tests/rustdoc-ui/issues/issue-103997.stderr)2
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.rs2
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.rs4
-rw-r--r--tests/ui-fulldeps/lexer/unicode-version.rs27
-rw-r--r--tests/ui-fulldeps/lexer/unicode-version.run.stdout4
-rw-r--r--tests/ui/asm/naked-functions.rs1
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle.fixed14
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle.rs16
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle.stderr39
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr14
-rw-r--r--tests/ui/consts/const-integer-bool-ops.stderr60
-rw-r--r--tests/ui/consts/const-mut-refs/issue-76510.stderr6
-rw-r--r--tests/ui/consts/const-tup-index-span.stderr6
-rw-r--r--tests/ui/consts/issue-54954.stderr18
-rw-r--r--tests/ui/consts/missing_assoc_const_type2.stderr6
-rw-r--r--tests/ui/consts/promoted-type-error-issue-133968.rs7
-rw-r--r--tests/ui/consts/promoted-type-error-issue-133968.stderr16
-rw-r--r--tests/ui/dataflow_const_prop/ptr-in-switch-int-issue-131227.rs19
-rw-r--r--tests/ui/destructuring-assignment/struct_destructure_fail.stderr22
-rw-r--r--tests/ui/enum-discriminant/issue-41394.stderr6
-rw-r--r--tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.stderr2
-rw-r--r--tests/ui/extern/extern-C-str-arg-ice-80125.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-default-field-values.rs106
-rw-r--r--tests/ui/feature-gates/feature-gate-default-field-values.stderr318
-rw-r--r--tests/ui/layout/base-layout-is-sized-ice-123078.stderr6
-rw-r--r--tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-dylib.rs (renamed from tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-dylib.rs)0
-rw-r--r--tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-rlib.rs (renamed from tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs)0
-rw-r--r--tests/ui/link-native-libs/empty-kind-1.rs (renamed from tests/ui/native-library-link-flags/empty-kind-1.rs)0
-rw-r--r--tests/ui/link-native-libs/empty-kind-1.stderr (renamed from tests/ui/native-library-link-flags/empty-kind-1.stderr)0
-rw-r--r--tests/ui/link-native-libs/empty-kind-2.rs (renamed from tests/ui/native-library-link-flags/empty-kind-2.rs)0
-rw-r--r--tests/ui/link-native-libs/empty-kind-2.stderr (renamed from tests/ui/native-library-link-flags/empty-kind-2.stderr)0
-rw-r--r--tests/ui/link-native-libs/issue-109144.rs (renamed from tests/ui/linkage-attr/issue-109144.rs)0
-rw-r--r--tests/ui/link-native-libs/issue-109144.stderr (renamed from tests/ui/linkage-attr/issue-109144.stderr)0
-rw-r--r--tests/ui/link-native-libs/issue-43925.rs (renamed from tests/ui/issues/issue-43925.rs)0
-rw-r--r--tests/ui/link-native-libs/issue-43925.stderr (renamed from tests/ui/issues/issue-43925.stderr)0
-rw-r--r--tests/ui/link-native-libs/issue-43926.rs (renamed from tests/ui/issues/issue-43926.rs)0
-rw-r--r--tests/ui/link-native-libs/issue-43926.stderr (renamed from tests/ui/issues/issue-43926.stderr)0
-rw-r--r--tests/ui/link-native-libs/issue-70093/issue-70093-link-directives.rs (renamed from tests/ui/issues/issue-70093/issue-70093-link-directives.rs)0
-rw-r--r--tests/ui/link-native-libs/issue-70093/issue-70093.rs (renamed from tests/ui/issues/issue-70093/issue-70093.rs)0
-rw-r--r--tests/ui/link-native-libs/kind-framework.rs (renamed from tests/ui/linkage-attr/kind-framework.rs)0
-rw-r--r--tests/ui/link-native-libs/kind-framework.stderr (renamed from tests/ui/linkage-attr/kind-framework.stderr)0
-rw-r--r--tests/ui/link-native-libs/link-arg-error.rs (renamed from tests/ui/native-library-link-flags/link-arg-error.rs)0
-rw-r--r--tests/ui/link-native-libs/link-arg-error.stderr (renamed from tests/ui/native-library-link-flags/link-arg-error.stderr)0
-rw-r--r--tests/ui/link-native-libs/link-arg-from-rs.rs (renamed from tests/ui/native-library-link-flags/link-arg-from-rs.rs)0
-rw-r--r--tests/ui/link-native-libs/link-arg-from-rs.stderr (renamed from tests/ui/native-library-link-flags/link-arg-from-rs.stderr)0
-rw-r--r--tests/ui/link-native-libs/link-attr-validation-early.rs (renamed from tests/ui/linkage-attr/link-attr-validation-early.rs)0
-rw-r--r--tests/ui/link-native-libs/link-attr-validation-early.stderr (renamed from tests/ui/linkage-attr/link-attr-validation-early.stderr)0
-rw-r--r--tests/ui/link-native-libs/link-attr-validation-late.rs (renamed from tests/ui/linkage-attr/link-attr-validation-late.rs)0
-rw-r--r--tests/ui/link-native-libs/link-attr-validation-late.stderr (renamed from tests/ui/linkage-attr/link-attr-validation-late.stderr)0
-rw-r--r--tests/ui/link-native-libs/link-cfg-works.rs (renamed from tests/ui/linkage-attr/link-cfg-works.rs)0
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-form.rs (renamed from tests/ui/manual/manual-link-bad-form.rs)0
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-form.stderr (renamed from tests/ui/manual/manual-link-bad-form.stderr)0
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-kind.rs (renamed from tests/ui/manual/manual-link-bad-kind.rs)0
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-kind.stderr (renamed from tests/ui/manual/manual-link-bad-kind.stderr)0
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-search-path.rs (renamed from tests/ui/manual/manual-link-bad-search-path.rs)0
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-search-path.stderr (renamed from tests/ui/manual/manual-link-bad-search-path.stderr)0
-rw-r--r--tests/ui/link-native-libs/manual-link-framework.rs (renamed from tests/ui/manual/manual-link-framework.rs)0
-rw-r--r--tests/ui/link-native-libs/manual-link-framework.stderr (renamed from tests/ui/manual/manual-link-framework.stderr)0
-rw-r--r--tests/ui/link-native-libs/manual-link-unsupported-kind.rs (renamed from tests/ui/manual/manual-link-unsupported-kind.rs)0
-rw-r--r--tests/ui/link-native-libs/manual-link-unsupported-kind.stderr (renamed from tests/ui/manual/manual-link-unsupported-kind.stderr)0
-rw-r--r--tests/ui/link-native-libs/modifiers-bad.blank.stderr (renamed from tests/ui/native-library-link-flags/modifiers-bad.blank.stderr)0
-rw-r--r--tests/ui/link-native-libs/modifiers-bad.no-prefix.stderr (renamed from tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr)0
-rw-r--r--tests/ui/link-native-libs/modifiers-bad.prefix-only.stderr (renamed from tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr)0
-rw-r--r--tests/ui/link-native-libs/modifiers-bad.rs (renamed from tests/ui/native-library-link-flags/modifiers-bad.rs)0
-rw-r--r--tests/ui/link-native-libs/modifiers-bad.unknown.stderr (renamed from tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr)0
-rw-r--r--tests/ui/link-native-libs/modifiers-override-2.rs (renamed from tests/ui/native-library-link-flags/modifiers-override-2.rs)0
-rw-r--r--tests/ui/link-native-libs/modifiers-override-2.stderr (renamed from tests/ui/native-library-link-flags/modifiers-override-2.stderr)0
-rw-r--r--tests/ui/link-native-libs/modifiers-override-3.rs (renamed from tests/ui/native-library-link-flags/modifiers-override-3.rs)0
-rw-r--r--tests/ui/link-native-libs/modifiers-override-3.stderr (renamed from tests/ui/native-library-link-flags/modifiers-override-3.stderr)0
-rw-r--r--tests/ui/link-native-libs/modifiers-override.rs (renamed from tests/ui/native-library-link-flags/modifiers-override.rs)0
-rw-r--r--tests/ui/link-native-libs/modifiers-override.stderr (renamed from tests/ui/native-library-link-flags/modifiers-override.stderr)0
-rw-r--r--tests/ui/link-native-libs/msvc-non-utf8-output.rs (renamed from tests/ui/native-library-link-flags/msvc-non-utf8-output.rs)0
-rw-r--r--tests/ui/link-native-libs/msvc-non-utf8-output.stderr (renamed from tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr)0
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-1.rs (renamed from tests/ui/native-library-link-flags/suggest-libname-only-1.rs)0
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-1.stderr (renamed from tests/ui/native-library-link-flags/suggest-libname-only-1.stderr)0
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-2.rs (renamed from tests/ui/native-library-link-flags/suggest-libname-only-2.rs)0
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-2.stderr (renamed from tests/ui/native-library-link-flags/suggest-libname-only-2.stderr)0
-rw-r--r--tests/ui/link-native-libs/uikit-framework.rs (renamed from tests/ui/linkage-attr/uikit-framework.rs)0
-rw-r--r--tests/ui/lint/extern-C-fnptr-lints-slices.rs2
-rw-r--r--tests/ui/lint/extern-C-fnptr-lints-slices.stderr7
-rw-r--r--tests/ui/lint/improper_ctypes_definitions_ice_134060.rs15
-rw-r--r--tests/ui/lint/improper_ctypes_definitions_ice_134060.stderr12
-rw-r--r--tests/ui/lint/lint-ctypes-73249-2.stderr1
-rw-r--r--tests/ui/lint/lint-ctypes-94223.stderr26
-rw-r--r--tests/ui/lint/lint-ctypes-cstr.rs4
-rw-r--r--tests/ui/lint/lint-ctypes-cstr.stderr11
-rw-r--r--tests/ui/lint/lint-ctypes-fn.rs6
-rw-r--r--tests/ui/lint/lint-ctypes-fn.stderr22
-rw-r--r--tests/ui/lint/lint-ctypes.rs35
-rw-r--r--tests/ui/lint/lint-ctypes.stderr123
-rw-r--r--tests/ui/parser/struct-default-values-and-missing-field-separator.fixed35
-rw-r--r--tests/ui/parser/struct-default-values-and-missing-field-separator.rs21
-rw-r--r--tests/ui/parser/struct-default-values-and-missing-field-separator.stderr181
-rw-r--r--tests/ui/range/issue-54505-no-std.rs1
-rw-r--r--tests/ui/range/issue-54505-no-std.stderr11
-rw-r--r--tests/ui/range/issue-54505.fixed1
-rw-r--r--tests/ui/range/issue-54505.rs1
-rw-r--r--tests/ui/range/issue-54505.stderr11
-rw-r--r--tests/ui/resolve/generic-params-from-outer-item-in-const-item.default.stderr14
-rw-r--r--tests/ui/resolve/generic-params-from-outer-item-in-const-item.generic_const_items.stderr14
-rw-r--r--tests/ui/resolve/issue-50599.stderr6
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr6
-rw-r--r--tests/ui/self/arbitrary-self-from-method-substs-ice.stderr6
-rw-r--r--tests/ui/stats/input-stats.stderr36
-rw-r--r--tests/ui/structs/auxiliary/struct_field_default.rs5
-rw-r--r--tests/ui/structs/default-field-values-failures.rs64
-rw-r--r--tests/ui/structs/default-field-values-failures.stderr118
-rw-r--r--tests/ui/structs/default-field-values-invalid-const.rs16
-rw-r--r--tests/ui/structs/default-field-values-invalid-const.stderr17
-rw-r--r--tests/ui/structs/default-field-values-support.rs74
-rw-r--r--tests/ui/thir-print/thir-tree-match.stdout6
-rw-r--r--tests/ui/type/type-dependent-def-issue-49241.stderr6
152 files changed, 2021 insertions, 1664 deletions
diff --git a/tests/coverage/branch/guard.cov-map b/tests/coverage/branch/guard.cov-map
index 1ba1c6e1228..7ca499bd847 100644
--- a/tests/coverage/branch/guard.cov-map
+++ b/tests/coverage/branch/guard.cov-map
@@ -1,35 +1,37 @@
 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, 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]
+Raw bytes (89): 0x[01, 01, 08, 05, 0d, 05, 17, 0d, 11, 1f, 17, 05, 09, 0d, 11, 1f, 15, 05, 09, 0d, 01, 0c, 01, 01, 10, 02, 03, 0b, 00, 0c, 15, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 05, 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, 06, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 0e, 03, 0e, 02, 0a, 1b, 04, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
-- expression 0 operands: lhs = Counter(6), rhs = Counter(3)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(5)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(4)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
+Number of expressions: 8
+- expression 0 operands: lhs = Counter(1), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(5, Add)
+- expression 2 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 3 operands: lhs = Expression(7, Add), rhs = Expression(5, Add)
+- expression 4 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 5 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(5)
+- expression 7 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(Expression(0, Sub)) at (prev + 3, 11) to (start + 0, 12)
-    = (c6 - c3)
+    = (c1 - 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)
+- Code(Counter(1)) at (prev + 0, 20) to (start + 0, 25)
 - Branch { true: Counter(3), false: Expression(0, Sub) } at (prev + 0, 20) to (start + 0, 30)
     true  = c3
-    false = (c6 - c3)
+    false = (c1 - c3)
 - Code(Counter(3)) at (prev + 0, 29) to (start + 2, 10)
 - Code(Counter(4)) at (prev + 3, 14) to (start + 0, 15)
 - 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)
+    = (c1 - c3)
+- Branch { true: Counter(4), false: Expression(1, Sub) } at (prev + 0, 20) to (start + 0, 30)
     true  = c4
-    false = c1
+    false = (c1 - (c3 + c4))
 - 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: c6
+- Code(Expression(3, Sub)) at (prev + 3, 14) to (start + 2, 10)
+    = ((c1 + c2) - (c3 + c4))
+- Code(Expression(6, Add)) at (prev + 4, 1) to (start + 0, 2)
+    = ((c1 + c2) + c5)
+Highest counter ID seen: c5
 
diff --git a/tests/coverage/branch/if-let.cov-map b/tests/coverage/branch/if-let.cov-map
index 380765c7af4..773c5392465 100644
--- a/tests/coverage/branch/if-let.cov-map
+++ b/tests/coverage/branch/if-let.cov-map
@@ -19,14 +19,18 @@ Number of file 0 mappings: 7
 Highest counter ID seen: c2
 
 Function name: if_let::if_let_chain
-Raw bytes (66): 0x[01, 01, 04, 01, 05, 05, 09, 0f, 0d, 05, 09, 0a, 01, 17, 01, 00, 33, 20, 02, 05, 01, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 17, 20, 0d, 09, 01, 10, 00, 17, 0d, 00, 15, 00, 16, 02, 00, 1a, 00, 1b, 0d, 01, 05, 03, 06, 0f, 03, 0c, 02, 06, 0b, 03, 05, 01, 02]
+Raw bytes (74): 0x[01, 01, 08, 01, 05, 01, 1f, 05, 09, 01, 1f, 05, 09, 01, 1f, 05, 09, 05, 09, 0a, 01, 17, 01, 00, 33, 20, 02, 05, 01, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 17, 20, 16, 09, 01, 10, 00, 17, 16, 00, 15, 00, 16, 02, 00, 1a, 00, 1b, 16, 01, 05, 03, 06, 1f, 03, 0c, 02, 06, 01, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(7, Add)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(0), rhs = Expression(7, Add)
+- expression 4 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 5 operands: lhs = Counter(0), rhs = Expression(7, Add)
+- expression 6 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 7 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 23, 1) to (start + 0, 51)
 - Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 1, 12) to (start + 0, 19)
@@ -35,16 +39,17 @@ Number of file 0 mappings: 10
 - Code(Expression(0, Sub)) at (prev + 0, 17) to (start + 0, 18)
     = (c0 - c1)
 - Code(Counter(0)) at (prev + 0, 22) to (start + 0, 23)
-- Branch { true: Counter(3), false: Counter(2) } at (prev + 1, 16) to (start + 0, 23)
-    true  = c3
+- Branch { true: Expression(5, Sub), false: Counter(2) } at (prev + 1, 16) to (start + 0, 23)
+    true  = (c0 - (c1 + c2))
     false = c2
-- Code(Counter(3)) at (prev + 0, 21) to (start + 0, 22)
+- Code(Expression(5, Sub)) at (prev + 0, 21) to (start + 0, 22)
+    = (c0 - (c1 + c2))
 - Code(Expression(0, Sub)) at (prev + 0, 26) to (start + 0, 27)
     = (c0 - c1)
-- Code(Counter(3)) at (prev + 1, 5) to (start + 3, 6)
-- Code(Expression(3, Add)) at (prev + 3, 12) to (start + 2, 6)
+- Code(Expression(5, Sub)) at (prev + 1, 5) to (start + 3, 6)
+    = (c0 - (c1 + c2))
+- Code(Expression(7, Add)) at (prev + 3, 12) to (start + 2, 6)
     = (c1 + c2)
-- Code(Expression(2, Add)) at (prev + 3, 5) to (start + 1, 2)
-    = ((c1 + c2) + c3)
-Highest counter ID seen: c3
+- Code(Counter(0)) at (prev + 3, 5) to (start + 1, 2)
+Highest counter ID seen: c2
 
diff --git a/tests/coverage/branch/if.cov-map b/tests/coverage/branch/if.cov-map
index bab982dd44c..3d9a1d2e1ab 100644
--- a/tests/coverage/branch/if.cov-map
+++ b/tests/coverage/branch/if.cov-map
@@ -1,14 +1,11 @@
 Function name: if::branch_and
-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]
+Raw bytes (54): 0x[01, 01, 03, 05, 09, 09, 0d, 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, 06, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 05, 03, 01, 00, 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 = Counter(2)
-- 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)
+- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 2 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)
@@ -16,15 +13,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(3), false: Counter(4) } at (prev + 0, 13) to (start + 0, 14)
+- Branch { true: Counter(3), false: Expression(1, Sub) } at (prev + 0, 13) to (start + 0, 14)
     true  = c3
-    false = c4
+    false = (c2 - c3)
 - 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
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c1 - c3)
+- Code(Counter(1)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
 Function name: if::branch_not
 Raw bytes (116): 0x[01, 01, 07, 05, 09, 05, 0d, 05, 0d, 05, 11, 05, 11, 05, 15, 05, 15, 12, 01, 0c, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 09, 01, 09, 00, 11, 02, 01, 05, 00, 06, 05, 01, 08, 00, 0a, 20, 0a, 0d, 00, 08, 00, 0a, 0a, 00, 0b, 02, 06, 0d, 02, 05, 00, 06, 05, 01, 08, 00, 0b, 20, 11, 12, 00, 08, 00, 0b, 11, 00, 0c, 02, 06, 12, 02, 05, 00, 06, 05, 01, 08, 00, 0c, 20, 1a, 15, 00, 08, 00, 0c, 1a, 00, 0d, 02, 06, 15, 02, 05, 00, 06, 05, 01, 01, 00, 02]
@@ -108,14 +104,16 @@ Number of file 0 mappings: 14
 Highest counter ID seen: c4
 
 Function name: if::branch_or
-Raw bytes (56): 0x[01, 01, 04, 05, 09, 09, 0d, 0f, 11, 09, 0d, 08, 01, 35, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 0d, 11, 00, 0d, 00, 0e, 0f, 00, 0f, 02, 06, 11, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (60): 0x[01, 01, 06, 05, 09, 05, 17, 09, 0d, 09, 0d, 05, 17, 09, 0d, 08, 01, 35, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 0d, 12, 00, 0d, 00, 0e, 17, 00, 0f, 02, 06, 12, 02, 0c, 02, 06, 05, 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(2), rhs = Counter(3)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(4)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(5, Add)
+- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
 - expression 3 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 4 operands: lhs = Counter(1), rhs = Expression(5, Add)
+- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 53, 1) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 3, 8) to (start + 0, 9)
@@ -124,13 +122,13 @@ Number of file 0 mappings: 8
     false = (c1 - c2)
 - Code(Expression(0, Sub)) at (prev + 0, 13) to (start + 0, 14)
     = (c1 - c2)
-- Branch { true: Counter(3), false: Counter(4) } at (prev + 0, 13) to (start + 0, 14)
+- Branch { true: Counter(3), false: Expression(4, Sub) } at (prev + 0, 13) to (start + 0, 14)
     true  = c3
-    false = c4
-- Code(Expression(3, Add)) at (prev + 0, 15) to (start + 2, 6)
+    false = (c1 - (c2 + c3))
+- Code(Expression(5, Add)) at (prev + 0, 15) to (start + 2, 6)
     = (c2 + c3)
-- Code(Counter(4)) at (prev + 2, 12) to (start + 2, 6)
-- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = ((c2 + c3) + c4)
-Highest counter ID seen: c4
+- Code(Expression(4, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c1 - (c2 + c3))
+- Code(Counter(1)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
diff --git a/tests/coverage/branch/lazy-boolean.cov-map b/tests/coverage/branch/lazy-boolean.cov-map
index decb847f60e..94522734bcd 100644
--- a/tests/coverage/branch/lazy-boolean.cov-map
+++ b/tests/coverage/branch/lazy-boolean.cov-map
@@ -34,85 +34,67 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c2
 
 Function name: lazy_boolean::chain
-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]
+Raw bytes (141): 0x[01, 01, 0f, 05, 09, 09, 0d, 0d, 11, 05, 15, 05, 15, 05, 3b, 15, 19, 05, 3b, 15, 19, 05, 37, 3b, 1d, 15, 19, 05, 37, 3b, 1d, 15, 19, 13, 01, 24, 01, 01, 10, 05, 04, 09, 00, 0a, 05, 00, 0d, 00, 12, 20, 09, 02, 00, 0d, 00, 12, 09, 00, 16, 00, 1b, 20, 0d, 06, 00, 16, 00, 1b, 0d, 00, 1f, 00, 24, 20, 11, 0a, 00, 1f, 00, 24, 11, 00, 28, 00, 2d, 05, 01, 05, 00, 11, 05, 03, 09, 00, 0a, 05, 00, 0d, 00, 12, 20, 15, 12, 00, 0d, 00, 12, 12, 00, 16, 00, 1b, 20, 19, 1e, 00, 16, 00, 1b, 1e, 00, 1f, 00, 24, 20, 1d, 32, 00, 1f, 00, 24, 32, 00, 28, 00, 2d, 05, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-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 expressions: 15
+- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 2 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(1), rhs = Counter(5)
+- expression 4 operands: lhs = Counter(1), rhs = Counter(5)
+- expression 5 operands: lhs = Counter(1), rhs = Expression(14, Add)
+- expression 6 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 7 operands: lhs = Counter(1), rhs = Expression(14, Add)
+- expression 8 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 9 operands: lhs = Counter(1), rhs = Expression(13, Add)
+- expression 10 operands: lhs = Expression(14, Add), rhs = Counter(7)
+- expression 11 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 12 operands: lhs = Counter(1), rhs = Expression(13, Add)
+- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(7)
+- expression 14 operands: lhs = Counter(5), rhs = Counter(6)
 Number of file 0 mappings: 19
 - Code(Counter(0)) at (prev + 36, 1) to (start + 1, 16)
-- Code(Expression(0, Sub)) at (prev + 4, 9) to (start + 0, 10)
-    = (((c1 + c4) + c5) - c3)
+- Code(Counter(1)) at (prev + 4, 9) to (start + 0, 10)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 18)
-- Branch { true: Counter(2), false: Expression(3, Sub) } at (prev + 0, 13) to (start + 0, 18)
+- Branch { true: Counter(2), false: Expression(0, 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(4, Sub) } at (prev + 0, 22) to (start + 0, 27)
+- Branch { true: Counter(3), false: Expression(1, 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)
-- Branch { true: Counter(4), false: Counter(5) } at (prev + 0, 31) to (start + 0, 36)
+- Branch { true: Counter(4), false: Expression(2, Sub) } at (prev + 0, 31) to (start + 0, 36)
     true  = c4
-    false = c5
+    false = (c3 - c4)
 - Code(Counter(4)) at (prev + 0, 40) to (start + 0, 45)
-- 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, 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)
+- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 17)
+- Code(Counter(1)) at (prev + 3, 9) to (start + 0, 10)
+- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 18)
+- Branch { true: Counter(5), false: Expression(4, Sub) } at (prev + 0, 13) to (start + 0, 18)
+    true  = c5
+    false = (c1 - c5)
+- Code(Expression(4, Sub)) at (prev + 0, 22) to (start + 0, 27)
+    = (c1 - c5)
+- Branch { true: Counter(6), false: Expression(7, Sub) } at (prev + 0, 22) to (start + 0, 27)
     true  = c6
-    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)
+    false = (c1 - (c5 + c6))
+- Code(Expression(7, Sub)) at (prev + 0, 31) to (start + 0, 36)
+    = (c1 - (c5 + c6))
+- Branch { true: Counter(7), false: Expression(12, Sub) } at (prev + 0, 31) to (start + 0, 36)
     true  = 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(26, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = (((c6 + c7) + c8) + c9)
-Highest counter ID seen: c9
+    false = (c1 - ((c5 + c6) + c7))
+- Code(Expression(12, Sub)) at (prev + 0, 40) to (start + 0, 45)
+    = (c1 - ((c5 + c6) + c7))
+- Code(Counter(1)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c7
 
 Function name: lazy_boolean::nested_mixed
-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]
+Raw bytes (137): 0x[01, 01, 0d, 05, 09, 05, 1f, 09, 0d, 09, 0d, 1f, 11, 09, 0d, 1f, 11, 09, 0d, 05, 15, 15, 19, 05, 19, 05, 33, 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, 05, 03, 09, 00, 0a, 05, 00, 0e, 00, 13, 20, 15, 22, 00, 0e, 00, 13, 15, 00, 17, 00, 1c, 20, 19, 26, 00, 17, 00, 1c, 2a, 00, 22, 00, 28, 20, 1d, 2e, 00, 22, 00, 28, 1d, 00, 2c, 00, 33, 05, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 15
+Number of expressions: 13
 - 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)
@@ -121,13 +103,11 @@ Number of expressions: 15
 - 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)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(5)
+- expression 9 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 10 operands: lhs = Counter(1), rhs = Counter(6)
+- expression 11 operands: lhs = Counter(1), rhs = Expression(12, Add)
+- expression 12 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(Counter(1)) at (prev + 4, 9) to (start + 0, 10)
@@ -148,23 +128,21 @@ Number of file 0 mappings: 19
 - Code(Expression(6, Sub)) at (prev + 0, 44) to (start + 0, 51)
     = ((c2 + c3) - c4)
 - 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 + 3, 9) to (start + 0, 10)
 - 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)
+- Branch { true: Counter(5), false: Expression(8, Sub) } at (prev + 0, 14) to (start + 0, 19)
     true  = c5
     false = (c1 - c5)
 - Code(Counter(5)) at (prev + 0, 23) to (start + 0, 28)
-- Branch { true: Counter(6), false: Expression(11, Sub) } at (prev + 0, 23) to (start + 0, 28)
+- Branch { true: Counter(6), false: Expression(9, Sub) } at (prev + 0, 23) to (start + 0, 28)
     true  = c6
     false = (c5 - c6)
-- Code(Expression(12, Sub)) at (prev + 0, 34) to (start + 0, 40)
+- Code(Expression(10, 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)
+- Branch { true: Counter(7), false: Expression(11, Sub) } at (prev + 0, 34) to (start + 0, 40)
     true  = c7
-    false = c8
+    false = (c1 - (c6 + c7))
 - Code(Counter(7)) at (prev + 0, 44) to (start + 0, 51)
-- Code(Expression(13, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c6 + c7) + c8)
-Highest counter ID seen: c8
+- Code(Counter(1)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c7
 
diff --git a/tests/coverage/branch/match-arms.cov-map b/tests/coverage/branch/match-arms.cov-map
index a93df9814ee..53d0a4edbd0 100644
--- a/tests/coverage/branch/match-arms.cov-map
+++ b/tests/coverage/branch/match-arms.cov-map
@@ -1,40 +1,45 @@
 Function name: match_arms::guards
-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]
+Raw bytes (98): 0x[01, 01, 0d, 11, 19, 27, 19, 2b, 00, 2f, 11, 33, 0d, 05, 09, 1f, 25, 23, 21, 27, 1d, 2b, 00, 2f, 11, 33, 0d, 05, 09, 0c, 01, 30, 01, 01, 10, 11, 03, 0b, 00, 10, 1d, 01, 11, 00, 29, 20, 1d, 05, 00, 17, 00, 1b, 21, 01, 11, 00, 29, 20, 21, 09, 00, 17, 00, 1b, 25, 01, 11, 00, 29, 20, 25, 0d, 00, 17, 00, 1b, 19, 01, 11, 00, 29, 20, 19, 02, 00, 17, 00, 1b, 06, 01, 0e, 00, 18, 1b, 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 = 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 = 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)
-- expression 7 operands: lhs = Expression(0, Add), rhs = Counter(6)
+Number of expressions: 13
+- expression 0 operands: lhs = Counter(4), rhs = Counter(6)
+- expression 1 operands: lhs = Expression(9, Add), rhs = Counter(6)
+- expression 2 operands: lhs = Expression(10, Add), rhs = Zero
+- expression 3 operands: lhs = Expression(11, Add), rhs = Counter(4)
+- expression 4 operands: lhs = Expression(12, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(9)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(8)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(7)
+- expression 9 operands: lhs = Expression(10, Add), rhs = Zero
+- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(4)
+- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(3)
+- expression 12 operands: lhs = Counter(1), rhs = Counter(2)
 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(1) } at (prev + 0, 23) to (start + 0, 27)
-    true  = c6
-    false = c1
+- Code(Counter(4)) at (prev + 3, 11) to (start + 0, 16)
 - Code(Counter(7)) at (prev + 1, 17) to (start + 0, 41)
-- Branch { true: Counter(7), false: Counter(2) } at (prev + 0, 23) to (start + 0, 27)
+- Branch { true: Counter(7), false: Counter(1) } at (prev + 0, 23) to (start + 0, 27)
     true  = c7
-    false = c2
+    false = c1
 - Code(Counter(8)) at (prev + 1, 17) to (start + 0, 41)
-- Branch { true: Counter(8), false: Counter(3) } at (prev + 0, 23) to (start + 0, 27)
+- Branch { true: Counter(8), false: Counter(2) } at (prev + 0, 23) to (start + 0, 27)
     true  = c8
-    false = c3
+    false = c2
 - Code(Counter(9)) at (prev + 1, 17) to (start + 0, 41)
-- Branch { true: Counter(9), false: Counter(4) } at (prev + 0, 23) to (start + 0, 27)
+- Branch { true: Counter(9), false: Counter(3) } at (prev + 0, 23) to (start + 0, 27)
     true  = c9
-    false = c4
-- Code(Expression(0, Add)) at (prev + 1, 14) to (start + 0, 24)
-    = ((((c1 + c2) + c3) + c4) + Zero)
-- Code(Expression(4, Add)) at (prev + 3, 5) to (start + 1, 2)
-    = ((((((((c1 + c2) + c3) + c4) + Zero) + c6) + c7) + c8) + c9)
-Highest counter ID seen: c10
+    false = c3
+- Code(Counter(6)) at (prev + 1, 17) to (start + 0, 41)
+- Branch { true: Counter(6), false: Expression(0, Sub) } at (prev + 0, 23) to (start + 0, 27)
+    true  = c6
+    false = (c4 - c6)
+- Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 24)
+    = (((((c1 + c2) + c3) + c4) + Zero) - c6)
+- Code(Expression(6, Add)) at (prev + 3, 5) to (start + 1, 2)
+    = (((((((c1 + c2) + c3) + c4) + Zero) + c7) + c8) + c9)
+Highest counter ID seen: c9
 
 Function name: match_arms::match_arms
 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]
diff --git a/tests/coverage/branch/while.cov-map b/tests/coverage/branch/while.cov-map
index 305f6bc74d8..5eb08a42803 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, 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]
+Raw bytes (56): 0x[01, 01, 04, 05, 09, 03, 0d, 03, 0d, 05, 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, 0e, 00, 14, 00, 19, 09, 00, 1a, 03, 06, 05, 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(3), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(1), rhs = Counter(3)
 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)
@@ -53,13 +53,12 @@ Number of file 0 mappings: 8
     false = c3
 - Code(Expression(2, Sub)) at (prev + 0, 20) to (start + 0, 25)
     = ((c1 + c2) - c3)
-- Branch { true: Counter(2), false: Counter(4) } at (prev + 0, 20) to (start + 0, 25)
+- Branch { true: Counter(2), false: Expression(3, Sub) } at (prev + 0, 20) to (start + 0, 25)
     true  = c2
-    false = c4
+    false = (c1 - c3)
 - Code(Counter(2)) at (prev + 0, 26) to (start + 3, 6)
-- Code(Expression(3, Add)) at (prev + 4, 1) to (start + 0, 2)
-    = (c3 + c4)
-Highest counter ID seen: c4
+- Code(Counter(1)) at (prev + 4, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
 Function name: while::while_op_or
 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]
diff --git a/tests/coverage/closure_macro.cov-map b/tests/coverage/closure_macro.cov-map
index aedb924eca8..653848dd6ff 100644
--- a/tests/coverage/closure_macro.cov-map
+++ b/tests/coverage/closure_macro.cov-map
@@ -25,20 +25,20 @@ 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, 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]
+Raw bytes (35): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 05, 01, 10, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 06, 00, 17, 00, 1e, 01, 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 = Expression(2, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
 - 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)
 - Code(Expression(0, Sub)) at (prev + 3, 17) to (start + 0, 22)
     = (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)
-Highest counter ID seen: c3
+- Code(Expression(1, Sub)) at (prev + 0, 23) to (start + 0, 30)
+    = (c0 - (c1 + c2))
+- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
+Highest counter ID seen: c1
 
diff --git a/tests/coverage/closure_macro_async.cov-map b/tests/coverage/closure_macro_async.cov-map
index df4652ac9ce..1bd1460a147 100644
--- a/tests/coverage/closure_macro_async.cov-map
+++ b/tests/coverage/closure_macro_async.cov-map
@@ -34,20 +34,20 @@ 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, 0b, 0d, 05, 09, 05, 01, 14, 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, 01, 0b, 05, 09, 05, 01, 14, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 06, 00, 17, 00, 1e, 01, 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 = Expression(2, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 5
 - Code(Counter(0)) at (prev + 20, 28) to (start + 3, 33)
 - Code(Counter(1)) at (prev + 4, 17) to (start + 1, 39)
 - Code(Expression(0, Sub)) at (prev + 3, 17) to (start + 0, 22)
     = (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)
-Highest counter ID seen: c3
+- Code(Expression(1, Sub)) at (prev + 0, 23) to (start + 0, 30)
+    = (c0 - (c1 + c2))
+- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
+Highest counter ID seen: c1
 
diff --git a/tests/coverage/condition/conditions.cov-map b/tests/coverage/condition/conditions.cov-map
index 72f39b88c6a..417637f2d2e 100644
--- a/tests/coverage/condition/conditions.cov-map
+++ b/tests/coverage/condition/conditions.cov-map
@@ -1,120 +1,103 @@
 Function name: conditions::assign_3_and_or
-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]
+Raw bytes (65): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 09, 01, 1c, 01, 00, 2f, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 0a, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 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 = Counter(0), rhs = Counter(2)
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
 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 + 1, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- Branch { true: Counter(1), false: Expression(2, Sub) } at (prev + 0, 13) to (start + 0, 14)
+- Branch { true: Counter(1), false: Expression(0, 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(3, Sub) } at (prev + 0, 18) to (start + 0, 19)
+- Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
     false = (c1 - c2)
-- Code(Expression(4, Sub)) at (prev + 0, 23) to (start + 0, 24)
+- Code(Expression(2, 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)
+- Branch { true: Counter(3), false: Expression(3, Sub) } at (prev + 0, 23) to (start + 0, 24)
     true  = c3
-    false = c4
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c2 + c3) + c4)
-Highest counter ID seen: c4
+    false = (c0 - (c2 + c3))
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c3
 
 Function name: conditions::assign_3_or_and
-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]
+Raw bytes (63): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 09, 01, 17, 01, 00, 2f, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 09, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 9
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+Number of expressions: 4
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
 - 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 = 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)
+- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
 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)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- Branch { true: Counter(1), false: Expression(4, Sub) } at (prev + 0, 13) to (start + 0, 14)
+- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
-- Code(Expression(4, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(0, 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))
-    false = c4
-- Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = (c0 - (c1 + c4))
-- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 23) to (start + 0, 24)
+- Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
-    false = c3
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = (((c1 + c2) + c3) + c4)
-Highest counter ID seen: c4
+    false = (c0 - (c1 + c2))
+- Code(Counter(2)) at (prev + 0, 23) to (start + 0, 24)
+- Branch { true: Counter(3), false: Expression(3, Sub) } at (prev + 0, 23) to (start + 0, 24)
+    true  = c3
+    false = (c2 - c3)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c3
 
 Function name: conditions::assign_and
-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]
+Raw bytes (47): 0x[01, 01, 02, 01, 05, 05, 09, 07, 01, 0d, 01, 00, 21, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 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 = 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 expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 7
 - Code(Counter(0)) at (prev + 13, 1) to (start + 0, 33)
-- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
-    = (((c0 + c2) + c3) - c1)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - 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)
+- Branch { true: Counter(1), false: Expression(0, 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: Counter(3) } at (prev + 0, 18) to (start + 0, 19)
+- Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
-    false = c3
-- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 1, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c2
 
 Function name: conditions::assign_or
-Raw bytes (51): 0x[01, 01, 04, 07, 0d, 05, 09, 01, 05, 01, 05, 07, 01, 12, 01, 00, 20, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 0e, 00, 0d, 00, 0e, 0e, 00, 12, 00, 13, 20, 09, 0d, 00, 12, 00, 13, 03, 01, 05, 01, 02]
+Raw bytes (49): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 07, 01, 12, 01, 00, 20, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 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 = Counter(3)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
+Number of expressions: 3
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 7
 - Code(Counter(0)) at (prev + 18, 1) to (start + 0, 32)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = ((c1 + c2) + c3)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - 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)
+- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
-- Code(Expression(3, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19)
     = (c0 - c1)
-- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 18) to (start + 0, 19)
+- Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
-    false = c3
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c1 + c2) + c3)
-Highest counter ID seen: c3
+    false = (c0 - (c1 + c2))
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c2
 
 Function name: conditions::foo
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 02, 02]
@@ -126,26 +109,23 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: conditions::func_call
-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]
+Raw bytes (37): 0x[01, 01, 02, 01, 05, 05, 09, 05, 01, 25, 01, 01, 0a, 20, 05, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 0f, 20, 09, 06, 00, 0e, 00, 0f, 01, 01, 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 = Counter(1)
-- 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)
+- expression 1 operands: lhs = Counter(1), 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)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
-- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 14) to (start + 0, 15)
+- Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 14) to (start + 0, 15)
     true  = c2
-    false = c3
-- Code(Expression(1, Sub)) at (prev + 1, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: conditions::simple_assign
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 08, 01, 03, 02]
diff --git a/tests/coverage/conditions.cov-map b/tests/coverage/conditions.cov-map
index 21b2ec9a19e..549b8bb0a20 100644
--- a/tests/coverage/conditions.cov-map
+++ b/tests/coverage/conditions.cov-map
@@ -1,294 +1,192 @@
 Function name: conditions::main
-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]
+Raw bytes (545): 0x[01, 01, 4d, 09, 0d, 01, 09, 0d, 71, 0d, 27, 71, 75, 27, 79, 71, 75, 0d, 23, 27, 79, 71, 75, 01, 03, 03, 15, 19, 65, 19, 4f, 65, 69, 4f, 6d, 65, 69, 19, 4b, 4f, 6d, 65, 69, 03, ef, 01, 15, 19, 15, 19, 1d, 25, 29, 59, 29, 7f, 59, 5d, 7f, 61, 59, 5d, 29, 7b, 7f, 61, 59, 5d, 1d, 87, 01, 25, 29, e7, 01, 1d, eb, 01, 29, ef, 01, 25, 15, 19, 31, 35, e7, 01, 1d, eb, 01, 29, ef, 01, 25, 15, 19, e7, 01, f7, 01, eb, 01, 29, ef, 01, 25, 15, 19, 1d, 31, 35, 4d, 35, df, 01, 4d, 51, df, 01, 55, 4d, 51, 35, db, 01, df, 01, 55, 4d, 51, e7, 01, f3, 01, eb, 01, 29, ef, 01, 25, 15, 19, f7, 01, 35, 1d, 31, 39, 3d, 31, 35, af, 02, 39, 31, 35, 3d, 41, 3d, a7, 02, 41, 45, a7, 02, 49, 41, 45, 3d, a3, 02, a7, 02, 49, 41, 45, af, 02, b3, 02, 31, 35, 39, 3d, 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, 06, 02, 0f, 00, 1c, 0d, 01, 0c, 00, 19, 0a, 00, 1d, 00, 2a, 0e, 00, 2e, 00, 3c, 23, 00, 3d, 02, 0a, 1e, 02, 09, 00, 0a, 0d, 01, 09, 01, 12, 2a, 03, 09, 00, 0f, 03, 03, 09, 01, 0c, 11, 01, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 02, 08, 00, 15, 15, 00, 16, 02, 06, 2e, 02, 0f, 00, 1c, 19, 01, 0c, 00, 19, 32, 00, 1d, 00, 2a, 36, 00, 2e, 00, 3c, 4b, 00, 3d, 02, 0a, 46, 02, 09, 00, 0a, 19, 01, 09, 00, 17, 52, 02, 09, 00, 0f, ef, 01, 03, 08, 00, 0c, 1d, 01, 0d, 01, 10, 21, 01, 11, 02, 0a, 00, 02, 09, 00, 0a, 1d, 02, 0c, 00, 19, 25, 00, 1a, 02, 0a, 5e, 04, 11, 00, 1e, 29, 01, 10, 00, 1d, 62, 00, 21, 00, 2e, 66, 00, 32, 00, 40, 7b, 00, 41, 02, 0e, 76, 02, 0d, 00, 0e, 29, 01, 0d, 00, 1b, 82, 01, 02, 0d, 00, 13, 00, 02, 05, 00, 06, 9e, 01, 02, 09, 01, 0c, 2d, 01, 0d, 02, 06, 00, 02, 05, 00, 06, af, 02, 02, 09, 00, 0a, 9e, 01, 00, 10, 00, 1d, 31, 00, 1e, 02, 06, ae, 01, 02, 0f, 00, 1c, 35, 01, 0c, 00, 19, c2, 01, 00, 1d, 00, 2a, c6, 01, 00, 2e, 00, 3c, db, 01, 00, 3d, 02, 0a, d6, 01, 02, 09, 00, 0a, 35, 01, 09, 00, 17, e2, 01, 02, 0d, 02, 0f, b3, 02, 05, 09, 00, 0a, af, 02, 00, 10, 00, 1d, 39, 00, 1e, 02, 06, 82, 02, 02, 0f, 00, 1c, 3d, 01, 0c, 00, 19, 8a, 02, 00, 1d, 00, 2a, 8e, 02, 00, 2e, 00, 3c, a3, 02, 00, 3d, 02, 0a, 9e, 02, 02, 09, 00, 0a, 3d, 01, 09, 00, 17, aa, 02, 02, 09, 00, 0f, 01, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-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(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 expressions: 77
+- expression 0 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(3), rhs = Counter(28)
+- expression 3 operands: lhs = Counter(3), rhs = Expression(9, Add)
+- expression 4 operands: lhs = Counter(28), rhs = Counter(29)
+- expression 5 operands: lhs = Expression(9, Add), rhs = Counter(30)
+- expression 6 operands: lhs = Counter(28), rhs = Counter(29)
+- expression 7 operands: lhs = Counter(3), rhs = Expression(8, Add)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(30)
+- expression 9 operands: lhs = Counter(28), rhs = Counter(29)
+- expression 10 operands: lhs = Counter(0), rhs = Expression(0, Add)
+- expression 11 operands: lhs = Expression(0, Add), rhs = Counter(5)
+- expression 12 operands: lhs = Counter(6), rhs = Counter(25)
+- expression 13 operands: lhs = Counter(6), rhs = Expression(19, Add)
+- expression 14 operands: lhs = Counter(25), rhs = Counter(26)
+- expression 15 operands: lhs = Expression(19, Add), rhs = Counter(27)
+- expression 16 operands: lhs = Counter(25), rhs = Counter(26)
+- expression 17 operands: lhs = Counter(6), rhs = Expression(18, Add)
+- expression 18 operands: lhs = Expression(19, Add), rhs = Counter(27)
+- expression 19 operands: lhs = Counter(25), rhs = Counter(26)
+- expression 20 operands: lhs = Expression(0, Add), rhs = Expression(59, Add)
+- expression 21 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 22 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 23 operands: lhs = Counter(7), rhs = Counter(9)
+- expression 24 operands: lhs = Counter(10), rhs = Counter(22)
+- expression 25 operands: lhs = Counter(10), rhs = Expression(31, Add)
+- expression 26 operands: lhs = Counter(22), rhs = Counter(23)
+- expression 27 operands: lhs = Expression(31, Add), rhs = Counter(24)
+- expression 28 operands: lhs = Counter(22), rhs = Counter(23)
+- expression 29 operands: lhs = Counter(10), rhs = Expression(30, Add)
+- expression 30 operands: lhs = Expression(31, Add), rhs = Counter(24)
+- expression 31 operands: lhs = Counter(22), rhs = Counter(23)
+- expression 32 operands: lhs = Counter(7), rhs = Expression(33, Add)
+- expression 33 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 34 operands: lhs = Expression(57, Add), rhs = Counter(7)
+- expression 35 operands: lhs = Expression(58, Add), rhs = Counter(10)
+- expression 36 operands: lhs = Expression(59, Add), rhs = Counter(9)
+- expression 37 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 38 operands: lhs = Counter(12), rhs = Counter(13)
+- expression 39 operands: lhs = Expression(57, Add), rhs = Counter(7)
+- expression 40 operands: lhs = Expression(58, Add), rhs = Counter(10)
+- expression 41 operands: lhs = Expression(59, Add), rhs = Counter(9)
+- expression 42 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 43 operands: lhs = Expression(57, Add), rhs = Expression(61, Add)
+- expression 44 operands: lhs = Expression(58, Add), rhs = Counter(10)
+- expression 45 operands: lhs = Expression(59, Add), rhs = Counter(9)
+- expression 46 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 47 operands: lhs = Counter(7), rhs = Counter(12)
+- expression 48 operands: lhs = Counter(13), rhs = Counter(19)
+- expression 49 operands: lhs = Counter(13), rhs = Expression(55, Add)
+- expression 50 operands: lhs = Counter(19), rhs = Counter(20)
+- expression 51 operands: lhs = Expression(55, Add), rhs = Counter(21)
+- expression 52 operands: lhs = Counter(19), rhs = Counter(20)
+- expression 53 operands: lhs = Counter(13), rhs = Expression(54, Add)
+- expression 54 operands: lhs = Expression(55, Add), rhs = Counter(21)
+- expression 55 operands: lhs = Counter(19), rhs = Counter(20)
+- expression 56 operands: lhs = Expression(57, Add), rhs = Expression(60, Add)
+- expression 57 operands: lhs = Expression(58, Add), rhs = Counter(10)
+- expression 58 operands: lhs = Expression(59, Add), rhs = Counter(9)
+- expression 59 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 60 operands: lhs = Expression(61, Add), rhs = Counter(13)
+- expression 61 operands: lhs = Counter(7), rhs = Counter(12)
+- expression 62 operands: lhs = Counter(14), rhs = Counter(15)
+- expression 63 operands: lhs = Counter(12), rhs = Counter(13)
+- expression 64 operands: lhs = Expression(75, Add), rhs = Counter(14)
+- expression 65 operands: lhs = Counter(12), rhs = Counter(13)
+- expression 66 operands: lhs = Counter(15), rhs = Counter(16)
+- expression 67 operands: lhs = Counter(15), rhs = Expression(73, Add)
+- expression 68 operands: lhs = Counter(16), rhs = Counter(17)
+- expression 69 operands: lhs = Expression(73, Add), rhs = Counter(18)
+- expression 70 operands: lhs = Counter(16), rhs = Counter(17)
+- expression 71 operands: lhs = Counter(15), rhs = Expression(72, Add)
+- expression 72 operands: lhs = Expression(73, Add), rhs = Counter(18)
+- expression 73 operands: lhs = Counter(16), rhs = Counter(17)
+- expression 74 operands: lhs = Expression(75, Add), rhs = Expression(76, Add)
+- expression 75 operands: lhs = Counter(12), rhs = Counter(13)
+- expression 76 operands: lhs = Counter(14), rhs = Counter(15)
 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 + c3) + c4) + c5) + c6)
+    = (c2 + c3)
 - Code(Counter(0)) at (prev + 0, 16) to (start + 0, 29)
 - Code(Counter(2)) at (prev + 1, 9) to (start + 1, 10)
-- Code(Expression(4, Sub)) at (prev + 2, 15) to (start + 0, 28)
+- Code(Expression(1, Sub)) at (prev + 2, 15) to (start + 0, 28)
     = (c0 - c2)
-- 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)
-    = (c35 - (c3 + c4))
-- Code(Expression(11, Add)) at (prev + 0, 61) to (start + 2, 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)
-    = (((c3 + c4) + c5) + c6)
-- Code(Expression(13, Sub)) at (prev + 3, 9) to (start + 0, 15)
-    = (c0 - (c2 + c35))
+- Code(Counter(3)) at (prev + 1, 12) to (start + 0, 25)
+- Code(Expression(2, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = (c3 - c28)
+- Code(Expression(3, Sub)) at (prev + 0, 46) to (start + 0, 60)
+    = (c3 - (c28 + c29))
+- Code(Expression(8, Add)) at (prev + 0, 61) to (start + 2, 10)
+    = ((c28 + c29) + c30)
+- Code(Expression(7, Sub)) at (prev + 2, 9) to (start + 0, 10)
+    = (c3 - ((c28 + c29) + c30))
+- Code(Counter(3)) at (prev + 1, 9) to (start + 1, 18)
+- Code(Expression(10, Sub)) at (prev + 3, 9) to (start + 0, 15)
+    = (c0 - (c2 + c3))
 - Code(Expression(0, Add)) at (prev + 3, 9) to (start + 1, 12)
-    = ((((c2 + c3) + c4) + c5) + c6)
-- Code(Counter(7)) at (prev + 1, 13) to (start + 2, 6)
+    = (c2 + c3)
+- Code(Counter(4)) 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 + 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 + 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)
+    = (c2 + c3)
+- Code(Counter(5)) at (prev + 0, 22) to (start + 2, 6)
+- Code(Expression(11, Sub)) at (prev + 2, 15) to (start + 0, 28)
+    = ((c2 + c3) - c5)
+- Code(Counter(6)) at (prev + 1, 12) to (start + 0, 25)
+- Code(Expression(12, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = (c6 - c25)
+- Code(Expression(13, Sub)) at (prev + 0, 46) to (start + 0, 60)
+    = (c6 - (c25 + c26))
+- Code(Expression(18, Add)) at (prev + 0, 61) to (start + 2, 10)
+    = ((c25 + c26) + c27)
+- Code(Expression(17, Sub)) at (prev + 2, 9) to (start + 0, 10)
+    = (c6 - ((c25 + c26) + c27))
+- Code(Counter(6)) at (prev + 1, 9) to (start + 0, 23)
+- Code(Expression(20, Sub)) at (prev + 2, 9) to (start + 0, 15)
+    = ((c2 + c3) - (c5 + c6))
+- Code(Expression(59, Add)) at (prev + 3, 8) to (start + 0, 12)
+    = (c5 + c6)
+- Code(Counter(7)) at (prev + 1, 13) to (start + 1, 16)
+- Code(Counter(8)) at (prev + 1, 17) to (start + 2, 10)
 - Code(Zero) at (prev + 2, 9) to (start + 0, 10)
-- 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)
-    = (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(Counter(7)) at (prev + 2, 12) to (start + 0, 25)
+- Code(Counter(9)) at (prev + 0, 26) to (start + 2, 10)
+- Code(Expression(23, Sub)) at (prev + 4, 17) to (start + 0, 30)
+    = (c7 - c9)
+- Code(Counter(10)) at (prev + 1, 16) to (start + 0, 29)
+- Code(Expression(24, Sub)) at (prev + 0, 33) to (start + 0, 46)
+    = (c10 - c22)
+- Code(Expression(25, Sub)) at (prev + 0, 50) to (start + 0, 64)
+    = (c10 - (c22 + c23))
+- Code(Expression(30, Add)) at (prev + 0, 65) to (start + 2, 14)
+    = ((c22 + c23) + c24)
+- Code(Expression(29, Sub)) at (prev + 2, 13) to (start + 0, 14)
+    = (c10 - ((c22 + c23) + c24))
+- Code(Counter(10)) at (prev + 1, 13) to (start + 0, 27)
+- Code(Expression(32, Sub)) at (prev + 2, 13) to (start + 0, 19)
+    = (c7 - (c9 + c10))
 - Code(Zero) at (prev + 2, 5) to (start + 0, 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(Expression(39, Sub)) at (prev + 2, 9) to (start + 1, 12)
+    = ((((c5 + c6) + c9) + c10) - c7)
+- Code(Counter(11)) at (prev + 1, 13) to (start + 2, 6)
 - Code(Zero) at (prev + 2, 5) to (start + 0, 6)
-- 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
+- Code(Expression(75, Add)) at (prev + 2, 9) to (start + 0, 10)
+    = (c12 + c13)
+- Code(Expression(39, Sub)) at (prev + 0, 16) to (start + 0, 29)
+    = ((((c5 + c6) + c9) + c10) - c7)
+- Code(Counter(12)) at (prev + 0, 30) to (start + 2, 6)
+- Code(Expression(43, Sub)) at (prev + 2, 15) to (start + 0, 28)
+    = ((((c5 + c6) + c9) + c10) - (c7 + c12))
+- Code(Counter(13)) at (prev + 1, 12) to (start + 0, 25)
+- Code(Expression(48, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = (c13 - c19)
+- Code(Expression(49, Sub)) at (prev + 0, 46) to (start + 0, 60)
+    = (c13 - (c19 + c20))
+- Code(Expression(54, Add)) at (prev + 0, 61) to (start + 2, 10)
+    = ((c19 + c20) + c21)
+- Code(Expression(53, Sub)) at (prev + 2, 9) to (start + 0, 10)
+    = (c13 - ((c19 + c20) + c21))
+- Code(Counter(13)) at (prev + 1, 9) to (start + 0, 23)
+- Code(Expression(56, Sub)) at (prev + 2, 13) to (start + 2, 15)
+    = ((((c5 + c6) + c9) + c10) - ((c7 + c12) + c13))
+- Code(Expression(76, Add)) at (prev + 5, 9) to (start + 0, 10)
+    = (c14 + c15)
+- Code(Expression(75, Add)) at (prev + 0, 16) to (start + 0, 29)
+    = (c12 + c13)
+- Code(Counter(14)) at (prev + 0, 30) to (start + 2, 6)
+- Code(Expression(64, Sub)) at (prev + 2, 15) to (start + 0, 28)
+    = ((c12 + c13) - c14)
+- Code(Counter(15)) at (prev + 1, 12) to (start + 0, 25)
+- Code(Expression(66, Sub)) at (prev + 0, 29) to (start + 0, 42)
+    = (c15 - c16)
+- Code(Expression(67, Sub)) at (prev + 0, 46) to (start + 0, 60)
+    = (c15 - (c16 + c17))
+- Code(Expression(72, Add)) at (prev + 0, 61) to (start + 2, 10)
+    = ((c16 + c17) + c18)
+- Code(Expression(71, Sub)) at (prev + 2, 9) to (start + 0, 10)
+    = (c15 - ((c16 + c17) + c18))
+- Code(Counter(15)) at (prev + 1, 9) to (start + 0, 23)
+- Code(Expression(74, Sub)) at (prev + 2, 9) to (start + 0, 15)
+    = ((c12 + c13) - (c14 + c15))
+- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
+Highest counter ID seen: c15
 
diff --git a/tests/coverage/continue.cov-map b/tests/coverage/continue.cov-map
index 55313d7db49..eb968fbb747 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, 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]
+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, 3d, 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, 6e, 04, 11, 00, 16, 41, 03, 09, 00, 0e, 3d, 02, 0d, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 28
@@ -30,7 +30,7 @@ Number of expressions: 28
 - 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(17), rhs = Counter(18)
+- expression 27 operands: lhs = Counter(15), rhs = Counter(17)
 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)
@@ -72,9 +72,9 @@ Number of file 0 mappings: 30
 - Code(Expression(25, Sub)) at (prev + 1, 15) to (start + 0, 22)
     = ((c15 + c16) - c17)
 - Code(Counter(16)) at (prev + 1, 22) to (start + 2, 14)
-- Code(Counter(18)) at (prev + 4, 17) to (start + 0, 22)
+- Code(Expression(27, Sub)) at (prev + 4, 17) to (start + 0, 22)
+    = (c15 - c17)
 - Code(Counter(16)) at (prev + 3, 9) to (start + 0, 14)
-- Code(Expression(27, Add)) at (prev + 2, 13) to (start + 1, 2)
-    = (c17 + c18)
-Highest counter ID seen: c18
+- Code(Counter(15)) at (prev + 2, 13) to (start + 1, 2)
+Highest counter ID seen: c16
 
diff --git a/tests/coverage/coroutine.cov-map b/tests/coverage/coroutine.cov-map
index 21f6787e9f2..7457a528a86 100644
--- a/tests/coverage/coroutine.cov-map
+++ b/tests/coverage/coroutine.cov-map
@@ -13,18 +13,14 @@ 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, 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]
+Raw bytes (57): 0x[01, 01, 04, 07, 0d, 05, 09, 11, 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, 0a, 01, 22, 00, 27, 15, 00, 2c, 00, 2e, 0e, 01, 0e, 00, 35, 15, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 8
+Number of expressions: 4
 - 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 = 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 = Counter(4), rhs = Expression(7, Add)
-- expression 7 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 2 operands: lhs = Counter(4), rhs = Counter(6)
+- expression 3 operands: lhs = Counter(4), rhs = Counter(5)
 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)
@@ -33,14 +29,12 @@ Number of file 0 mappings: 9
     = ((c1 + c2) + c3)
 - Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46)
 - Code(Expression(2, Sub)) at (prev + 1, 34) to (start + 0, 39)
+    = (c4 - c6)
+- Code(Counter(5)) at (prev + 0, 44) to (start + 0, 46)
+- Code(Expression(3, Sub)) at (prev + 1, 14) to (start + 0, 53)
     = (c4 - c5)
-- Code(Expression(6, Sub)) at (prev + 0, 44) to (start + 0, 46)
-    = (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))
-Highest counter ID seen: c4
+- Code(Counter(5)) at (prev + 2, 1) to (start + 0, 2)
+Highest counter ID seen: c5
 
 Function name: coroutine::main::{closure#0}
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 16, 08, 01, 1f, 05, 02, 10, 01, 06]
diff --git a/tests/coverage/inline.cov-map b/tests/coverage/inline.cov-map
index 1b5b45695dc..39ba2b2d99b 100644
--- a/tests/coverage/inline.cov-map
+++ b/tests/coverage/inline.cov-map
@@ -41,7 +41,7 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: inline::permutate::<char>
-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]
+Raw bytes (54): 0x[01, 01, 05, 01, 05, 01, 0b, 05, 0d, 13, 0d, 01, 09, 08, 01, 0f, 01, 02, 0e, 05, 02, 0f, 02, 06, 02, 02, 0f, 00, 14, 11, 01, 0d, 00, 0e, 0d, 00, 12, 00, 16, 11, 00, 17, 04, 0a, 06, 05, 0c, 02, 06, 0e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 5
@@ -49,19 +49,19 @@ Number of expressions: 5
 - 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)
+- expression 4 operands: lhs = Counter(0), 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)
 - Code(Expression(0, Sub)) at (prev + 2, 15) to (start + 0, 20)
     = (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))
+- Code(Counter(3)) at (prev + 0, 18) to (start + 0, 22)
 - Code(Counter(4)) at (prev + 0, 23) to (start + 4, 10)
-- Code(Counter(3)) at (prev + 5, 12) to (start + 2, 6)
-- Code(Expression(3, Add)) at (prev + 3, 1) to (start + 0, 2)
-    = ((c1 + c2) + c3)
+- Code(Expression(1, Sub)) at (prev + 5, 12) to (start + 2, 6)
+    = (c0 - (c1 + c3))
+- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = ((c0 + c2) - c3)
 Highest counter ID seen: c4
 
 Function name: inline::permutations::<char>
diff --git a/tests/coverage/loops_branches.cov-map b/tests/coverage/loops_branches.cov-map
index 14707701d8a..0279a1a5157 100644
--- a/tests/coverage/loops_branches.cov-map
+++ b/tests/coverage/loops_branches.cov-map
@@ -1,42 +1,32 @@
 Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt
-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]
+Raw bytes (152): 0x[01, 01, 18, 05, 00, 27, 57, 53, 00, 01, 1d, 11, 19, 27, 11, 53, 00, 01, 1d, 27, 57, 53, 00, 01, 1d, 11, 19, 53, 57, 01, 1d, 11, 19, 53, 47, 01, 1d, 57, 00, 11, 19, 53, 57, 01, 1d, 11, 19, 5f, 19, 11, 15, 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, 22, 03, 0d, 00, 0e, 16, 00, 12, 00, 17, 22, 01, 10, 00, 14, 4e, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 3e, 01, 11, 00, 12, 4e, 01, 11, 00, 22, 15, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, 5b, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 34
+Number of expressions: 24
 - expression 0 operands: lhs = Counter(1), 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)
+- expression 1 operands: lhs = Expression(9, Add), rhs = Expression(21, Add)
+- expression 2 operands: lhs = Expression(20, Add), rhs = Zero
+- expression 3 operands: lhs = Counter(0), rhs = Counter(7)
+- expression 4 operands: lhs = Counter(4), rhs = Counter(6)
+- expression 5 operands: lhs = Expression(9, Add), rhs = Counter(4)
+- expression 6 operands: lhs = Expression(20, Add), rhs = Zero
+- expression 7 operands: lhs = Counter(0), rhs = Counter(7)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Expression(21, Add)
+- expression 9 operands: lhs = Expression(20, Add), rhs = Zero
+- expression 10 operands: lhs = Counter(0), rhs = Counter(7)
+- expression 11 operands: lhs = Counter(4), rhs = Counter(6)
+- expression 12 operands: lhs = Expression(20, Add), rhs = Expression(21, Add)
+- expression 13 operands: lhs = Counter(0), rhs = Counter(7)
+- expression 14 operands: lhs = Counter(4), rhs = Counter(6)
+- expression 15 operands: lhs = Expression(20, Add), rhs = Expression(17, Add)
+- expression 16 operands: lhs = Counter(0), rhs = Counter(7)
+- expression 17 operands: lhs = Expression(21, Add), rhs = Zero
+- expression 18 operands: lhs = Counter(4), rhs = Counter(6)
+- expression 19 operands: lhs = Expression(20, Add), rhs = Expression(21, Add)
+- expression 20 operands: lhs = Counter(0), rhs = Counter(7)
+- expression 21 operands: lhs = Counter(4), rhs = Counter(6)
+- expression 22 operands: lhs = Expression(23, Add), rhs = Counter(6)
+- expression 23 operands: lhs = Counter(4), rhs = Counter(5)
 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)
@@ -47,57 +37,57 @@ Number of file 0 mappings: 20
 - Code(Counter(1)) at (prev + 1, 13) to (start + 0, 30)
 - Code(Counter(4)) at (prev + 0, 30) to (start + 0, 31)
 - Code(Zero) at (prev + 1, 16) to (start + 1, 10)
-- 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(Expression(8, Sub)) at (prev + 3, 13) to (start + 0, 14)
+    = (((c0 + c7) + Zero) - (c4 + c6))
+- Code(Expression(5, Sub)) at (prev + 0, 18) to (start + 0, 23)
+    = (((c0 + c7) + Zero) - c4)
+- Code(Expression(8, Sub)) at (prev + 1, 16) to (start + 0, 20)
+    = (((c0 + c7) + Zero) - (c4 + c6))
+- Code(Expression(19, Sub)) at (prev + 1, 20) to (start + 0, 25)
+    = ((c0 + c7) - (c4 + c6))
 - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
-- 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(Expression(15, Sub)) at (prev + 1, 17) to (start + 0, 18)
+    = ((c0 + c7) - ((c4 + c6) + Zero))
+- Code(Expression(19, Sub)) at (prev + 1, 17) to (start + 0, 34)
+    = ((c0 + c7) - (c4 + c6))
+- Code(Counter(5)) at (prev + 0, 34) to (start + 0, 35)
 - Code(Zero) at (prev + 1, 20) to (start + 1, 14)
-- 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
+- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15)
+- Code(Expression(22, Add)) at (prev + 1, 5) to (start + 0, 6)
+    = ((c4 + c5) + c6)
+Highest counter ID seen: c6
 
 Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt
-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]
+Raw bytes (154): 0x[01, 01, 19, 01, 00, 01, 00, 2b, 63, 2f, 0d, 01, 00, 11, 15, 2b, 11, 2f, 0d, 01, 00, 2b, 63, 2f, 0d, 01, 00, 11, 15, 57, 63, 01, 0d, 11, 15, 57, 4b, 01, 0d, 63, 00, 11, 15, 57, 63, 01, 0d, 11, 15, 63, 21, 11, 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, 11, 00, 1e, 00, 1f, 26, 02, 0d, 00, 0e, 1a, 00, 12, 00, 17, 26, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 52, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 42, 01, 11, 00, 12, 52, 01, 11, 00, 22, 21, 00, 22, 00, 23, 15, 03, 09, 00, 0f, 5f, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 24
+Number of expressions: 25
 - expression 0 operands: lhs = Counter(0), rhs = Zero
 - 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 = 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)
+- expression 2 operands: lhs = Expression(10, Add), rhs = Expression(24, Add)
+- expression 3 operands: lhs = Expression(11, Add), rhs = Counter(3)
+- expression 4 operands: lhs = Counter(0), rhs = Zero
+- expression 5 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 6 operands: lhs = Expression(10, Add), rhs = Counter(4)
+- expression 7 operands: lhs = Expression(11, Add), rhs = Counter(3)
+- expression 8 operands: lhs = Counter(0), rhs = Zero
+- expression 9 operands: lhs = Expression(10, Add), rhs = Expression(24, Add)
+- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(3)
+- expression 11 operands: lhs = Counter(0), rhs = Zero
+- expression 12 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 13 operands: lhs = Expression(21, Add), rhs = Expression(24, Add)
+- expression 14 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 15 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 16 operands: lhs = Expression(21, Add), rhs = Expression(18, Add)
+- expression 17 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 18 operands: lhs = Expression(24, Add), rhs = Zero
+- expression 19 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 20 operands: lhs = Expression(21, Add), rhs = Expression(24, Add)
+- expression 21 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 22 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 23 operands: lhs = Expression(24, Add), rhs = Counter(8)
+- expression 24 operands: lhs = Counter(4), rhs = Counter(5)
 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)
@@ -109,27 +99,26 @@ Number of file 0 mappings: 20
     = (c0 - Zero)
 - Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 30)
     = (c0 - Zero)
-- 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(Counter(4)) at (prev + 0, 30) to (start + 0, 31)
+- Code(Expression(9, Sub)) at (prev + 2, 13) to (start + 0, 14)
+    = (((c0 + Zero) + c3) - (c4 + c5))
+- Code(Expression(6, Sub)) at (prev + 0, 18) to (start + 0, 23)
+    = (((c0 + Zero) + c3) - c4)
+- Code(Expression(9, Sub)) at (prev + 1, 16) to (start + 0, 21)
+    = (((c0 + Zero) + c3) - (c4 + c5))
 - Code(Zero) at (prev + 0, 22) to (start + 1, 14)
-- Code(Expression(17, Sub)) at (prev + 2, 20) to (start + 0, 25)
-    = (((Zero + c3) + c4) - c5)
+- Code(Expression(20, Sub)) at (prev + 2, 20) to (start + 0, 25)
+    = ((c0 + 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(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(Expression(16, Sub)) at (prev + 1, 17) to (start + 0, 18)
+    = ((c0 + c3) - ((c4 + c5) + Zero))
+- Code(Expression(20, Sub)) at (prev + 1, 17) to (start + 0, 34)
+    = ((c0 + c3) - (c4 + c5))
+- Code(Counter(8)) at (prev + 0, 34) to (start + 0, 35)
 - 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)
+- Code(Expression(23, Add)) at (prev + 1, 5) to (start + 0, 6)
+    = ((c4 + c5) + c8)
 Highest counter ID seen: c8
 
 Function name: loops_branches::main
diff --git a/tests/coverage/mcdc/condition-limit.cov-map b/tests/coverage/mcdc/condition-limit.cov-map
index 19716878600..8ff5d6360f6 100644
--- a/tests/coverage/mcdc/condition-limit.cov-map
+++ b/tests/coverage/mcdc/condition-limit.cov-map
@@ -1,54 +1,16 @@
 Function name: condition_limit::accept_7_conditions
-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]
+Raw bytes (147): 0x[01, 01, 08, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 15, 19, 19, 1d, 01, 1d, 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, 09, 06, 07, 06, 00, 00, 0d, 00, 0e, 09, 00, 12, 00, 13, 30, 0d, 0a, 06, 05, 00, 00, 12, 00, 13, 0d, 00, 17, 00, 18, 30, 11, 0e, 05, 04, 00, 00, 17, 00, 18, 11, 00, 1c, 00, 1d, 30, 15, 12, 04, 03, 00, 00, 1c, 00, 1d, 15, 00, 21, 00, 22, 30, 19, 16, 03, 02, 00, 00, 21, 00, 22, 19, 00, 26, 00, 27, 30, 1d, 1a, 02, 00, 00, 00, 26, 00, 27, 1d, 00, 28, 02, 06, 1e, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 46
+Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - 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)
+- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 5 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 6 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 7 operands: lhs = Counter(0), rhs = Counter(7)
 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)
@@ -56,38 +18,32 @@ 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(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 - ((((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)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 7, true_next_id: 6, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+    true  = c2
+    false = (c1 - c2)
+- Code(Counter(2)) at (prev + 0, 18) to (start + 0, 19)
+- MCDCBranch { true: Counter(3), false: Expression(2, Sub), condition_id: 6, true_next_id: 5, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
+    true  = c3
+    false = (c2 - c3)
+- Code(Counter(3)) at (prev + 0, 23) to (start + 0, 24)
+- MCDCBranch { true: Counter(4), false: Expression(3, Sub), condition_id: 5, true_next_id: 4, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
+    true  = c4
+    false = (c3 - c4)
+- Code(Counter(4)) at (prev + 0, 28) to (start + 0, 29)
+- MCDCBranch { true: Counter(5), false: Expression(4, Sub), condition_id: 4, true_next_id: 3, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
+    true  = c5
+    false = (c4 - c5)
+- Code(Counter(5)) at (prev + 0, 33) to (start + 0, 34)
+- MCDCBranch { true: Counter(6), false: Expression(5, Sub), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
+    true  = c6
+    false = (c5 - c6)
+- Code(Counter(6)) at (prev + 0, 38) to (start + 0, 39)
+- MCDCBranch { true: Counter(7), false: Expression(6, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 38) to (start + 0, 39)
     true  = c7
-    false = c8
+    false = (c6 - c7)
 - 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
+- Code(Expression(7, Sub)) at (prev + 2, 5) to (start + 0, 6)
+    = (c0 - c7)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c7
 
diff --git a/tests/coverage/mcdc/if.cov-map b/tests/coverage/mcdc/if.cov-map
index acb8aac63de..771351f649f 100644
--- a/tests/coverage/mcdc/if.cov-map
+++ b/tests/coverage/mcdc/if.cov-map
@@ -1,14 +1,11 @@
 Function name: if::mcdc_check_a
-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]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 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, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- 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)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 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)
@@ -16,27 +13,23 @@ 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(2), false: Counter(3), 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(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - 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
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_b
-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]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 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, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- 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)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 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)
@@ -44,27 +37,23 @@ 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(2), false: Counter(3), 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(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - 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
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_both
-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]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 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, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- 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)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 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)
@@ -72,27 +61,23 @@ 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(2), false: Counter(3), 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(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - 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
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_neither
-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]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 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, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- 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)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 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)
@@ -100,32 +85,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(2), false: Counter(3), 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(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - 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
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_not_tree_decision
-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]
+Raw bytes (85): 0x[01, 01, 07, 01, 05, 01, 17, 05, 09, 05, 09, 17, 0d, 05, 09, 01, 0d, 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, 17, 00, 14, 00, 15, 30, 0d, 12, 02, 00, 00, 00, 14, 00, 15, 0d, 00, 16, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 11
+Number of expressions: 7
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Expression(10, Add)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(5, Add)
 - expression 2 operands: lhs = Counter(1), 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)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 6 operands: lhs = Counter(0), rhs = Counter(3)
 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)
@@ -137,33 +117,30 @@ Number of file 0 mappings: 10
 - 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(10, Add)) at (prev + 0, 20) to (start + 0, 21)
+- Code(Expression(5, Add)) at (prev + 0, 20) to (start + 0, 21)
     = (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)
+- MCDCBranch { true: Counter(3), false: Expression(4, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 20) to (start + 0, 21)
     true  = c3
-    false = c4
+    false = ((c1 + c2) - c3)
 - 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
+- Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c3)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
 Function name: if::mcdc_check_tree_decision
-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]
+Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 09, 05, 09, 05, 1f, 09, 0d, 09, 0d, 01, 1f, 09, 0d, 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, 0e, 03, 00, 00, 00, 13, 00, 14, 1f, 00, 16, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 10
+Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - 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)
+- 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(0), rhs = Expression(7, Add)
+- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
 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)
@@ -176,38 +153,32 @@ Number of file 0 mappings: 10
     false = (c1 - c2)
 - Code(Expression(2, Sub)) at (prev + 0, 19) to (start + 0, 20)
     = (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)
+- MCDCBranch { true: Counter(3), false: Expression(3, Sub), 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)
+    false = (c1 - (c2 + c3))
+- Code(Expression(7, 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
+- Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - (c2 + c3))
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
 Function name: if::mcdc_nested_if
-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]
+Raw bytes (120): 0x[01, 01, 0b, 01, 05, 01, 2b, 05, 09, 05, 09, 2b, 0d, 05, 09, 0d, 11, 2b, 11, 05, 09, 01, 2b, 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, 2b, 01, 09, 01, 0d, 28, 06, 02, 01, 0c, 00, 12, 30, 0d, 12, 01, 02, 00, 00, 0c, 00, 0d, 0d, 00, 11, 00, 12, 30, 11, 1a, 02, 00, 00, 00, 11, 00, 12, 11, 00, 13, 02, 0a, 1e, 02, 09, 00, 0a, 26, 01, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 16
+Number of expressions: 11
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Expression(15, Add)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(10, Add)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(15, Add), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(10, 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 6 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 7 operands: lhs = Expression(10, Add), rhs = Counter(4)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 9 operands: lhs = Counter(0), rhs = Expression(10, 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)
@@ -219,23 +190,21 @@ Number of file 0 mappings: 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(15, Add)) at (prev + 1, 9) to (start + 1, 13)
+- Code(Expression(10, 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(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)
+- MCDCBranch { true: Counter(3), false: Expression(4, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 12) to (start + 0, 13)
+    true  = c3
+    false = ((c1 + c2) - c3)
+- Code(Counter(3)) at (prev + 0, 17) to (start + 0, 18)
+- MCDCBranch { true: Counter(4), false: Expression(6, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 17) to (start + 0, 18)
     true  = c4
-    false = c5
+    false = (c3 - c4)
 - 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(7, Sub)) at (prev + 2, 9) to (start + 0, 10)
+    = ((c1 + c2) - c4)
 - 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
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c4
 
diff --git a/tests/coverage/mcdc/inlined_expressions.cov-map b/tests/coverage/mcdc/inlined_expressions.cov-map
index 92ec60dc23c..6a112b66e88 100644
--- a/tests/coverage/mcdc/inlined_expressions.cov-map
+++ b/tests/coverage/mcdc/inlined_expressions.cov-map
@@ -1,12 +1,10 @@
 Function name: inlined_expressions::inlined_instance
-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]
+Raw bytes (50): 0x[01, 01, 02, 01, 05, 05, 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, 06, 02, 00, 00, 00, 0a, 00, 0b, 01, 01, 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 = Counter(1)
-- 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)
+- expression 1 operands: lhs = Counter(1), 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)
@@ -14,10 +12,9 @@ Number of file 0 mappings: 6
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 10) to (start + 0, 11)
-- 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)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), 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, Sub)) at (prev + 1, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
diff --git a/tests/coverage/mcdc/nested_if.cov-map b/tests/coverage/mcdc/nested_if.cov-map
index 72daecabc77..72c7d68840d 100644
--- a/tests/coverage/mcdc/nested_if.cov-map
+++ b/tests/coverage/mcdc/nested_if.cov-map
@@ -1,24 +1,22 @@
 Function name: nested_if::doubly_nested_if_in_condition
-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]
+Raw bytes (168): 0x[01, 01, 0e, 01, 05, 05, 09, 05, 09, 05, 13, 09, 19, 19, 1d, 05, 1f, 09, 1d, 09, 0d, 2b, 05, 01, 15, 33, 05, 37, 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, 1d, 16, 02, 00, 00, 00, 1d, 00, 1e, 1d, 00, 21, 00, 25, 1a, 00, 2f, 00, 34, 23, 00, 39, 00, 3e, 21, 00, 48, 00, 4c, 11, 00, 4f, 02, 06, 26, 02, 0c, 02, 06, 2e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 16
+Number of expressions: 14
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - 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 3 operands: lhs = Counter(1), rhs = Expression(4, 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 = 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 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
+- expression 7 operands: lhs = Counter(2), rhs = Counter(7)
+- expression 8 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 9 operands: lhs = Expression(10, Add), rhs = Counter(1)
+- expression 10 operands: lhs = Counter(0), rhs = Counter(5)
 - 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)
+- expression 12 operands: lhs = Expression(13, Add), rhs = Counter(5)
+- expression 13 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)
@@ -43,20 +41,19 @@ Number of file 0 mappings: 20
     true  = 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, 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)
+- MCDCBranch { true: Counter(7), false: Expression(5, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 29) to (start + 0, 30)
+    true  = c7
+    false = (c6 - c7)
+- Code(Counter(7)) at (prev + 0, 33) to (start + 0, 37)
+- Code(Expression(6, Sub)) at (prev + 0, 47) to (start + 0, 52)
+    = (c1 - (c2 + c7))
+- Code(Expression(8, Add)) at (prev + 0, 57) to (start + 0, 62)
     = (c2 + c3)
 - Code(Counter(8)) at (prev + 0, 72) to (start + 0, 76)
 - Code(Counter(4)) at (prev + 0, 79) to (start + 2, 6)
-- Code(Expression(11, Sub)) at (prev + 2, 12) to (start + 2, 6)
+- Code(Expression(9, Sub)) at (prev + 2, 12) to (start + 2, 6)
     = ((c0 + c5) - c1)
-- Code(Expression(13, Sub)) at (prev + 3, 1) to (start + 0, 2)
+- Code(Expression(11, Sub)) at (prev + 3, 1) to (start + 0, 2)
     = (((c0 + c4) + c5) - c1)
 Highest counter ID seen: c8
 
@@ -109,30 +106,28 @@ Number of file 0 mappings: 14
 Highest counter ID seen: c5
 
 Function name: nested_if::nested_in_then_block_in_condition
-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]
+Raw bytes (176): 0x[01, 01, 12, 01, 05, 05, 09, 05, 09, 05, 33, 09, 0d, 09, 0d, 33, 11, 09, 0d, 11, 15, 33, 15, 09, 0d, 05, 33, 09, 0d, 3b, 05, 01, 1d, 43, 05, 47, 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, 2e, 02, 00, 00, 00, 15, 00, 16, 33, 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, 15, 22, 02, 00, 00, 00, 21, 00, 22, 15, 00, 25, 00, 29, 26, 00, 33, 00, 38, 2e, 00, 44, 00, 49, 19, 00, 4c, 02, 06, 36, 02, 0c, 02, 06, 3e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 20
+Number of expressions: 18
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - 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 3 operands: lhs = Counter(1), rhs = Expression(12, 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 6 operands: lhs = Expression(12, 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 9 operands: lhs = Expression(12, Add), rhs = Counter(5)
+- expression 10 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 11 operands: lhs = Counter(1), rhs = Expression(12, Add)
 - 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 13 operands: lhs = Expression(14, Add), rhs = Counter(1)
+- expression 14 operands: lhs = Counter(0), rhs = Counter(7)
 - 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)
+- expression 16 operands: lhs = Expression(17, Add), rhs = Counter(7)
+- expression 17 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)
@@ -149,29 +144,28 @@ Number of file 0 mappings: 20
     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)
+- MCDCBranch { true: Counter(3), false: Expression(11, 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)
+- Code(Expression(12, 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(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)
-    = (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)
+- MCDCBranch { true: Counter(5), false: Expression(8, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
+    true  = c5
+    false = (c4 - c5)
+- Code(Counter(5)) at (prev + 0, 37) to (start + 0, 41)
+- Code(Expression(9, Sub)) at (prev + 0, 51) to (start + 0, 56)
+    = ((c2 + c3) - c5)
+- Code(Expression(11, Sub)) at (prev + 0, 68) to (start + 0, 73)
     = (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)
+- Code(Expression(13, Sub)) at (prev + 2, 12) to (start + 2, 6)
     = ((c0 + c7) - c1)
-- Code(Expression(17, Sub)) at (prev + 3, 1) to (start + 0, 2)
+- Code(Expression(15, Sub)) at (prev + 3, 1) to (start + 0, 2)
     = (((c0 + c6) + c7) - c1)
 Highest counter ID seen: c7
 
diff --git a/tests/coverage/mcdc/non_control_flow.cov-map b/tests/coverage/mcdc/non_control_flow.cov-map
index 0edeff9a586..c282d53c5ac 100644
--- a/tests/coverage/mcdc/non_control_flow.cov-map
+++ b/tests/coverage/mcdc/non_control_flow.cov-map
@@ -1,124 +1,107 @@
 Function name: non_control_flow::assign_3
-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]
+Raw bytes (79): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 0a, 01, 16, 01, 00, 28, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 04, 03, 00, 0d, 00, 18, 30, 05, 02, 01, 00, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 30, 09, 06, 02, 03, 00, 00, 12, 00, 13, 09, 00, 17, 00, 18, 30, 0d, 0e, 03, 00, 00, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 9
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+Number of expressions: 4
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
 - 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 = 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)
+- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
 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)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - 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(4, 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(0, 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(4, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(0, 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))
-    false = c4
-- Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = (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)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 3, 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)
-    = (((c1 + c2) + c3) + c4)
-Highest counter ID seen: c4
+    false = (c0 - (c1 + c2))
+- Code(Counter(2)) at (prev + 0, 23) to (start + 0, 24)
+- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
+    true  = c3
+    false = (c2 - c3)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c3
 
 Function name: non_control_flow::assign_3_bis
-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]
+Raw bytes (81): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 0a, 01, 1b, 01, 00, 2c, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 05, 03, 00, 0d, 00, 18, 30, 05, 02, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 06, 03, 00, 02, 00, 12, 00, 13, 0a, 00, 17, 00, 18, 30, 0d, 0e, 02, 00, 00, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 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 = Counter(0), rhs = Counter(2)
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
 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 + 1, 9) to (start + 0, 10)
 - 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(2, 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(0, 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(3, 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(1, 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, Sub)) at (prev + 0, 23) to (start + 0, 24)
+- Code(Expression(2, 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)
+- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
     true  = c3
-    false = c4
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c2 + c3) + c4)
-Highest counter ID seen: c4
+    false = (c0 - (c2 + c3))
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c3
 
 Function name: non_control_flow::assign_and
-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]
+Raw bytes (60): 0x[01, 01, 02, 01, 05, 05, 09, 08, 01, 0c, 01, 00, 21, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 02, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 06, 02, 00, 00, 00, 12, 00, 13, 01, 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 = 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 expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 33)
-- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
-    = (((c0 + c2) + c3) - c1)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - 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)
+- MCDCBranch { true: Counter(1), false: Expression(0, 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, 18) to (start + 0, 19)
-- 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)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), 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, Sub)) at (prev + 1, 5) to (start + 1, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c2
 
 Function name: non_control_flow::assign_or
-Raw bytes (64): 0x[01, 01, 04, 07, 0d, 05, 09, 01, 05, 01, 05, 08, 01, 11, 01, 00, 20, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 00, 02, 00, 0d, 00, 0e, 0e, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 08, 01, 11, 01, 00, 20, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 02, 01, 00, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 30, 09, 06, 02, 00, 00, 00, 12, 00, 13, 01, 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 = Counter(3)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
+Number of expressions: 3
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 17, 1) to (start + 0, 32)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = ((c1 + c2) + c3)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - 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: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(0, 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(3, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19)
     = (c0 - c1)
-- 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)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), 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)
-    = ((c1 + c2) + c3)
-Highest counter ID seen: c3
+    false = (c0 - (c1 + c2))
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c2
 
 Function name: non_control_flow::foo
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 25, 01, 02, 02]
@@ -130,14 +113,12 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: non_control_flow::func_call
-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]
+Raw bytes (50): 0x[01, 01, 02, 01, 05, 05, 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, 06, 02, 00, 00, 00, 0e, 00, 0f, 01, 01, 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 = Counter(1)
-- 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)
+- expression 1 operands: lhs = Counter(1), 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)
@@ -145,66 +126,46 @@ Number of file 0 mappings: 6
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
-- 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)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), 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, Sub)) at (prev + 1, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: non_control_flow::right_comb_tree
-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]
+Raw bytes (111): 0x[01, 01, 05, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 0e, 01, 20, 01, 00, 41, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 06, 05, 00, 0d, 00, 2a, 30, 05, 02, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 09, 06, 02, 03, 00, 00, 13, 00, 14, 09, 00, 19, 00, 1a, 30, 0d, 0a, 03, 04, 00, 00, 19, 00, 1a, 0d, 00, 1f, 00, 20, 30, 11, 0e, 04, 05, 00, 00, 1f, 00, 20, 11, 00, 24, 00, 27, 30, 15, 12, 05, 00, 00, 00, 24, 00, 27, 01, 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 = 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 = 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(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 expressions: 5
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
 Number of file 0 mappings: 14
 - Code(Counter(0)) at (prev + 32, 1) to (start + 0, 65)
-- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
-    = ((((((c0 + c2) + c3) + c4) + c5) + c6) - c1)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - 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)
+- MCDCBranch { true: Counter(1), false: Expression(0, 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(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 - ((c2 + c3) + c4))
-    false = c4
-- Code(Expression(16, Sub)) at (prev + 0, 36) to (start + 0, 39)
-    = (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)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
+    true  = c2
+    false = (c1 - c2)
+- Code(Counter(2)) at (prev + 0, 25) to (start + 0, 26)
+- MCDCBranch { true: Counter(3), false: Expression(2, Sub), condition_id: 3, true_next_id: 4, false_next_id: 0 } at (prev + 0, 25) to (start + 0, 26)
+    true  = c3
+    false = (c2 - c3)
+- Code(Counter(3)) at (prev + 0, 31) to (start + 0, 32)
+- MCDCBranch { true: Counter(4), false: Expression(3, Sub), condition_id: 4, true_next_id: 5, false_next_id: 0 } at (prev + 0, 31) to (start + 0, 32)
+    true  = c4
+    false = (c3 - c4)
+- Code(Counter(4)) at (prev + 0, 36) to (start + 0, 39)
+- MCDCBranch { true: Counter(5), false: Expression(4, Sub), 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
+    false = (c4 - c5)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c5
 
diff --git a/tests/coverage/try_error_result.cov-map b/tests/coverage/try_error_result.cov-map
index 7fbd2cc642e..f90b73592bd 100644
--- a/tests/coverage/try_error_result.cov-map
+++ b/tests/coverage/try_error_result.cov-map
@@ -55,18 +55,15 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c1
 
 Function name: try_error_result::test1
-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]
+Raw bytes (69): 0x[01, 01, 05, 07, 09, 01, 00, 03, 0d, 03, 13, 0d, 11, 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, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 8
+Number of expressions: 5
 - 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(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(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)
@@ -81,8 +78,7 @@ Number of file 0 mappings: 11
     = (((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)
-    = (((c3 + c5) + Zero) + Zero)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
 Highest counter ID seen: c5
 
 Function name: try_error_result::test2
diff --git a/tests/coverage/unicode.cov-map b/tests/coverage/unicode.cov-map
index 630ab4ce47e..0a4e367bb9e 100644
--- a/tests/coverage/unicode.cov-map
+++ b/tests/coverage/unicode.cov-map
@@ -1,14 +1,10 @@
 Function name: unicode::main
-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]
+Raw bytes (53): 0x[01, 01, 02, 01, 05, 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, 01, 02, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- 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)
+- expression 1 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)
@@ -19,9 +15,8 @@ Number of file 0 mappings: 9
 - Code(Counter(2)) at (prev + 0, 41) to (start + 0, 70)
 - 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)
+    = (c0 - c3)
+- Code(Counter(0)) at (prev + 2, 5) to (start + 1, 2)
 Highest counter ID seen: c3
 
 Function name: unicode::ä»– (unused)
diff --git a/tests/coverage/while_early_ret.cov-map b/tests/coverage/while_early_ret.cov-map
index ade770597e2..554056fa801 100644
--- a/tests/coverage/while_early_ret.cov-map
+++ b/tests/coverage/while_early_ret.cov-map
@@ -1,12 +1,12 @@
 Function name: while_early_ret::main
-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]
+Raw bytes (59): 0x[01, 01, 05, 01, 05, 03, 09, 01, 09, 01, 13, 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, 0e, 04, 15, 00, 1b, 05, 03, 0a, 03, 0a, 09, 06, 05, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 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 = Counter(0), rhs = Counter(2)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add)
 - 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)
@@ -17,10 +17,10 @@ Number of file 0 mappings: 9
 - Code(Expression(2, Sub)) at (prev + 6, 21) to (start + 2, 22)
     = (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(Expression(3, Sub)) at (prev + 4, 21) to (start + 0, 27)
+    = (c0 - (c2 + c3))
 - Code(Counter(1)) at (prev + 3, 10) to (start + 3, 10)
 - Code(Counter(2)) at (prev + 6, 5) to (start + 0, 11)
-- Code(Expression(3, Add)) at (prev + 1, 1) to (start + 0, 2)
-    = ((c2 + c3) + c4)
-Highest counter ID seen: c4
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
diff --git a/tests/coverage/yield.cov-map b/tests/coverage/yield.cov-map
index e01ec8f9edb..868fec4b107 100644
--- a/tests/coverage/yield.cov-map
+++ b/tests/coverage/yield.cov-map
@@ -1,19 +1,13 @@
 Function name: yield::main
-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]
+Raw bytes (94): 0x[01, 01, 05, 05, 00, 0d, 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, 06, 01, 22, 00, 27, 11, 00, 2c, 00, 2e, 0a, 01, 0e, 00, 34, 11, 03, 09, 00, 16, 11, 08, 0b, 00, 2e, 21, 01, 27, 00, 29, 0f, 01, 0e, 00, 34, 21, 02, 0b, 00, 2e, 2d, 01, 27, 00, 29, 13, 01, 0e, 00, 34, 2d, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 11
+Number of expressions: 5
 - expression 0 operands: lhs = Counter(1), rhs = Zero
-- expression 1 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 = 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)
+- expression 1 operands: lhs = Counter(3), rhs = Counter(5)
+- expression 2 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 4 operands: lhs = Counter(9), rhs = Counter(10)
 Number of file 0 mappings: 16
 - Code(Counter(0)) at (prev + 7, 1) to (start + 1, 22)
 - Code(Counter(0)) at (prev + 7, 11) to (start + 0, 46)
@@ -22,21 +16,18 @@ Number of file 0 mappings: 16
     = (c1 + Zero)
 - Code(Counter(3)) at (prev + 2, 11) to (start + 0, 46)
 - Code(Expression(1, Sub)) at (prev + 1, 34) to (start + 0, 39)
+    = (c3 - c5)
+- Code(Counter(4)) at (prev + 0, 44) to (start + 0, 46)
+- Code(Expression(2, Sub)) at (prev + 1, 14) to (start + 0, 52)
     = (c3 - c4)
-- Code(Expression(7, Sub)) at (prev + 0, 44) to (start + 0, 46)
-    = (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))
-- Code(Expression(7, Sub)) at (prev + 8, 11) to (start + 0, 46)
-    = (c3 - (c4 + c5))
+- Code(Counter(4)) at (prev + 3, 9) to (start + 0, 22)
+- Code(Counter(4)) at (prev + 8, 11) to (start + 0, 46)
 - Code(Counter(8)) at (prev + 1, 39) to (start + 0, 41)
-- Code(Expression(9, Add)) at (prev + 1, 14) to (start + 0, 52)
+- Code(Expression(3, Add)) at (prev + 1, 14) to (start + 0, 52)
     = (c6 + c7)
 - Code(Counter(8)) at (prev + 2, 11) to (start + 0, 46)
 - Code(Counter(11)) at (prev + 1, 39) to (start + 0, 41)
-- Code(Expression(10, Add)) at (prev + 1, 14) to (start + 0, 52)
+- Code(Expression(4, Add)) at (prev + 1, 14) to (start + 0, 52)
     = (c9 + c10)
 - Code(Counter(11)) at (prev + 2, 1) to (start + 0, 2)
 Highest counter ID seen: c11
diff --git a/tests/crashes/131227.rs b/tests/crashes/131227.rs
deleted file mode 100644
index f46185b5b4a..00000000000
--- a/tests/crashes/131227.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//@ known-bug: #131227
-//@ compile-flags: -Zmir-opt-level=3
-
-static mut G: () = ();
-
-fn myfunc() -> i32 {
-    let var = &raw mut G;
-    if var.is_null() {
-        return 0;
-    }
-    0
-}
-
-fn main() {
-    myfunc();
-}
diff --git a/tests/rustdoc-ui/issues/issue-107918.rs b/tests/rustdoc-ui/issues/duplicate-panic-impl-107918.rs
index 19d53f84cb6..ec35b52e33b 100644
--- a/tests/rustdoc-ui/issues/issue-107918.rs
+++ b/tests/rustdoc-ui/issues/duplicate-panic-impl-107918.rs
@@ -2,6 +2,7 @@
 //@ compile-flags: --document-private-items
 //@ build-pass
 //@ only-linux
+// https://github.com/rust-lang/rust/issues/107918
 
 #![no_std]
 #![no_main]
diff --git a/tests/rustdoc-ui/issues/issue-110900.rs b/tests/rustdoc-ui/issues/ice-associated-type-bounds-110900.rs
index 5a896167083..4fa60f8878d 100644
--- a/tests/rustdoc-ui/issues/issue-110900.rs
+++ b/tests/rustdoc-ui/issues/ice-associated-type-bounds-110900.rs
@@ -1,4 +1,5 @@
 //@ check-pass
+// https://github.com/rust-lang/rust/issues/110900
 
 #![crate_type="lib"]
 
diff --git a/tests/rustdoc-ui/issues/issue-106213.rs b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.rs
index 5c3a8390252..c954162589d 100644
--- a/tests/rustdoc-ui/issues/issue-106213.rs
+++ b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: --document-private-items
 //@ edition:2021
+// https://github.com/rust-lang/rust/issues/106213
 
 fn use_avx() -> dyn  {
     //~^ ERROR at least one trait is required for an object type
diff --git a/tests/rustdoc-ui/issues/issue-106213.stderr b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.stderr
index fa79fe2e71c..b029fee510e 100644
--- a/tests/rustdoc-ui/issues/issue-106213.stderr
+++ b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.stderr
@@ -1,5 +1,5 @@
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/issue-106213.rs:4:17
+  --> $DIR/ice-bare-dyn-106213.rs:5:17
    |
 LL | fn use_avx() -> dyn  {
    |                 ^^^
diff --git a/tests/rustdoc-ui/issues/issue-105742.rs b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.rs
index bd8ec4e8b58..027574923c7 100644
--- a/tests/rustdoc-ui/issues/issue-105742.rs
+++ b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: -Znormalize-docs
+// https://github.com/rust-lang/rust/issues/105742
 use std::ops::Index;
 
 pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
diff --git a/tests/rustdoc-ui/issues/issue-105742.stderr b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr
index 0f09d637f38..06a1cf6b118 100644
--- a/tests/rustdoc-ui/issues/issue-105742.stderr
+++ b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr
@@ -1,11 +1,11 @@
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -15,13 +15,13 @@ LL |     <Self as SVec>::Item<'a>,
    |                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -31,13 +31,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -47,13 +47,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -63,13 +63,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -79,13 +79,13 @@ LL |     Output = <Self as SVec>::Item<'a>> as SVec>::Item,
    |                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -95,13 +95,13 @@ LL |     Output = <Self as SVec>::Item<T>> as SVec>::Item,
    |                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -111,13 +111,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<'a>,
    |                                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -127,13 +127,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<T>,
    |                                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:4:40
+  --> $DIR/ice-generic-type-alias-105742.rs:5:40
    |
 LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
    |                                        ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -143,13 +143,13 @@ LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item<'_> = T, Output = T>) {
    |                                            ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:4:40
+  --> $DIR/ice-generic-type-alias-105742.rs:5:40
    |
 LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
    |                                        ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -159,13 +159,13 @@ LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item<T> = T, Output = T>) {
    |                                            +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -176,13 +176,13 @@ LL |     <Self as SVec>::Item<'a>,
    |                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -193,13 +193,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -210,13 +210,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -227,13 +227,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -244,13 +244,13 @@ LL |     Output = <Self as SVec>::Item<'a>> as SVec>::Item,
    |                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -261,13 +261,13 @@ LL |     Output = <Self as SVec>::Item<T>> as SVec>::Item,
    |                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -278,13 +278,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<'a>,
    |                                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -295,13 +295,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<T>,
    |                                                  +++
 
 error[E0038]: the trait `SVec` cannot be made into an object
-  --> $DIR/issue-105742.rs:4:31
+  --> $DIR/ice-generic-type-alias-105742.rs:5:31
    |
 LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SVec` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-105742.rs:14:17
+  --> $DIR/ice-generic-type-alias-105742.rs:15:17
    |
 LL |    pub trait SVec: Index<
    |  ____________----__^
@@ -329,13 +329,13 @@ LL | pub fn next<'a, T>(s: &'a mut impl SVec<Item = T, Output = T>) {
    |                               ~~~~
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -346,13 +346,13 @@ LL |     <Self as SVec>::Item<'a>,
    |                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -363,13 +363,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -380,13 +380,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -397,13 +397,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -414,13 +414,13 @@ LL |     Output = <Self as SVec>::Item<'a>> as SVec>::Item,
    |                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -431,13 +431,13 @@ LL |     Output = <Self as SVec>::Item<T>> as SVec>::Item,
    |                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -448,13 +448,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<'a>,
    |                                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -465,13 +465,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<T>,
    |                                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -482,13 +482,13 @@ LL |     <Self as SVec>::Item<'a>,
    |                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:15:21
+  --> $DIR/ice-generic-type-alias-105742.rs:16:21
    |
 LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -499,13 +499,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -516,13 +516,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:26:37
+  --> $DIR/ice-generic-type-alias-105742.rs:27:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -533,13 +533,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -550,13 +550,13 @@ LL |     Output = <Self as SVec>::Item<'a>> as SVec>::Item,
    |                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:30
+  --> $DIR/ice-generic-type-alias-105742.rs:38:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -567,13 +567,13 @@ LL |     Output = <Self as SVec>::Item<T>> as SVec>::Item,
    |                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -584,13 +584,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<'a>,
    |                                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:37:46
+  --> $DIR/ice-generic-type-alias-105742.rs:38:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -601,13 +601,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<T>,
    |                                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:61:38
+  --> $DIR/ice-generic-type-alias-105742.rs:62:38
    |
 LL |     fn len(&self) -> <Self as SVec>::Item;
    |                                      ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -617,13 +617,13 @@ LL |     fn len(&self) -> <Self as SVec>::Item<'_>;
    |                                          ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:61:38
+  --> $DIR/ice-generic-type-alias-105742.rs:62:38
    |
 LL |     fn len(&self) -> <Self as SVec>::Item;
    |                                      ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:59:10
+  --> $DIR/ice-generic-type-alias-105742.rs:60:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
diff --git a/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.rs b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.rs
new file mode 100644
index 00000000000..651fd9ab4b8
--- /dev/null
+++ b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.rs
@@ -0,0 +1,5 @@
+// https://github.com/rust-lang/rust/issues/105737
+impl Vec<lol> {}
+//~^ ERROR
+
+pub fn lol() {}
diff --git a/tests/rustdoc-ui/issues/issue-105737.stderr b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.stderr
index 2c63c345e46..49cbebc91d9 100644
--- a/tests/rustdoc-ui/issues/issue-105737.stderr
+++ b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.stderr
@@ -1,5 +1,5 @@
 error[E0747]: constant provided when a type was expected
-  --> $DIR/issue-105737.rs:1:10
+  --> $DIR/ice-impl-fn-generic-105737.rs:2:10
    |
 LL | impl Vec<lol> {}
    |          ^^^
diff --git a/tests/rustdoc-ui/issues/issue-101076.rs b/tests/rustdoc-ui/issues/ice-macro-hidden-exported-macro-defid-101076.rs
index f9b93c408fd..0c9a8b9175b 100644
--- a/tests/rustdoc-ui/issues/issue-101076.rs
+++ b/tests/rustdoc-ui/issues/ice-macro-hidden-exported-macro-defid-101076.rs
@@ -1,4 +1,5 @@
 //@ check-pass
+// https://github.com/rust-lang/rust/issues/101076
 
 const _: () = {
     #[macro_export]
diff --git a/tests/rustdoc-ui/issues/issue-106226.rs b/tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.rs
index 71b497a9adc..71b497a9adc 100644
--- a/tests/rustdoc-ui/issues/issue-106226.rs
+++ b/tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.rs
diff --git a/tests/rustdoc-ui/issues/issue-106226.stderr b/tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.stderr
index 4d063b46188..e9080925450 100644
--- a/tests/rustdoc-ui/issues/issue-106226.stderr
+++ b/tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.stderr
@@ -1,5 +1,5 @@
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
-  --> $DIR/issue-106226.rs:2:11
+  --> $DIR/ice-placeholder-type-alias-106226.rs:2:11
    |
 LL | type F = [_; ()];
    |           ^ not allowed in type signatures
diff --git a/tests/rustdoc-ui/issues/ice-raw-str-105334.rs b/tests/rustdoc-ui/issues/ice-raw-str-105334.rs
new file mode 100644
index 00000000000..f18f0456fdd
--- /dev/null
+++ b/tests/rustdoc-ui/issues/ice-raw-str-105334.rs
@@ -0,0 +1,3 @@
+// https://github.com/rust-lang/rust/issues/105334
+impl Vec< br##"*.."## > {}
+//~^ ERROR
diff --git a/tests/rustdoc-ui/issues/issue-105334.stderr b/tests/rustdoc-ui/issues/ice-raw-str-105334.stderr
index d992b219b3b..2096757fbb9 100644
--- a/tests/rustdoc-ui/issues/issue-105334.stderr
+++ b/tests/rustdoc-ui/issues/ice-raw-str-105334.stderr
@@ -1,5 +1,5 @@
 error[E0747]: constant provided when a type was expected
-  --> $DIR/issue-105334.rs:1:11
+  --> $DIR/ice-raw-str-105334.rs:2:11
    |
 LL | impl Vec< br##"*.."## > {}
    |           ^^^^^^^^^^^
diff --git a/tests/rustdoc-ui/issues/issue-102986.rs b/tests/rustdoc-ui/issues/ice-typeof-102986.rs
index 001784ac285..8fcbfffe172 100644
--- a/tests/rustdoc-ui/issues/issue-102986.rs
+++ b/tests/rustdoc-ui/issues/ice-typeof-102986.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/102986
 struct Struct {
     y: (typeof("hey"),),
     //~^ `typeof` is a reserved keyword but unimplemented
diff --git a/tests/rustdoc-ui/issues/issue-102986.stderr b/tests/rustdoc-ui/issues/ice-typeof-102986.stderr
index d91f93f394a..20dbb2661bc 100644
--- a/tests/rustdoc-ui/issues/issue-102986.stderr
+++ b/tests/rustdoc-ui/issues/ice-typeof-102986.stderr
@@ -1,5 +1,5 @@
 error[E0516]: `typeof` is a reserved keyword but unimplemented
-  --> $DIR/issue-102986.rs:2:9
+  --> $DIR/ice-typeof-102986.rs:3:9
    |
 LL |     y: (typeof("hey"),),
    |         ^^^^^^^^^^^^^ reserved keyword
diff --git a/tests/rustdoc-ui/issues/issue-103997.rs b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.rs
index ebd1d2e4447..b6ba4e48cff 100644
--- a/tests/rustdoc-ui/issues/issue-103997.rs
+++ b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.rs
@@ -1,4 +1,5 @@
 //@ check-pass
+// https://github.com/rust-lang/rust/issues/103997
 
 pub fn foo() {}
 
diff --git a/tests/rustdoc-ui/issues/issue-103997.stderr b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.stderr
index c06db91496f..9cb64079c61 100644
--- a/tests/rustdoc-ui/issues/issue-103997.stderr
+++ b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.stderr
@@ -1,5 +1,5 @@
 warning: unresolved link to `Self::foo`
-  --> $DIR/issue-103997.rs:5:13
+  --> $DIR/ice-unresolved-self-103997.rs:6:13
    |
 LL | /// [`foo`](Self::foo)
    |             ^^^^^^^^^ no item named `Self` in scope
diff --git a/tests/rustdoc-ui/issues/issue-105334.rs b/tests/rustdoc-ui/issues/issue-105334.rs
deleted file mode 100644
index ee1adc6a029..00000000000
--- a/tests/rustdoc-ui/issues/issue-105334.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-impl Vec< br##"*.."## > {}
-//~^ ERROR
diff --git a/tests/rustdoc-ui/issues/issue-105737.rs b/tests/rustdoc-ui/issues/issue-105737.rs
deleted file mode 100644
index 154f069d8ff..00000000000
--- a/tests/rustdoc-ui/issues/issue-105737.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-impl Vec<lol> {}
-//~^ ERROR
-
-pub fn lol() {}
diff --git a/tests/ui-fulldeps/lexer/unicode-version.rs b/tests/ui-fulldeps/lexer/unicode-version.rs
new file mode 100644
index 00000000000..cd02b952895
--- /dev/null
+++ b/tests/ui-fulldeps/lexer/unicode-version.rs
@@ -0,0 +1,27 @@
+// This test is used to validate which version of Unicode is used for parsing
+// identifiers. If the Unicode version changes, it should also be updated in
+// the reference at
+// https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md.
+
+//@ run-pass
+//@ check-run-results
+//@ ignore-cross-compile
+//@ reference: ident.unicode
+//@ reference: ident.normalization
+
+#![feature(rustc_private)]
+
+extern crate rustc_driver;
+extern crate rustc_lexer;
+extern crate rustc_parse;
+
+fn main() {
+    println!("Checking if Unicode version changed.");
+    println!(
+        "If the Unicode version changes are intentional, \
+         it should also be updated in the reference at \
+         https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md."
+    );
+    println!("Unicode XID version is: {:?}", rustc_lexer::UNICODE_XID_VERSION);
+    println!("Unicode normalization version is: {:?}", rustc_parse::UNICODE_NORMALIZATION_VERSION);
+}
diff --git a/tests/ui-fulldeps/lexer/unicode-version.run.stdout b/tests/ui-fulldeps/lexer/unicode-version.run.stdout
new file mode 100644
index 00000000000..f32c8365cdf
--- /dev/null
+++ b/tests/ui-fulldeps/lexer/unicode-version.run.stdout
@@ -0,0 +1,4 @@
+Checking if Unicode version changed.
+If the Unicode version changes are intentional, it should also be updated in the reference at https://github.com/rust-lang/reference/blob/HEAD/src/identifiers.md.
+Unicode XID version is: (16, 0, 0)
+Unicode normalization version is: (16, 0, 0)
diff --git a/tests/ui/asm/naked-functions.rs b/tests/ui/asm/naked-functions.rs
index 5c58f1498cc..e7e5d84f2a5 100644
--- a/tests/ui/asm/naked-functions.rs
+++ b/tests/ui/asm/naked-functions.rs
@@ -219,7 +219,6 @@ pub unsafe extern "C" fn compatible_must_use_attributes() -> u64 {
 
 #[export_name = "exported_function_name"]
 #[link_section = ".custom_section"]
-#[no_mangle]
 #[naked]
 pub unsafe extern "C" fn compatible_ffi_attributes_1() {
     naked_asm!("", options(raw));
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle.fixed b/tests/ui/attributes/mixed_export_name_and_no_mangle.fixed
new file mode 100644
index 00000000000..7224d4289e3
--- /dev/null
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle.fixed
@@ -0,0 +1,14 @@
+// issue: rust-lang/rust#47446
+//@ run-rustfix
+//@ check-pass
+
+#![warn(unused_attributes)]
+//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+#[export_name = "foo"]
+pub fn bar() {}
+
+//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+#[export_name = "baz"]
+pub fn bak() {}
+
+fn main() {}
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle.rs b/tests/ui/attributes/mixed_export_name_and_no_mangle.rs
new file mode 100644
index 00000000000..149a7904e1e
--- /dev/null
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle.rs
@@ -0,0 +1,16 @@
+// issue: rust-lang/rust#47446
+//@ run-rustfix
+//@ check-pass
+
+#![warn(unused_attributes)]
+#[no_mangle]
+//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+#[export_name = "foo"]
+pub fn bar() {}
+
+#[unsafe(no_mangle)]
+//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+#[export_name = "baz"]
+pub fn bak() {}
+
+fn main() {}
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle.stderr b/tests/ui/attributes/mixed_export_name_and_no_mangle.stderr
new file mode 100644
index 00000000000..ba63127ba2d
--- /dev/null
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle.stderr
@@ -0,0 +1,39 @@
+warning: `#[no_mangle]` attribute may not be used in combination with `#[export_name]`
+  --> $DIR/mixed_export_name_and_no_mangle.rs:6:1
+   |
+LL | #[no_mangle]
+   | ^^^^^^^^^^^^ `#[no_mangle]` is ignored
+   |
+note: `#[export_name]` takes precedence
+  --> $DIR/mixed_export_name_and_no_mangle.rs:8:1
+   |
+LL | #[export_name = "foo"]
+   | ^^^^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+  --> $DIR/mixed_export_name_and_no_mangle.rs:5:9
+   |
+LL | #![warn(unused_attributes)]
+   |         ^^^^^^^^^^^^^^^^^
+help: remove the `#[no_mangle]` attribute
+   |
+LL - #[no_mangle]
+   |
+
+warning: `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]`
+  --> $DIR/mixed_export_name_and_no_mangle.rs:11:1
+   |
+LL | #[unsafe(no_mangle)]
+   | ^^^^^^^^^^^^^^^^^^^^ `#[unsafe(no_mangle)]` is ignored
+   |
+note: `#[export_name]` takes precedence
+  --> $DIR/mixed_export_name_and_no_mangle.rs:13:1
+   |
+LL | #[export_name = "baz"]
+   | ^^^^^^^^^^^^^^^^^^^^^^
+help: remove the `#[unsafe(no_mangle)]` attribute
+   |
+LL - #[unsafe(no_mangle)]
+   |
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr
index 4eb374b2020..30a45ce377e 100644
--- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr
@@ -72,20 +72,6 @@ help: add `#![feature(adt_const_params)]` to the crate attributes to enable more
 LL + #![feature(adt_const_params)]
    |
 
-note: erroneous constant encountered
-  --> $DIR/unevaluated-const-ice-119731.rs:22:19
-   |
-LL |     impl v17<512, v0> {
-   |                   ^^
-
-note: erroneous constant encountered
-  --> $DIR/unevaluated-const-ice-119731.rs:22:19
-   |
-LL |     impl v17<512, v0> {
-   |                   ^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
 error: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
   --> $DIR/unevaluated-const-ice-119731.rs:28:37
    |
diff --git a/tests/ui/consts/const-integer-bool-ops.stderr b/tests/ui/consts/const-integer-bool-ops.stderr
index d58a8e93ff6..4e503e5a5c0 100644
--- a/tests/ui/consts/const-integer-bool-ops.stderr
+++ b/tests/ui/consts/const-integer-bool-ops.stderr
@@ -16,12 +16,6 @@ error[E0308]: mismatched types
 LL | const X: usize = 42 && 39;
    |                  ^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:8:18
-   |
-LL | const ARR: [i32; X] = [99; 34];
-   |                  ^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:10:19
    |
@@ -40,12 +34,6 @@ error[E0308]: mismatched types
 LL | const X1: usize = 42 || 39;
    |                   ^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:17:19
-   |
-LL | const ARR1: [i32; X1] = [99; 47];
-   |                   ^^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:19:19
    |
@@ -64,12 +52,6 @@ error[E0308]: mismatched types
 LL | const X2: usize = -42 || -39;
    |                   ^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:26:19
-   |
-LL | const ARR2: [i32; X2] = [99; 18446744073709551607];
-   |                   ^^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:28:19
    |
@@ -88,84 +70,42 @@ error[E0308]: mismatched types
 LL | const X3: usize = -42 && -39;
    |                   ^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:35:19
-   |
-LL | const ARR3: [i32; X3] = [99; 6];
-   |                   ^^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:37:18
    |
 LL | const Y: usize = 42.0 == 42.0;
    |                  ^^^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:40:19
-   |
-LL | const ARRR: [i32; Y] = [99; 1];
-   |                   ^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:42:19
    |
 LL | const Y1: usize = 42.0 >= 42.0;
    |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:45:20
-   |
-LL | const ARRR1: [i32; Y1] = [99; 1];
-   |                    ^^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:47:19
    |
 LL | const Y2: usize = 42.0 <= 42.0;
    |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:50:20
-   |
-LL | const ARRR2: [i32; Y2] = [99; 1];
-   |                    ^^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:52:19
    |
 LL | const Y3: usize = 42.0 > 42.0;
    |                   ^^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:55:20
-   |
-LL | const ARRR3: [i32; Y3] = [99; 0];
-   |                    ^^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:57:19
    |
 LL | const Y4: usize = 42.0 < 42.0;
    |                   ^^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:60:20
-   |
-LL | const ARRR4: [i32; Y4] = [99; 0];
-   |                    ^^
-
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:62:19
    |
 LL | const Y5: usize = 42.0 != 42.0;
    |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
 
-note: erroneous constant encountered
-  --> $DIR/const-integer-bool-ops.rs:65:20
-   |
-LL | const ARRR5: [i32; Y5] = [99; 0];
-   |                    ^^
-
 error: aborting due to 18 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/const-mut-refs/issue-76510.stderr b/tests/ui/consts/const-mut-refs/issue-76510.stderr
index a63be676fda..aff86e83578 100644
--- a/tests/ui/consts/const-mut-refs/issue-76510.stderr
+++ b/tests/ui/consts/const-mut-refs/issue-76510.stderr
@@ -4,12 +4,6 @@ error[E0764]: mutable references are not allowed in the final value of constants
 LL | const S: &'static mut str = &mut " hello ";
    |                             ^^^^^^^^^^^^^^
 
-note: erroneous constant encountered
-  --> $DIR/issue-76510.rs:7:70
-   |
-LL |         let s = transmute::<(*const u8, usize), &ManuallyDrop<str>>((S.as_ptr(), 3));
-   |                                                                      ^
-
 error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0764`.
diff --git a/tests/ui/consts/const-tup-index-span.stderr b/tests/ui/consts/const-tup-index-span.stderr
index 2a3f0cfb06d..792e18aa8fd 100644
--- a/tests/ui/consts/const-tup-index-span.stderr
+++ b/tests/ui/consts/const-tup-index-span.stderr
@@ -11,12 +11,6 @@ help: use a trailing comma to create a tuple with one element
 LL | const TUP: (usize,) = (5usize << 64,);
    |                       +            ++
 
-note: erroneous constant encountered
-  --> $DIR/const-tup-index-span.rs:6:18
-   |
-LL | const ARR: [i32; TUP.0] = [];
-   |                  ^^^
-
 error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/issue-54954.stderr b/tests/ui/consts/issue-54954.stderr
index ed6aa9c44a3..b8c983eb7b8 100644
--- a/tests/ui/consts/issue-54954.stderr
+++ b/tests/ui/consts/issue-54954.stderr
@@ -19,24 +19,6 @@ LL | |         core::mem::size_of::<T>()
 LL | |     }
    | |_____- `Tt::const_val` defined here
 
-note: erroneous constant encountered
-  --> $DIR/issue-54954.rs:11:15
-   |
-LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] {
-   |               ^^^^^^^
-
-note: erroneous constant encountered
-  --> $DIR/issue-54954.rs:11:34
-   |
-LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] {
-   |                                  ^^^^^^^
-
-note: erroneous constant encountered
-  --> $DIR/issue-54954.rs:16:22
-   |
-LL |     let _ = f([1f32; ARR_LEN]);
-   |                      ^^^^^^^
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0379, E0790.
diff --git a/tests/ui/consts/missing_assoc_const_type2.stderr b/tests/ui/consts/missing_assoc_const_type2.stderr
index 3279a077464..1255ca2d102 100644
--- a/tests/ui/consts/missing_assoc_const_type2.stderr
+++ b/tests/ui/consts/missing_assoc_const_type2.stderr
@@ -4,11 +4,5 @@ error: missing type for `const` item
 LL |     const FIRST:  = 10;
    |                 ^ help: provide a type for the associated constant: `u8`
 
-note: erroneous constant encountered
-  --> $DIR/missing_assoc_const_type2.rs:18:5
-   |
-LL |     TwoDigits::FIRST as usize
-   |     ^^^^^^^^^^^^^^^^
-
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/promoted-type-error-issue-133968.rs b/tests/ui/consts/promoted-type-error-issue-133968.rs
new file mode 100644
index 00000000000..52c0d48ab5b
--- /dev/null
+++ b/tests/ui/consts/promoted-type-error-issue-133968.rs
@@ -0,0 +1,7 @@
+struct B<T: ?Sized + Send + 'static> {
+    x: &'static T,
+}
+static STR: &'static [u8] = "a b"; //~ERROR: mismatched types
+static C: &B<[u8]> = &B { x: STR };
+
+fn main() {}
diff --git a/tests/ui/consts/promoted-type-error-issue-133968.stderr b/tests/ui/consts/promoted-type-error-issue-133968.stderr
new file mode 100644
index 00000000000..24f1268e4b6
--- /dev/null
+++ b/tests/ui/consts/promoted-type-error-issue-133968.stderr
@@ -0,0 +1,16 @@
+error[E0308]: mismatched types
+  --> $DIR/promoted-type-error-issue-133968.rs:4:29
+   |
+LL | static STR: &'static [u8] = "a b";
+   |                             ^^^^^ expected `&[u8]`, found `&str`
+   |
+   = note: expected reference `&'static [u8]`
+              found reference `&'static str`
+help: consider adding a leading `b`
+   |
+LL | static STR: &'static [u8] = b"a b";
+   |                             +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/dataflow_const_prop/ptr-in-switch-int-issue-131227.rs b/tests/ui/dataflow_const_prop/ptr-in-switch-int-issue-131227.rs
new file mode 100644
index 00000000000..7a55e13d0ee
--- /dev/null
+++ b/tests/ui/dataflow_const_prop/ptr-in-switch-int-issue-131227.rs
@@ -0,0 +1,19 @@
+//! Issue: <https://github.com/rust-lang/rust/issues/131227>
+//! Test that constant propagation in SwitchInt does not crash
+//! when encountering a ptr-to-int transmute.
+
+//@ check-pass
+//@ compile-flags: -Zmir-enable-passes=+InstSimplify-before-inline,+DataflowConstProp
+
+#![crate_type = "lib"]
+
+static mut G: i32 = 0;
+
+pub fn myfunc() -> i32 {
+    let var = &raw mut G;
+    let u: usize = unsafe { std::mem::transmute(var) };
+    match u {
+        0 => 0,
+        _ => 1,
+    }
+}
diff --git a/tests/ui/destructuring-assignment/struct_destructure_fail.stderr b/tests/ui/destructuring-assignment/struct_destructure_fail.stderr
index 4c4f0663eeb..58f8e97dea0 100644
--- a/tests/ui/destructuring-assignment/struct_destructure_fail.stderr
+++ b/tests/ui/destructuring-assignment/struct_destructure_fail.stderr
@@ -12,17 +12,6 @@ error: functional record updates are not allowed in destructuring assignments
 LL |     Struct { a, ..d } = Struct { a: 1, b: 2 };
    |                   ^ help: consider removing the trailing pattern
 
-error[E0797]: base expression required after `..`
-  --> $DIR/struct_destructure_fail.rs:15:19
-   |
-LL |     Struct { a, .. };
-   |                   ^
-   |
-help: add a base expression here
-   |
-LL |     Struct { a, ../* expr */ };
-   |                   ++++++++++
-
 error[E0026]: struct `Struct` does not have a field named `c`
   --> $DIR/struct_destructure_fail.rs:10:20
    |
@@ -48,6 +37,17 @@ help: or always ignore missing fields here
 LL |     Struct { a, .. } = Struct { a: 1, b: 2 };
    |               ~~~~~~
 
+error[E0797]: base expression required after `..`
+  --> $DIR/struct_destructure_fail.rs:15:19
+   |
+LL |     Struct { a, .. };
+   |                   ^
+   |
+help: add a base expression here
+   |
+LL |     Struct { a, ../* expr */ };
+   |                   ++++++++++
+
 error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0026, E0027, E0797.
diff --git a/tests/ui/enum-discriminant/issue-41394.stderr b/tests/ui/enum-discriminant/issue-41394.stderr
index 9bf4fc79b1b..e81562df04f 100644
--- a/tests/ui/enum-discriminant/issue-41394.stderr
+++ b/tests/ui/enum-discriminant/issue-41394.stderr
@@ -6,12 +6,6 @@ LL |     A = "" + 1
    |         |
    |         &str
 
-note: erroneous constant encountered
-  --> $DIR/issue-41394.rs:7:9
-   |
-LL |     A = Foo::A as isize
-   |         ^^^^^^^^^^^^^^^
-
 error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.stderr b/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.stderr
index b5c718ec381..044c1ae2dd4 100644
--- a/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.stderr
+++ b/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.stderr
@@ -4,7 +4,6 @@ warning: `extern` fn uses type `CStr`, which is not FFI-safe
 LL | type Foo = extern "C" fn(::std::ffi::CStr);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(CStr)` is FFI-unsafe due to `CStr`
    = help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
    = note: `CStr`/`CString` do not have a guaranteed layout
    = note: `#[warn(improper_ctypes_definitions)]` on by default
@@ -15,7 +14,6 @@ warning: `extern` block uses type `CStr`, which is not FFI-safe
 LL |     fn meh(blah: Foo);
    |                  ^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(CStr)` is FFI-unsafe due to `CStr`
    = help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
    = note: `CStr`/`CString` do not have a guaranteed layout
    = note: `#[warn(improper_ctypes)]` on by default
diff --git a/tests/ui/extern/extern-C-str-arg-ice-80125.stderr b/tests/ui/extern/extern-C-str-arg-ice-80125.stderr
index f2ee21c3166..ebd6cec6ecd 100644
--- a/tests/ui/extern/extern-C-str-arg-ice-80125.stderr
+++ b/tests/ui/extern/extern-C-str-arg-ice-80125.stderr
@@ -4,7 +4,6 @@ warning: `extern` fn uses type `str`, which is not FFI-safe
 LL | type ExternCallback = extern "C" fn(*const u8, u32, str);
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(*const u8, u32, str)` is FFI-unsafe due to `str`
    = help: consider using `*const u8` and a length instead
    = note: string slices have no C equivalent
    = note: `#[warn(improper_ctypes_definitions)]` on by default
@@ -15,7 +14,6 @@ warning: `extern` fn uses type `str`, which is not FFI-safe
 LL | pub extern "C" fn register_something(bind: ExternCallback) -> Struct {
    |                                            ^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(*const u8, u32, str)` is FFI-unsafe due to `str`
    = help: consider using `*const u8` and a length instead
    = note: string slices have no C equivalent
 
diff --git a/tests/ui/feature-gates/feature-gate-default-field-values.rs b/tests/ui/feature-gates/feature-gate-default-field-values.rs
new file mode 100644
index 00000000000..d2e41a71602
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-default-field-values.rs
@@ -0,0 +1,106 @@
+#![feature(generic_const_exprs)]
+#![allow(unused_variables, dead_code, incomplete_features)]
+
+pub struct S;
+
+#[derive(Default)]
+pub struct Foo {
+    pub bar: S = S, //~ ERROR default values on fields are experimental
+    pub baz: i32 = 42 + 3, //~ ERROR default values on fields are experimental
+}
+
+#[derive(Default)]
+pub enum Bar {
+    #[default]
+    Foo { //~ ERROR the `#[default]` attribute may only be used on unit enum variants
+        bar: S = S, //~ ERROR default values on fields are experimental
+        baz: i32 = 42 + 3, //~ ERROR default values on fields are experimental
+    }
+}
+
+#[derive(Default)]
+pub struct Qux<A, const C: i32> {
+    bar: S = Qux::<A, C>::S, //~ ERROR default values on fields are experimental
+    baz: i32 = foo(), //~ ERROR default values on fields are experimental
+    bat: i32 = <Qux<A, C> as T>::K, //~ ERROR default values on fields are experimental
+    bay: i32 = C, //~ ERROR default values on fields are experimental
+    bak: Vec<A> = Vec::new(), //~ ERROR default values on fields are experimental
+}
+
+impl<A, const C: i32> Qux<A, C> {
+    const S: S = S;
+}
+
+trait T {
+    const K: i32;
+}
+
+impl<A, const C: i32> T for Qux<A, C> {
+    const K: i32 = 2;
+}
+
+const fn foo() -> i32 {
+    42
+}
+
+#[derive(Default)]
+pub struct Opt {
+    mandatory: Option<()>,
+    optional: () = (), //~ ERROR default values on fields are experimental
+}
+
+#[derive(Default)]
+pub enum OptEnum {
+    #[default]
+    Variant { //~ ERROR the `#[default]` attribute may only be used on unit enum variants
+        mandatory: Option<()>,
+        optional: () = (), //~ ERROR default values on fields are experimental
+    }
+}
+
+fn main () {
+    let x = Foo { .. }; //~ ERROR base expression required after `..`
+    let y = Foo::default();
+    let z = Foo { baz: 1, .. }; //~ ERROR base expression required after `..`
+
+    assert_eq!(45, x.baz);
+    assert_eq!(45, y.baz);
+    assert_eq!(1, z.baz);
+
+    let x = Bar::Foo { .. }; //~ ERROR base expression required after `..`
+    let y = Bar::default();
+    let z = Bar::Foo { baz: 1, .. }; //~ ERROR base expression required after `..`
+
+    assert!(matches!(Bar::Foo { bar: S, baz: 45 }, x));
+    assert!(matches!(Bar::Foo { bar: S, baz: 45 }, y));
+    assert!(matches!(Bar::Foo { bar: S, baz: 1 }, z));
+
+    let x = Qux::<i32, 4> { .. }; //~ ERROR base expression required after `..`
+    assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, bay: 4, .. }, x));
+    //~^ ERROR base expression required after `..`
+    assert!(x.bak.is_empty());
+    let y = Opt { mandatory: None, .. };
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(Opt::default(), y));
+    let z = Opt::default();
+    assert!(matches!(Opt { mandatory: None, .. }, z));
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(Opt { .. }, z));
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(Opt { optional: (), .. }, z));
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(Opt { optional: (), mandatory: None, .. }, z));
+    //~^ ERROR base expression required after `..`
+    let y = OptEnum::Variant { mandatory: None, .. };
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(OptEnum::default(), y));
+    let z = OptEnum::default();
+    assert!(matches!(OptEnum::Variant { mandatory: None, .. }, z));
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(OptEnum::Variant { .. }, z));
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(OptEnum::Variant { optional: (), .. }, z));
+    //~^ ERROR base expression required after `..`
+    assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }, z));
+    //~^ ERROR base expression required after `..`
+}
diff --git a/tests/ui/feature-gates/feature-gate-default-field-values.stderr b/tests/ui/feature-gates/feature-gate-default-field-values.stderr
new file mode 100644
index 00000000000..d882c322c8e
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-default-field-values.stderr
@@ -0,0 +1,318 @@
+error: the `#[default]` attribute may only be used on unit enum variants
+  --> $DIR/feature-gate-default-field-values.rs:15:5
+   |
+LL |     Foo {
+   |     ^^^
+   |
+   = help: consider a manual implementation of `Default`
+
+error: the `#[default]` attribute may only be used on unit enum variants
+  --> $DIR/feature-gate-default-field-values.rs:55:5
+   |
+LL |     Variant {
+   |     ^^^^^^^
+   |
+   = help: consider a manual implementation of `Default`
+
+error[E0658]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:8:15
+   |
+LL |     pub bar: S = S,
+   |               ^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:9:17
+   |
+LL |     pub baz: i32 = 42 + 3,
+   |                 ^^^^^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:16:15
+   |
+LL |         bar: S = S,
+   |               ^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:17:17
+   |
+LL |         baz: i32 = 42 + 3,
+   |                 ^^^^^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:23:11
+   |
+LL |     bar: S = Qux::<A, C>::S,
+   |           ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:24:13
+   |
+LL |     baz: i32 = foo(),
+   |             ^^^^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:25:13
+   |
+LL |     bat: i32 = <Qux<A, C> as T>::K,
+   |             ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:26:13
+   |
+LL |     bay: i32 = C,
+   |             ^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:27:16
+   |
+LL |     bak: Vec<A> = Vec::new(),
+   |                ^^^^^^^^^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:49:17
+   |
+LL |     optional: () = (),
+   |                 ^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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]: default values on fields are experimental
+  --> $DIR/feature-gate-default-field-values.rs:57:21
+   |
+LL |         optional: () = (),
+   |                     ^^^^^
+   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:62:21
+   |
+LL |     let x = Foo { .. };
+   |                     ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     let x = Foo { ../* expr */ };
+   |                     ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:64:29
+   |
+LL |     let z = Foo { baz: 1, .. };
+   |                             ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     let z = Foo { baz: 1, ../* expr */ };
+   |                             ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:70:26
+   |
+LL |     let x = Bar::Foo { .. };
+   |                          ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     let x = Bar::Foo { ../* expr */ };
+   |                          ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:72:34
+   |
+LL |     let z = Bar::Foo { baz: 1, .. };
+   |                                  ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     let z = Bar::Foo { baz: 1, ../* expr */ };
+   |                                  ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:78:31
+   |
+LL |     let x = Qux::<i32, 4> { .. };
+   |                               ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     let x = Qux::<i32, 4> { ../* expr */ };
+   |                               ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:79:73
+   |
+LL |     assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, bay: 4, .. }, x));
+   |                                                                         ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, bay: 4, ../* expr */ }, x));
+   |                                                                         ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:82:38
+   |
+LL |     let y = Opt { mandatory: None, .. };
+   |                                      ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     let y = Opt { mandatory: None, ../* expr */ };
+   |                                      ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:86:47
+   |
+LL |     assert!(matches!(Opt { mandatory: None, .. }, z));
+   |                                               ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     assert!(matches!(Opt { mandatory: None, ../* expr */ }, z));
+   |                                               ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:88:30
+   |
+LL |     assert!(matches!(Opt { .. }, z));
+   |                              ^
+   |
+help: add a base expression here
+   |
+LL |     assert!(matches!(Opt { ../* expr */ }, z));
+   |                              ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:90:44
+   |
+LL |     assert!(matches!(Opt { optional: (), .. }, z));
+   |                                            ^
+   |
+help: add a base expression here
+   |
+LL |     assert!(matches!(Opt { optional: (), ../* expr */ }, z));
+   |                                            ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:92:61
+   |
+LL |     assert!(matches!(Opt { optional: (), mandatory: None, .. }, z));
+   |                                                             ^
+   |
+help: remove the `..` as all the fields are already present
+   |
+LL -     assert!(matches!(Opt { optional: (), mandatory: None, .. }, z));
+LL +     assert!(matches!(Opt { optional: (), mandatory: None,  }, z));
+   |
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:94:51
+   |
+LL |     let y = OptEnum::Variant { mandatory: None, .. };
+   |                                                   ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     let y = OptEnum::Variant { mandatory: None, ../* expr */ };
+   |                                                   ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:98:60
+   |
+LL |     assert!(matches!(OptEnum::Variant { mandatory: None, .. }, z));
+   |                                                            ^
+   |
+   = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
+help: add a base expression here
+   |
+LL |     assert!(matches!(OptEnum::Variant { mandatory: None, ../* expr */ }, z));
+   |                                                            ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:100:43
+   |
+LL |     assert!(matches!(OptEnum::Variant { .. }, z));
+   |                                           ^
+   |
+help: add a base expression here
+   |
+LL |     assert!(matches!(OptEnum::Variant { ../* expr */ }, z));
+   |                                           ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:102:57
+   |
+LL |     assert!(matches!(OptEnum::Variant { optional: (), .. }, z));
+   |                                                         ^
+   |
+help: add a base expression here
+   |
+LL |     assert!(matches!(OptEnum::Variant { optional: (), ../* expr */ }, z));
+   |                                                         ++++++++++
+
+error[E0797]: base expression required after `..`
+  --> $DIR/feature-gate-default-field-values.rs:104:74
+   |
+LL |     assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }, z));
+   |                                                                          ^
+   |
+help: remove the `..` as all the fields are already present
+   |
+LL -     assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }, z));
+LL +     assert!(matches!(OptEnum::Variant { optional: (), mandatory: None,  }, z));
+   |
+
+error: aborting due to 29 previous errors
+
+Some errors have detailed explanations: E0658, E0797.
+For more information about an error, try `rustc --explain E0658`.
diff --git a/tests/ui/layout/base-layout-is-sized-ice-123078.stderr b/tests/ui/layout/base-layout-is-sized-ice-123078.stderr
index ee7f5162552..455bd2cbf8b 100644
--- a/tests/ui/layout/base-layout-is-sized-ice-123078.stderr
+++ b/tests/ui/layout/base-layout-is-sized-ice-123078.stderr
@@ -25,12 +25,6 @@ LL | const C: S = unsafe { std::mem::transmute(()) };
    = note: source type: `()` (0 bits)
    = note: target type: `S` (size can vary because of [u8])
 
-note: erroneous constant encountered
-  --> $DIR/base-layout-is-sized-ice-123078.rs:13:5
-   |
-LL |     C;
-   |     ^
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0277, E0512.
diff --git a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-dylib.rs b/tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-dylib.rs
index 0d927117d81..0d927117d81 100644
--- a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-dylib.rs
+++ b/tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-dylib.rs
diff --git a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs b/tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-rlib.rs
index 49a46b202e4..49a46b202e4 100644
--- a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs
+++ b/tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-rlib.rs
diff --git a/tests/ui/native-library-link-flags/empty-kind-1.rs b/tests/ui/link-native-libs/empty-kind-1.rs
index d9b8d8a7f7d..d9b8d8a7f7d 100644
--- a/tests/ui/native-library-link-flags/empty-kind-1.rs
+++ b/tests/ui/link-native-libs/empty-kind-1.rs
diff --git a/tests/ui/native-library-link-flags/empty-kind-1.stderr b/tests/ui/link-native-libs/empty-kind-1.stderr
index 3e5b0549339..3e5b0549339 100644
--- a/tests/ui/native-library-link-flags/empty-kind-1.stderr
+++ b/tests/ui/link-native-libs/empty-kind-1.stderr
diff --git a/tests/ui/native-library-link-flags/empty-kind-2.rs b/tests/ui/link-native-libs/empty-kind-2.rs
index 16cb3b917e4..16cb3b917e4 100644
--- a/tests/ui/native-library-link-flags/empty-kind-2.rs
+++ b/tests/ui/link-native-libs/empty-kind-2.rs
diff --git a/tests/ui/native-library-link-flags/empty-kind-2.stderr b/tests/ui/link-native-libs/empty-kind-2.stderr
index 3e5b0549339..3e5b0549339 100644
--- a/tests/ui/native-library-link-flags/empty-kind-2.stderr
+++ b/tests/ui/link-native-libs/empty-kind-2.stderr
diff --git a/tests/ui/linkage-attr/issue-109144.rs b/tests/ui/link-native-libs/issue-109144.rs
index 2f740e55389..2f740e55389 100644
--- a/tests/ui/linkage-attr/issue-109144.rs
+++ b/tests/ui/link-native-libs/issue-109144.rs
diff --git a/tests/ui/linkage-attr/issue-109144.stderr b/tests/ui/link-native-libs/issue-109144.stderr
index 0748d94189c..0748d94189c 100644
--- a/tests/ui/linkage-attr/issue-109144.stderr
+++ b/tests/ui/link-native-libs/issue-109144.stderr
diff --git a/tests/ui/issues/issue-43925.rs b/tests/ui/link-native-libs/issue-43925.rs
index 1a210887154..1a210887154 100644
--- a/tests/ui/issues/issue-43925.rs
+++ b/tests/ui/link-native-libs/issue-43925.rs
diff --git a/tests/ui/issues/issue-43925.stderr b/tests/ui/link-native-libs/issue-43925.stderr
index 7cc347c6163..7cc347c6163 100644
--- a/tests/ui/issues/issue-43925.stderr
+++ b/tests/ui/link-native-libs/issue-43925.stderr
diff --git a/tests/ui/issues/issue-43926.rs b/tests/ui/link-native-libs/issue-43926.rs
index 6d3003552dc..6d3003552dc 100644
--- a/tests/ui/issues/issue-43926.rs
+++ b/tests/ui/link-native-libs/issue-43926.rs
diff --git a/tests/ui/issues/issue-43926.stderr b/tests/ui/link-native-libs/issue-43926.stderr
index 7c5c50a38a9..7c5c50a38a9 100644
--- a/tests/ui/issues/issue-43926.stderr
+++ b/tests/ui/link-native-libs/issue-43926.stderr
diff --git a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs b/tests/ui/link-native-libs/issue-70093/issue-70093-link-directives.rs
index 9c60affbccd..9c60affbccd 100644
--- a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs
+++ b/tests/ui/link-native-libs/issue-70093/issue-70093-link-directives.rs
diff --git a/tests/ui/issues/issue-70093/issue-70093.rs b/tests/ui/link-native-libs/issue-70093/issue-70093.rs
index 86974239338..86974239338 100644
--- a/tests/ui/issues/issue-70093/issue-70093.rs
+++ b/tests/ui/link-native-libs/issue-70093/issue-70093.rs
diff --git a/tests/ui/linkage-attr/kind-framework.rs b/tests/ui/link-native-libs/kind-framework.rs
index c2f90809e03..c2f90809e03 100644
--- a/tests/ui/linkage-attr/kind-framework.rs
+++ b/tests/ui/link-native-libs/kind-framework.rs
diff --git a/tests/ui/linkage-attr/kind-framework.stderr b/tests/ui/link-native-libs/kind-framework.stderr
index 93dacd68e29..93dacd68e29 100644
--- a/tests/ui/linkage-attr/kind-framework.stderr
+++ b/tests/ui/link-native-libs/kind-framework.stderr
diff --git a/tests/ui/native-library-link-flags/link-arg-error.rs b/tests/ui/link-native-libs/link-arg-error.rs
index 4defb108178..4defb108178 100644
--- a/tests/ui/native-library-link-flags/link-arg-error.rs
+++ b/tests/ui/link-native-libs/link-arg-error.rs
diff --git a/tests/ui/native-library-link-flags/link-arg-error.stderr b/tests/ui/link-native-libs/link-arg-error.stderr
index e1d01e14152..e1d01e14152 100644
--- a/tests/ui/native-library-link-flags/link-arg-error.stderr
+++ b/tests/ui/link-native-libs/link-arg-error.stderr
diff --git a/tests/ui/native-library-link-flags/link-arg-from-rs.rs b/tests/ui/link-native-libs/link-arg-from-rs.rs
index 4a6017fea33..4a6017fea33 100644
--- a/tests/ui/native-library-link-flags/link-arg-from-rs.rs
+++ b/tests/ui/link-native-libs/link-arg-from-rs.rs
diff --git a/tests/ui/native-library-link-flags/link-arg-from-rs.stderr b/tests/ui/link-native-libs/link-arg-from-rs.stderr
index f31e15f1da6..f31e15f1da6 100644
--- a/tests/ui/native-library-link-flags/link-arg-from-rs.stderr
+++ b/tests/ui/link-native-libs/link-arg-from-rs.stderr
diff --git a/tests/ui/linkage-attr/link-attr-validation-early.rs b/tests/ui/link-native-libs/link-attr-validation-early.rs
index b9a835fb5e9..b9a835fb5e9 100644
--- a/tests/ui/linkage-attr/link-attr-validation-early.rs
+++ b/tests/ui/link-native-libs/link-attr-validation-early.rs
diff --git a/tests/ui/linkage-attr/link-attr-validation-early.stderr b/tests/ui/link-native-libs/link-attr-validation-early.stderr
index 24ad9d825f8..24ad9d825f8 100644
--- a/tests/ui/linkage-attr/link-attr-validation-early.stderr
+++ b/tests/ui/link-native-libs/link-attr-validation-early.stderr
diff --git a/tests/ui/linkage-attr/link-attr-validation-late.rs b/tests/ui/link-native-libs/link-attr-validation-late.rs
index 34f720dd2d3..34f720dd2d3 100644
--- a/tests/ui/linkage-attr/link-attr-validation-late.rs
+++ b/tests/ui/link-native-libs/link-attr-validation-late.rs
diff --git a/tests/ui/linkage-attr/link-attr-validation-late.stderr b/tests/ui/link-native-libs/link-attr-validation-late.stderr
index 1ad5fbaf7de..1ad5fbaf7de 100644
--- a/tests/ui/linkage-attr/link-attr-validation-late.stderr
+++ b/tests/ui/link-native-libs/link-attr-validation-late.stderr
diff --git a/tests/ui/linkage-attr/link-cfg-works.rs b/tests/ui/link-native-libs/link-cfg-works.rs
index 7b936bc43b1..7b936bc43b1 100644
--- a/tests/ui/linkage-attr/link-cfg-works.rs
+++ b/tests/ui/link-native-libs/link-cfg-works.rs
diff --git a/tests/ui/manual/manual-link-bad-form.rs b/tests/ui/link-native-libs/manual-link-bad-form.rs
index 0f5723adec9..0f5723adec9 100644
--- a/tests/ui/manual/manual-link-bad-form.rs
+++ b/tests/ui/link-native-libs/manual-link-bad-form.rs
diff --git a/tests/ui/manual/manual-link-bad-form.stderr b/tests/ui/link-native-libs/manual-link-bad-form.stderr
index 7fd7a1066b4..7fd7a1066b4 100644
--- a/tests/ui/manual/manual-link-bad-form.stderr
+++ b/tests/ui/link-native-libs/manual-link-bad-form.stderr
diff --git a/tests/ui/manual/manual-link-bad-kind.rs b/tests/ui/link-native-libs/manual-link-bad-kind.rs
index d070faa6574..d070faa6574 100644
--- a/tests/ui/manual/manual-link-bad-kind.rs
+++ b/tests/ui/link-native-libs/manual-link-bad-kind.rs
diff --git a/tests/ui/manual/manual-link-bad-kind.stderr b/tests/ui/link-native-libs/manual-link-bad-kind.stderr
index 647c4c61e02..647c4c61e02 100644
--- a/tests/ui/manual/manual-link-bad-kind.stderr
+++ b/tests/ui/link-native-libs/manual-link-bad-kind.stderr
diff --git a/tests/ui/manual/manual-link-bad-search-path.rs b/tests/ui/link-native-libs/manual-link-bad-search-path.rs
index c9ced4734fc..c9ced4734fc 100644
--- a/tests/ui/manual/manual-link-bad-search-path.rs
+++ b/tests/ui/link-native-libs/manual-link-bad-search-path.rs
diff --git a/tests/ui/manual/manual-link-bad-search-path.stderr b/tests/ui/link-native-libs/manual-link-bad-search-path.stderr
index 2c0649ea152..2c0649ea152 100644
--- a/tests/ui/manual/manual-link-bad-search-path.stderr
+++ b/tests/ui/link-native-libs/manual-link-bad-search-path.stderr
diff --git a/tests/ui/manual/manual-link-framework.rs b/tests/ui/link-native-libs/manual-link-framework.rs
index 43cdda0a4e6..43cdda0a4e6 100644
--- a/tests/ui/manual/manual-link-framework.rs
+++ b/tests/ui/link-native-libs/manual-link-framework.rs
diff --git a/tests/ui/manual/manual-link-framework.stderr b/tests/ui/link-native-libs/manual-link-framework.stderr
index 38d2302a48d..38d2302a48d 100644
--- a/tests/ui/manual/manual-link-framework.stderr
+++ b/tests/ui/link-native-libs/manual-link-framework.stderr
diff --git a/tests/ui/manual/manual-link-unsupported-kind.rs b/tests/ui/link-native-libs/manual-link-unsupported-kind.rs
index b5b9e3e6577..b5b9e3e6577 100644
--- a/tests/ui/manual/manual-link-unsupported-kind.rs
+++ b/tests/ui/link-native-libs/manual-link-unsupported-kind.rs
diff --git a/tests/ui/manual/manual-link-unsupported-kind.stderr b/tests/ui/link-native-libs/manual-link-unsupported-kind.stderr
index ae4a1ec9a95..ae4a1ec9a95 100644
--- a/tests/ui/manual/manual-link-unsupported-kind.stderr
+++ b/tests/ui/link-native-libs/manual-link-unsupported-kind.stderr
diff --git a/tests/ui/native-library-link-flags/modifiers-bad.blank.stderr b/tests/ui/link-native-libs/modifiers-bad.blank.stderr
index ea36af0b4cf..ea36af0b4cf 100644
--- a/tests/ui/native-library-link-flags/modifiers-bad.blank.stderr
+++ b/tests/ui/link-native-libs/modifiers-bad.blank.stderr
diff --git a/tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr b/tests/ui/link-native-libs/modifiers-bad.no-prefix.stderr
index ea36af0b4cf..ea36af0b4cf 100644
--- a/tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr
+++ b/tests/ui/link-native-libs/modifiers-bad.no-prefix.stderr
diff --git a/tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr b/tests/ui/link-native-libs/modifiers-bad.prefix-only.stderr
index 1e701374688..1e701374688 100644
--- a/tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr
+++ b/tests/ui/link-native-libs/modifiers-bad.prefix-only.stderr
diff --git a/tests/ui/native-library-link-flags/modifiers-bad.rs b/tests/ui/link-native-libs/modifiers-bad.rs
index 185201e0d84..185201e0d84 100644
--- a/tests/ui/native-library-link-flags/modifiers-bad.rs
+++ b/tests/ui/link-native-libs/modifiers-bad.rs
diff --git a/tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr b/tests/ui/link-native-libs/modifiers-bad.unknown.stderr
index 75950ad9c64..75950ad9c64 100644
--- a/tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr
+++ b/tests/ui/link-native-libs/modifiers-bad.unknown.stderr
diff --git a/tests/ui/native-library-link-flags/modifiers-override-2.rs b/tests/ui/link-native-libs/modifiers-override-2.rs
index a462a741ac6..a462a741ac6 100644
--- a/tests/ui/native-library-link-flags/modifiers-override-2.rs
+++ b/tests/ui/link-native-libs/modifiers-override-2.rs
diff --git a/tests/ui/native-library-link-flags/modifiers-override-2.stderr b/tests/ui/link-native-libs/modifiers-override-2.stderr
index aa5b59c5b6f..aa5b59c5b6f 100644
--- a/tests/ui/native-library-link-flags/modifiers-override-2.stderr
+++ b/tests/ui/link-native-libs/modifiers-override-2.stderr
diff --git a/tests/ui/native-library-link-flags/modifiers-override-3.rs b/tests/ui/link-native-libs/modifiers-override-3.rs
index d05735ad616..d05735ad616 100644
--- a/tests/ui/native-library-link-flags/modifiers-override-3.rs
+++ b/tests/ui/link-native-libs/modifiers-override-3.rs
diff --git a/tests/ui/native-library-link-flags/modifiers-override-3.stderr b/tests/ui/link-native-libs/modifiers-override-3.stderr
index 3eb9459f6f3..3eb9459f6f3 100644
--- a/tests/ui/native-library-link-flags/modifiers-override-3.stderr
+++ b/tests/ui/link-native-libs/modifiers-override-3.stderr
diff --git a/tests/ui/native-library-link-flags/modifiers-override.rs b/tests/ui/link-native-libs/modifiers-override.rs
index cd2d003664a..cd2d003664a 100644
--- a/tests/ui/native-library-link-flags/modifiers-override.rs
+++ b/tests/ui/link-native-libs/modifiers-override.rs
diff --git a/tests/ui/native-library-link-flags/modifiers-override.stderr b/tests/ui/link-native-libs/modifiers-override.stderr
index 64427651e9f..64427651e9f 100644
--- a/tests/ui/native-library-link-flags/modifiers-override.stderr
+++ b/tests/ui/link-native-libs/modifiers-override.stderr
diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs b/tests/ui/link-native-libs/msvc-non-utf8-output.rs
index 659a832247a..659a832247a 100644
--- a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs
+++ b/tests/ui/link-native-libs/msvc-non-utf8-output.rs
diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr b/tests/ui/link-native-libs/msvc-non-utf8-output.stderr
index 7f3ef376447..7f3ef376447 100644
--- a/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr
+++ b/tests/ui/link-native-libs/msvc-non-utf8-output.stderr
diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-1.rs b/tests/ui/link-native-libs/suggest-libname-only-1.rs
index 328181fb5cb..328181fb5cb 100644
--- a/tests/ui/native-library-link-flags/suggest-libname-only-1.rs
+++ b/tests/ui/link-native-libs/suggest-libname-only-1.rs
diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-1.stderr b/tests/ui/link-native-libs/suggest-libname-only-1.stderr
index e142835a9d6..e142835a9d6 100644
--- a/tests/ui/native-library-link-flags/suggest-libname-only-1.stderr
+++ b/tests/ui/link-native-libs/suggest-libname-only-1.stderr
diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-2.rs b/tests/ui/link-native-libs/suggest-libname-only-2.rs
index 7ed106e4ab4..7ed106e4ab4 100644
--- a/tests/ui/native-library-link-flags/suggest-libname-only-2.rs
+++ b/tests/ui/link-native-libs/suggest-libname-only-2.rs
diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-2.stderr b/tests/ui/link-native-libs/suggest-libname-only-2.stderr
index 392d2f01f61..392d2f01f61 100644
--- a/tests/ui/native-library-link-flags/suggest-libname-only-2.stderr
+++ b/tests/ui/link-native-libs/suggest-libname-only-2.stderr
diff --git a/tests/ui/linkage-attr/uikit-framework.rs b/tests/ui/link-native-libs/uikit-framework.rs
index fca0332384a..fca0332384a 100644
--- a/tests/ui/linkage-attr/uikit-framework.rs
+++ b/tests/ui/link-native-libs/uikit-framework.rs
diff --git a/tests/ui/lint/extern-C-fnptr-lints-slices.rs b/tests/ui/lint/extern-C-fnptr-lints-slices.rs
index 4e3832ab1b6..0c35eb37a48 100644
--- a/tests/ui/lint/extern-C-fnptr-lints-slices.rs
+++ b/tests/ui/lint/extern-C-fnptr-lints-slices.rs
@@ -3,7 +3,7 @@
 // It's an improper ctype (a slice) arg in an extern "C" fnptr.
 
 pub type F = extern "C" fn(&[u8]);
-//~^ ERROR: `extern` fn uses type `&[u8]`, which is not FFI-safe
+//~^ ERROR: `extern` fn uses type `[u8]`, which is not FFI-safe
 
 
 fn main() {}
diff --git a/tests/ui/lint/extern-C-fnptr-lints-slices.stderr b/tests/ui/lint/extern-C-fnptr-lints-slices.stderr
index c0923dd96c8..d13f93ca96f 100644
--- a/tests/ui/lint/extern-C-fnptr-lints-slices.stderr
+++ b/tests/ui/lint/extern-C-fnptr-lints-slices.stderr
@@ -1,12 +1,11 @@
-error: `extern` fn uses type `&[u8]`, which is not FFI-safe
+error: `extern` fn uses type `[u8]`, which is not FFI-safe
   --> $DIR/extern-C-fnptr-lints-slices.rs:5:14
    |
 LL | pub type F = extern "C" fn(&[u8]);
    |              ^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `for<'a> extern "C" fn(&'a [u8])` is FFI-unsafe due to `&[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = help: consider using a raw pointer instead
+   = note: slices have no C equivalent
 note: the lint level is defined here
   --> $DIR/extern-C-fnptr-lints-slices.rs:1:8
    |
diff --git a/tests/ui/lint/improper_ctypes_definitions_ice_134060.rs b/tests/ui/lint/improper_ctypes_definitions_ice_134060.rs
new file mode 100644
index 00000000000..b30be996736
--- /dev/null
+++ b/tests/ui/lint/improper_ctypes_definitions_ice_134060.rs
@@ -0,0 +1,15 @@
+//! Regression test for <https://github.com/rust-lang/rust/issues/134060> due to impl bug from
+//! <https://github.com/rust-lang/rust/pull/131669>. This test should be adjusted in favor of more
+//! comprehensive coverage when the changes are to be relanded, as this is a basic sanity check to
+//! check that the fuzzed example from #134060 doesn't ICE.
+
+//@ check-pass
+
+#![crate_type = "lib"]
+
+pub trait Foo {
+    extern "C" fn foo_(&self, _: ()) -> i64 {
+        //~^ WARN `extern` fn uses type `()`, which is not FFI-safe
+        0
+    }
+}
diff --git a/tests/ui/lint/improper_ctypes_definitions_ice_134060.stderr b/tests/ui/lint/improper_ctypes_definitions_ice_134060.stderr
new file mode 100644
index 00000000000..f6ac9a92cd5
--- /dev/null
+++ b/tests/ui/lint/improper_ctypes_definitions_ice_134060.stderr
@@ -0,0 +1,12 @@
+warning: `extern` fn uses type `()`, which is not FFI-safe
+  --> $DIR/improper_ctypes_definitions_ice_134060.rs:11:34
+   |
+LL |     extern "C" fn foo_(&self, _: ()) -> i64 {
+   |                                  ^^ not FFI-safe
+   |
+   = help: consider using a struct instead
+   = note: tuples have unspecified layout
+   = note: `#[warn(improper_ctypes_definitions)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/lint/lint-ctypes-73249-2.stderr b/tests/ui/lint/lint-ctypes-73249-2.stderr
index f035cdb213e..ef30a406969 100644
--- a/tests/ui/lint/lint-ctypes-73249-2.stderr
+++ b/tests/ui/lint/lint-ctypes-73249-2.stderr
@@ -4,7 +4,6 @@ error: `extern` block uses type `Qux`, which is not FFI-safe
 LL |     fn lint_me() -> A<()>;
    |                     ^^^^^ not FFI-safe
    |
-   = note: this reference (`&Qux`) is ABI-compatible with a C pointer, but `Qux` itself does not have a C layout
    = note: opaque types have no C equivalent
 note: the lint level is defined here
   --> $DIR/lint-ctypes-73249-2.rs:2:9
diff --git a/tests/ui/lint/lint-ctypes-94223.stderr b/tests/ui/lint/lint-ctypes-94223.stderr
index 4bebca69b7f..bd127cf6004 100644
--- a/tests/ui/lint/lint-ctypes-94223.stderr
+++ b/tests/ui/lint/lint-ctypes-94223.stderr
@@ -4,8 +4,7 @@ error: `extern` fn uses type `[u8]`, which is not FFI-safe
 LL | pub fn bad(f: extern "C" fn([u8])) {}
    |               ^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn([u8])` is FFI-unsafe due to `[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
+   = help: consider using a raw pointer instead
    = note: slices have no C equivalent
 note: the lint level is defined here
   --> $DIR/lint-ctypes-94223.rs:2:9
@@ -19,8 +18,7 @@ error: `extern` fn uses type `[u8]`, which is not FFI-safe
 LL | pub fn bad_twice(f: Result<extern "C" fn([u8]), extern "C" fn([u8])>) {}
    |                            ^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn([u8])` is FFI-unsafe due to `[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
+   = help: consider using a raw pointer instead
    = note: slices have no C equivalent
 
 error: `extern` fn uses type `[u8]`, which is not FFI-safe
@@ -29,8 +27,7 @@ error: `extern` fn uses type `[u8]`, which is not FFI-safe
 LL | pub fn bad_twice(f: Result<extern "C" fn([u8]), extern "C" fn([u8])>) {}
    |                                                 ^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn([u8])` is FFI-unsafe due to `[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
+   = help: consider using a raw pointer instead
    = note: slices have no C equivalent
 
 error: `extern` fn uses type `[u8]`, which is not FFI-safe
@@ -39,8 +36,7 @@ error: `extern` fn uses type `[u8]`, which is not FFI-safe
 LL | struct BadStruct(extern "C" fn([u8]));
    |                  ^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn([u8])` is FFI-unsafe due to `[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
+   = help: consider using a raw pointer instead
    = note: slices have no C equivalent
 
 error: `extern` fn uses type `[u8]`, which is not FFI-safe
@@ -49,8 +45,7 @@ error: `extern` fn uses type `[u8]`, which is not FFI-safe
 LL |     A(extern "C" fn([u8])),
    |       ^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn([u8])` is FFI-unsafe due to `[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
+   = help: consider using a raw pointer instead
    = note: slices have no C equivalent
 
 error: `extern` fn uses type `[u8]`, which is not FFI-safe
@@ -59,8 +54,7 @@ error: `extern` fn uses type `[u8]`, which is not FFI-safe
 LL |     A(extern "C" fn([u8])),
    |       ^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn([u8])` is FFI-unsafe due to `[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
+   = help: consider using a raw pointer instead
    = note: slices have no C equivalent
 
 error: `extern` fn uses type `[u8]`, which is not FFI-safe
@@ -69,8 +63,7 @@ error: `extern` fn uses type `[u8]`, which is not FFI-safe
 LL | type Foo = extern "C" fn([u8]);
    |            ^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn([u8])` is FFI-unsafe due to `[u8]`
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
+   = help: consider using a raw pointer instead
    = note: slices have no C equivalent
 
 error: `extern` fn uses type `Option<&<T as FooTrait>::FooType>`, which is not FFI-safe
@@ -79,7 +72,6 @@ error: `extern` fn uses type `Option<&<T as FooTrait>::FooType>`, which is not F
 LL | pub type Foo2<T> = extern "C" fn(Option<&<T as FooTrait>::FooType>);
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `for<'a> extern "C" fn(Option<&'a <T as FooTrait>::FooType>)` is FFI-unsafe due to `Option<&<T as FooTrait>::FooType>`
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 
@@ -89,7 +81,6 @@ error: `extern` fn uses type `FfiUnsafe`, which is not FFI-safe
 LL | pub static BAD: extern "C" fn(FfiUnsafe) = f;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(FfiUnsafe)` is FFI-unsafe due to `FfiUnsafe`
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 note: the type is defined here
@@ -104,7 +95,6 @@ error: `extern` fn uses type `FfiUnsafe`, which is not FFI-safe
 LL | pub static BAD_TWICE: Result<extern "C" fn(FfiUnsafe), extern "C" fn(FfiUnsafe)> = Ok(f);
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(FfiUnsafe)` is FFI-unsafe due to `FfiUnsafe`
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 note: the type is defined here
@@ -119,7 +109,6 @@ error: `extern` fn uses type `FfiUnsafe`, which is not FFI-safe
 LL | pub static BAD_TWICE: Result<extern "C" fn(FfiUnsafe), extern "C" fn(FfiUnsafe)> = Ok(f);
    |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(FfiUnsafe)` is FFI-unsafe due to `FfiUnsafe`
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 note: the type is defined here
@@ -134,7 +123,6 @@ error: `extern` fn uses type `FfiUnsafe`, which is not FFI-safe
 LL | pub const BAD_CONST: extern "C" fn(FfiUnsafe) = f;
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: the function pointer to `extern "C" fn(FfiUnsafe)` is FFI-unsafe due to `FfiUnsafe`
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 note: the type is defined here
diff --git a/tests/ui/lint/lint-ctypes-cstr.rs b/tests/ui/lint/lint-ctypes-cstr.rs
index c4de5a44a96..b04decd0bca 100644
--- a/tests/ui/lint/lint-ctypes-cstr.rs
+++ b/tests/ui/lint/lint-ctypes-cstr.rs
@@ -8,7 +8,7 @@ extern "C" {
     //~^ ERROR `extern` block uses type `CStr`, which is not FFI-safe
     //~| HELP consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
     fn take_cstr_ref(s: &CStr);
-    //~^ ERROR `extern` block uses type `&CStr`, which is not FFI-safe
+    //~^ ERROR `extern` block uses type `CStr`, which is not FFI-safe
     //~| HELP consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
     fn take_cstring(s: CString);
     //~^ ERROR `extern` block uses type `CString`, which is not FFI-safe
@@ -27,7 +27,7 @@ extern "C" {
 }
 
 extern "C" fn rust_take_cstr_ref(s: &CStr) {}
-//~^ ERROR `extern` fn uses type `&CStr`, which is not FFI-safe
+//~^ ERROR `extern` fn uses type `CStr`, which is not FFI-safe
 //~| HELP consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
 extern "C" fn rust_take_cstring(s: CString) {}
 //~^ ERROR `extern` fn uses type `CString`, which is not FFI-safe
diff --git a/tests/ui/lint/lint-ctypes-cstr.stderr b/tests/ui/lint/lint-ctypes-cstr.stderr
index da15b748f21..8957758d577 100644
--- a/tests/ui/lint/lint-ctypes-cstr.stderr
+++ b/tests/ui/lint/lint-ctypes-cstr.stderr
@@ -12,14 +12,14 @@ note: the lint level is defined here
 LL | #![deny(improper_ctypes, improper_ctypes_definitions)]
    |         ^^^^^^^^^^^^^^^
 
-error: `extern` block uses type `&CStr`, which is not FFI-safe
+error: `extern` block uses type `CStr`, which is not FFI-safe
   --> $DIR/lint-ctypes-cstr.rs:10:25
    |
 LL |     fn take_cstr_ref(s: &CStr);
    |                         ^^^^^ not FFI-safe
    |
    = help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: `CStr`/`CString` do not have a guaranteed layout
 
 error: `extern` block uses type `CString`, which is not FFI-safe
   --> $DIR/lint-ctypes-cstr.rs:13:24
@@ -36,7 +36,6 @@ error: `extern` block uses type `CString`, which is not FFI-safe
 LL |     fn take_cstring_ref(s: &CString);
    |                            ^^^^^^^^ not FFI-safe
    |
-   = note: this reference (`&CString`) is ABI-compatible with a C pointer, but `CString` itself does not have a C layout
    = help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
    = note: `CStr`/`CString` do not have a guaranteed layout
 
@@ -46,7 +45,6 @@ error: `extern` block uses type `CString`, which is not FFI-safe
 LL |     fn no_special_help_for_mut_cstring(s: *mut CString);
    |                                           ^^^^^^^^^^^^ not FFI-safe
    |
-   = note: this reference (`*mut CString`) is ABI-compatible with a C pointer, but `CString` itself does not have a C layout
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 
@@ -56,18 +54,17 @@ error: `extern` block uses type `CString`, which is not FFI-safe
 LL |     fn no_special_help_for_mut_cstring_ref(s: &mut CString);
    |                                               ^^^^^^^^^^^^ not FFI-safe
    |
-   = note: this reference (`&mut CString`) is ABI-compatible with a C pointer, but `CString` itself does not have a C layout
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 
-error: `extern` fn uses type `&CStr`, which is not FFI-safe
+error: `extern` fn uses type `CStr`, which is not FFI-safe
   --> $DIR/lint-ctypes-cstr.rs:29:37
    |
 LL | extern "C" fn rust_take_cstr_ref(s: &CStr) {}
    |                                     ^^^^^ not FFI-safe
    |
    = help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: `CStr`/`CString` do not have a guaranteed layout
 note: the lint level is defined here
   --> $DIR/lint-ctypes-cstr.rs:2:26
    |
diff --git a/tests/ui/lint/lint-ctypes-fn.rs b/tests/ui/lint/lint-ctypes-fn.rs
index e16ff9573fd..73820c86d1a 100644
--- a/tests/ui/lint/lint-ctypes-fn.rs
+++ b/tests/ui/lint/lint-ctypes-fn.rs
@@ -68,10 +68,10 @@ pub extern "C" fn ptr_unit(p: *const ()) { }
 pub extern "C" fn ptr_tuple(p: *const ((),)) { }
 
 pub extern "C" fn slice_type(p: &[u32]) { }
-//~^ ERROR: uses type `&[u32]`
+//~^ ERROR: uses type `[u32]`
 
 pub extern "C" fn str_type(p: &str) { }
-//~^ ERROR: uses type `&str`
+//~^ ERROR: uses type `str`
 
 pub extern "C" fn box_type(p: Box<u32>) { }
 
@@ -124,7 +124,7 @@ pub extern "C" fn transparent_i128(p: TransparentI128) { }
 //~^ ERROR: uses type `i128`
 
 pub extern "C" fn transparent_str(p: TransparentStr) { }
-//~^ ERROR: uses type `&str`
+//~^ ERROR: uses type `str`
 
 pub extern "C" fn transparent_fn(p: TransparentBadFn) { }
 
diff --git a/tests/ui/lint/lint-ctypes-fn.stderr b/tests/ui/lint/lint-ctypes-fn.stderr
index c86c02c8006..a62533a4be1 100644
--- a/tests/ui/lint/lint-ctypes-fn.stderr
+++ b/tests/ui/lint/lint-ctypes-fn.stderr
@@ -1,25 +1,25 @@
-error: `extern` fn uses type `&[u32]`, which is not FFI-safe
+error: `extern` fn uses type `[u32]`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:70:33
    |
 LL | pub extern "C" fn slice_type(p: &[u32]) { }
    |                                 ^^^^^^ not FFI-safe
    |
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = help: consider using a raw pointer instead
+   = note: slices have no C equivalent
 note: the lint level is defined here
   --> $DIR/lint-ctypes-fn.rs:2:9
    |
 LL | #![deny(improper_ctypes_definitions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: `extern` fn uses type `&str`, which is not FFI-safe
+error: `extern` fn uses type `str`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:73:31
    |
 LL | pub extern "C" fn str_type(p: &str) { }
    |                               ^^^^ not FFI-safe
    |
    = help: consider using `*const u8` and a length instead
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: string slices have no C equivalent
 
 error: `extern` fn uses type `Box<[u8]>`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:80:34
@@ -27,8 +27,7 @@ error: `extern` fn uses type `Box<[u8]>`, which is not FFI-safe
 LL | pub extern "C" fn boxed_slice(p: Box<[u8]>) { }
    |                                  ^^^^^^^^^ not FFI-safe
    |
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
-   = note: this box for an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: box cannot be represented as a single pointer
 
 error: `extern` fn uses type `Box<str>`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:83:35
@@ -36,8 +35,7 @@ error: `extern` fn uses type `Box<str>`, which is not FFI-safe
 LL | pub extern "C" fn boxed_string(p: Box<str>) { }
    |                                   ^^^^^^^^ not FFI-safe
    |
-   = help: consider using `*const u8` and a length instead
-   = note: this box for an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: box cannot be represented as a single pointer
 
 error: `extern` fn uses type `Box<dyn Trait>`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:86:34
@@ -45,7 +43,7 @@ error: `extern` fn uses type `Box<dyn Trait>`, which is not FFI-safe
 LL | pub extern "C" fn boxed_trait(p: Box<dyn Trait>) { }
    |                                  ^^^^^^^^^^^^^^ not FFI-safe
    |
-   = note: this box for an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: box cannot be represented as a single pointer
 
 error: `extern` fn uses type `char`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:89:32
@@ -151,14 +149,14 @@ LL | pub extern "C" fn transparent_i128(p: TransparentI128) { }
    |
    = note: 128-bit integers don't currently have a known stable ABI
 
-error: `extern` fn uses type `&str`, which is not FFI-safe
+error: `extern` fn uses type `str`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:126:38
    |
 LL | pub extern "C" fn transparent_str(p: TransparentStr) { }
    |                                      ^^^^^^^^^^^^^^ not FFI-safe
    |
    = help: consider using `*const u8` and a length instead
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: string slices have no C equivalent
 
 error: `extern` fn uses type `PhantomData<bool>`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:172:43
diff --git a/tests/ui/lint/lint-ctypes.rs b/tests/ui/lint/lint-ctypes.rs
index 8c516ab8428..dae07930aba 100644
--- a/tests/ui/lint/lint-ctypes.rs
+++ b/tests/ui/lint/lint-ctypes.rs
@@ -1,5 +1,4 @@
 #![feature(rustc_private)]
-#![feature(extern_types)]
 
 #![allow(private_interfaces)]
 #![deny(improper_ctypes)]
@@ -7,9 +6,7 @@
 use std::cell::UnsafeCell;
 use std::marker::PhantomData;
 use std::ffi::{c_int, c_uint};
-use std::fmt::Debug;
 
-unsafe extern "C" {type UnsizedOpaque;}
 trait Bar { }
 trait Mirror { type It: ?Sized; }
 impl<T: ?Sized> Mirror for T { type It = Self; }
@@ -23,7 +20,7 @@ pub type I32Pair = (i32, i32);
 #[repr(C)]
 pub struct ZeroSize;
 pub type RustFn = fn();
-pub type RustBoxRet = extern "C" fn() -> Box<u32>;
+pub type RustBadRet = extern "C" fn() -> Box<u32>;
 pub type CVoidRet = ();
 pub struct Foo;
 #[repr(transparent)]
@@ -31,7 +28,7 @@ pub struct TransparentI128(i128);
 #[repr(transparent)]
 pub struct TransparentStr(&'static str);
 #[repr(transparent)]
-pub struct TransparentBoxFn(RustBoxRet);
+pub struct TransparentBadFn(RustBadRet);
 #[repr(transparent)]
 pub struct TransparentInt(u32);
 #[repr(transparent)]
@@ -42,16 +39,6 @@ pub struct TransparentLifetime<'a>(*const u8, PhantomData<&'a ()>);
 pub struct TransparentUnit<U>(f32, PhantomData<U>);
 #[repr(transparent)]
 pub struct TransparentCustomZst(i32, ZeroSize);
-#[repr(C)]
-pub struct UnsizedStructBecauseForeign {
-    sized: u32,
-    unszd: UnsizedOpaque,
-}
-#[repr(C)]
-pub struct UnsizedStructBecauseDyn {
-    sized: u32,
-    unszd: dyn Debug,
-}
 
 #[repr(C)]
 pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
@@ -61,14 +48,15 @@ extern "C" {
     pub fn ptr_type2(size: *const Foo); //~ ERROR: uses type `Foo`
     pub fn ptr_unit(p: *const ());
     pub fn ptr_tuple(p: *const ((),)); //~ ERROR: uses type `((),)`
-    pub fn slice_type(p: &[u32]); //~ ERROR: uses type `&[u32]`
-    pub fn str_type(p: &str); //~ ERROR: uses type `&str`
-    pub fn box_type(p: Box<u32>);
+    pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]`
+    pub fn str_type(p: &str); //~ ERROR: uses type `str`
+    pub fn box_type(p: Box<u32>); //~ ERROR uses type `Box<u32>`
     pub fn opt_box_type(p: Option<Box<u32>>);
+    //~^ ERROR uses type `Option<Box<u32>>`
     pub fn char_type(p: char); //~ ERROR uses type `char`
     pub fn i128_type(p: i128); //~ ERROR uses type `i128`
     pub fn u128_type(p: u128); //~ ERROR uses type `u128`
-    pub fn trait_type(p: &dyn Bar); //~ ERROR uses type `&dyn Bar`
+    pub fn trait_type(p: &dyn Bar); //~ ERROR uses type `dyn Bar`
     pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)`
     pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)`
     pub fn zero_size(p: ZeroSize); //~ ERROR uses type `ZeroSize`
@@ -78,15 +66,12 @@ extern "C" {
         -> ::std::marker::PhantomData<bool>; //~ ERROR uses type `PhantomData<bool>`
     pub fn fn_type(p: RustFn); //~ ERROR uses type `fn()`
     pub fn fn_type2(p: fn()); //~ ERROR uses type `fn()`
-    pub fn fn_contained(p: RustBoxRet);
+    pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `Box<u32>`
     pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128`
-    pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `&str`
-    pub fn transparent_fn(p: TransparentBoxFn);
+    pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str`
+    pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `Box<u32>`
     pub fn raw_array(arr: [u8; 8]); //~ ERROR: uses type `[u8; 8]`
 
-    pub fn struct_unsized_ptr_no_metadata(p: &UnsizedStructBecauseForeign);
-    pub fn struct_unsized_ptr_has_metadata(p: &UnsizedStructBecauseDyn); //~ ERROR uses type `&UnsizedStructBecauseDyn`
-
     pub fn no_niche_a(a: Option<UnsafeCell<extern fn()>>);
     //~^ ERROR: uses type `Option<UnsafeCell<extern "C" fn()>>`
     pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
diff --git a/tests/ui/lint/lint-ctypes.stderr b/tests/ui/lint/lint-ctypes.stderr
index 8580a10b215..2c81c7b8e4b 100644
--- a/tests/ui/lint/lint-ctypes.stderr
+++ b/tests/ui/lint/lint-ctypes.stderr
@@ -1,68 +1,83 @@
 error: `extern` block uses type `Foo`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:60:28
+  --> $DIR/lint-ctypes.rs:47:28
    |
 LL |     pub fn ptr_type1(size: *const Foo);
    |                            ^^^^^^^^^^ not FFI-safe
    |
-   = note: this reference (`*const Foo`) is ABI-compatible with a C pointer, but `Foo` itself does not have a C layout
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 note: the type is defined here
-  --> $DIR/lint-ctypes.rs:28:1
+  --> $DIR/lint-ctypes.rs:25:1
    |
 LL | pub struct Foo;
    | ^^^^^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/lint-ctypes.rs:5:9
+  --> $DIR/lint-ctypes.rs:4:9
    |
 LL | #![deny(improper_ctypes)]
    |         ^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `Foo`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:61:28
+  --> $DIR/lint-ctypes.rs:48:28
    |
 LL |     pub fn ptr_type2(size: *const Foo);
    |                            ^^^^^^^^^^ not FFI-safe
    |
-   = note: this reference (`*const Foo`) is ABI-compatible with a C pointer, but `Foo` itself does not have a C layout
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 note: the type is defined here
-  --> $DIR/lint-ctypes.rs:28:1
+  --> $DIR/lint-ctypes.rs:25:1
    |
 LL | pub struct Foo;
    | ^^^^^^^^^^^^^^
 
 error: `extern` block uses type `((),)`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:63:25
+  --> $DIR/lint-ctypes.rs:50:25
    |
 LL |     pub fn ptr_tuple(p: *const ((),));
    |                         ^^^^^^^^^^^^ not FFI-safe
    |
-   = note: this reference (`*const ((),)`) is ABI-compatible with a C pointer, but `((),)` itself does not have a C layout
    = help: consider using a struct instead
    = note: tuples have unspecified layout
 
-error: `extern` block uses type `&[u32]`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:64:26
+error: `extern` block uses type `[u32]`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:51:26
    |
 LL |     pub fn slice_type(p: &[u32]);
    |                          ^^^^^^ not FFI-safe
    |
-   = help: consider using a raw pointer to the slice's first element (and a length) instead
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = help: consider using a raw pointer instead
+   = note: slices have no C equivalent
 
-error: `extern` block uses type `&str`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:65:24
+error: `extern` block uses type `str`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:52:24
    |
 LL |     pub fn str_type(p: &str);
    |                        ^^^^ not FFI-safe
    |
    = help: consider using `*const u8` and a length instead
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: string slices have no C equivalent
+
+error: `extern` block uses type `Box<u32>`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:53:24
+   |
+LL |     pub fn box_type(p: Box<u32>);
+   |                        ^^^^^^^^ not FFI-safe
+   |
+   = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
+   = note: this struct has unspecified layout
+
+error: `extern` block uses type `Option<Box<u32>>`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:54:28
+   |
+LL |     pub fn opt_box_type(p: Option<Box<u32>>);
+   |                            ^^^^^^^^^^^^^^^^ not FFI-safe
+   |
+   = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
+   = note: enum has no representation hint
 
 error: `extern` block uses type `char`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:68:25
+  --> $DIR/lint-ctypes.rs:56:25
    |
 LL |     pub fn char_type(p: char);
    |                         ^^^^ not FFI-safe
@@ -71,7 +86,7 @@ LL |     pub fn char_type(p: char);
    = note: the `char` type has no C equivalent
 
 error: `extern` block uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:69:25
+  --> $DIR/lint-ctypes.rs:57:25
    |
 LL |     pub fn i128_type(p: i128);
    |                         ^^^^ not FFI-safe
@@ -79,23 +94,23 @@ LL |     pub fn i128_type(p: i128);
    = note: 128-bit integers don't currently have a known stable ABI
 
 error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:70:25
+  --> $DIR/lint-ctypes.rs:58:25
    |
 LL |     pub fn u128_type(p: u128);
    |                         ^^^^ not FFI-safe
    |
    = note: 128-bit integers don't currently have a known stable ABI
 
-error: `extern` block uses type `&dyn Bar`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:71:26
+error: `extern` block uses type `dyn Bar`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:59:26
    |
 LL |     pub fn trait_type(p: &dyn Bar);
    |                          ^^^^^^^^ not FFI-safe
    |
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: trait objects have no C equivalent
 
 error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:72:26
+  --> $DIR/lint-ctypes.rs:60:26
    |
 LL |     pub fn tuple_type(p: (i32, i32));
    |                          ^^^^^^^^^^ not FFI-safe
@@ -104,7 +119,7 @@ LL |     pub fn tuple_type(p: (i32, i32));
    = note: tuples have unspecified layout
 
 error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:73:27
+  --> $DIR/lint-ctypes.rs:61:27
    |
 LL |     pub fn tuple_type2(p: I32Pair);
    |                           ^^^^^^^ not FFI-safe
@@ -113,7 +128,7 @@ LL |     pub fn tuple_type2(p: I32Pair);
    = note: tuples have unspecified layout
 
 error: `extern` block uses type `ZeroSize`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:74:25
+  --> $DIR/lint-ctypes.rs:62:25
    |
 LL |     pub fn zero_size(p: ZeroSize);
    |                         ^^^^^^^^ not FFI-safe
@@ -121,26 +136,26 @@ LL |     pub fn zero_size(p: ZeroSize);
    = help: consider adding a member to this struct
    = note: this struct has no fields
 note: the type is defined here
-  --> $DIR/lint-ctypes.rs:24:1
+  --> $DIR/lint-ctypes.rs:21:1
    |
 LL | pub struct ZeroSize;
    | ^^^^^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:75:33
+  --> $DIR/lint-ctypes.rs:63:33
    |
 LL |     pub fn zero_size_phantom(p: ZeroSizeWithPhantomData);
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
    |
    = note: composed only of `PhantomData`
 note: the type is defined here
-  --> $DIR/lint-ctypes.rs:57:1
+  --> $DIR/lint-ctypes.rs:44:1
    |
 LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `PhantomData<bool>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:78:12
+  --> $DIR/lint-ctypes.rs:66:12
    |
 LL |         -> ::std::marker::PhantomData<bool>;
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -148,7 +163,7 @@ LL |         -> ::std::marker::PhantomData<bool>;
    = note: composed only of `PhantomData`
 
 error: `extern` block uses type `fn()`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:79:23
+  --> $DIR/lint-ctypes.rs:67:23
    |
 LL |     pub fn fn_type(p: RustFn);
    |                       ^^^^^^ not FFI-safe
@@ -157,7 +172,7 @@ LL |     pub fn fn_type(p: RustFn);
    = note: this function pointer has Rust-specific calling convention
 
 error: `extern` block uses type `fn()`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:80:24
+  --> $DIR/lint-ctypes.rs:68:24
    |
 LL |     pub fn fn_type2(p: fn());
    |                        ^^^^ not FFI-safe
@@ -165,25 +180,43 @@ LL |     pub fn fn_type2(p: fn());
    = help: consider using an `extern fn(...) -> ...` function pointer instead
    = note: this function pointer has Rust-specific calling convention
 
+error: `extern` block uses type `Box<u32>`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:69:28
+   |
+LL |     pub fn fn_contained(p: RustBadRet);
+   |                            ^^^^^^^^^^ not FFI-safe
+   |
+   = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
+   = note: this struct has unspecified layout
+
 error: `extern` block uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:82:32
+  --> $DIR/lint-ctypes.rs:70:32
    |
 LL |     pub fn transparent_i128(p: TransparentI128);
    |                                ^^^^^^^^^^^^^^^ not FFI-safe
    |
    = note: 128-bit integers don't currently have a known stable ABI
 
-error: `extern` block uses type `&str`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:83:31
+error: `extern` block uses type `str`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:71:31
    |
 LL |     pub fn transparent_str(p: TransparentStr);
    |                               ^^^^^^^^^^^^^^ not FFI-safe
    |
    = help: consider using `*const u8` and a length instead
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
+   = note: string slices have no C equivalent
+
+error: `extern` block uses type `Box<u32>`, which is not FFI-safe
+  --> $DIR/lint-ctypes.rs:72:30
+   |
+LL |     pub fn transparent_fn(p: TransparentBadFn);
+   |                              ^^^^^^^^^^^^^^^^ not FFI-safe
+   |
+   = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
+   = note: this struct has unspecified layout
 
 error: `extern` block uses type `[u8; 8]`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:85:27
+  --> $DIR/lint-ctypes.rs:73:27
    |
 LL |     pub fn raw_array(arr: [u8; 8]);
    |                           ^^^^^^^ not FFI-safe
@@ -191,16 +224,8 @@ LL |     pub fn raw_array(arr: [u8; 8]);
    = help: consider passing a pointer to the array
    = note: passing raw arrays by value is not FFI-safe
 
-error: `extern` block uses type `&UnsizedStructBecauseDyn`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:88:47
-   |
-LL |     pub fn struct_unsized_ptr_has_metadata(p: &UnsizedStructBecauseDyn);
-   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
-
 error: `extern` block uses type `Option<UnsafeCell<extern "C" fn()>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:90:26
+  --> $DIR/lint-ctypes.rs:75:26
    |
 LL |     pub fn no_niche_a(a: Option<UnsafeCell<extern fn()>>);
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -209,7 +234,7 @@ LL |     pub fn no_niche_a(a: Option<UnsafeCell<extern fn()>>);
    = note: enum has no representation hint
 
 error: `extern` block uses type `Option<UnsafeCell<&i32>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:92:26
+  --> $DIR/lint-ctypes.rs:77:26
    |
 LL |     pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -218,7 +243,7 @@ LL |     pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
    = note: enum has no representation hint
 
 error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:95:34
+  --> $DIR/lint-ctypes.rs:80:34
    |
 LL |     pub static static_u128_type: u128;
    |                                  ^^^^ not FFI-safe
@@ -226,12 +251,12 @@ LL |     pub static static_u128_type: u128;
    = note: 128-bit integers don't currently have a known stable ABI
 
 error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:96:40
+  --> $DIR/lint-ctypes.rs:81:40
    |
 LL |     pub static static_u128_array_type: [u128; 16];
    |                                        ^^^^^^^^^^ not FFI-safe
    |
    = note: 128-bit integers don't currently have a known stable ABI
 
-error: aborting due to 24 previous errors
+error: aborting due to 27 previous errors
 
diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed b/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed
deleted file mode 100644
index be6ed053c6e..00000000000
--- a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed
+++ /dev/null
@@ -1,35 +0,0 @@
-//@ run-rustfix
-#![allow(dead_code)]
-
-enum E {
-    A,
-}
-
-struct S {
-    field1: i32, //~ ERROR default values on `struct` fields aren't supported
-    field2: E, //~ ERROR default values on `struct` fields aren't supported
-    field3: i32, //~ ERROR default values on `struct` fields aren't supported
-    field4: i32, //~ ERROR default values on `struct` fields aren't supported
-    field5: E, //~ ERROR default values on `struct` fields aren't supported
-    field6: E, //~ ERROR default values on `struct` fields aren't supported
-}
-
-struct S1 {
-    field1: i32, //~ ERROR expected `,`, or `}`, found `field2`
-    field2: E, //~ ERROR expected `,`, or `}`, found `field3`
-    field3: i32, //~ ERROR default values on `struct` fields aren't supported
-    field4: i32, //~ ERROR default values on `struct` fields aren't supported
-    field5: E, //~ ERROR default values on `struct` fields aren't supported
-    field6: E, //~ ERROR default values on `struct` fields aren't supported
-}
-
-struct S2 {
-    field1 : i32, //~ ERROR expected `:`, found `=`
-    field2: E, //~ ERROR expected `:`, found `;`
-}
-
-const fn foo(_: i32) -> E {
-    E::A
-}
-
-fn main() {}
diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs
index 7900d397a5d..bb9de98bddb 100644
--- a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs
+++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs
@@ -1,4 +1,3 @@
-//@ run-rustfix
 #![allow(dead_code)]
 
 enum E {
@@ -6,21 +5,21 @@ enum E {
 }
 
 struct S {
-    field1: i32 = 42, //~ ERROR default values on `struct` fields aren't supported
-    field2: E = E::A, //~ ERROR default values on `struct` fields aren't supported
-    field3: i32 = 1 + 2, //~ ERROR default values on `struct` fields aren't supported
-    field4: i32 = { 1 + 2 }, //~ ERROR default values on `struct` fields aren't supported
-    field5: E = foo(42), //~ ERROR default values on `struct` fields aren't supported
-    field6: E = { foo(42) }, //~ ERROR default values on `struct` fields aren't supported
+    field1: i32 = 42, //~ ERROR default values on fields are experimental
+    field2: E = E::A, //~ ERROR default values on fields are experimental
+    field3: i32 = 1 + 2, //~ ERROR default values on fields are experimental
+    field4: i32 = { 1 + 2 }, //~ ERROR default values on fields are experimental
+    field5: E = foo(42), //~ ERROR default values on fields are experimental
+    field6: E = { foo(42) }, //~ ERROR default values on fields are experimental
 }
 
 struct S1 {
     field1: i32 //~ ERROR expected `,`, or `}`, found `field2`
     field2: E //~ ERROR expected `,`, or `}`, found `field3`
-    field3: i32 = 1 + 2, //~ ERROR default values on `struct` fields aren't supported
-    field4: i32 = { 1 + 2 }, //~ ERROR default values on `struct` fields aren't supported
-    field5: E = foo(42), //~ ERROR default values on `struct` fields aren't supported
-    field6: E = { foo(42) }, //~ ERROR default values on `struct` fields aren't supported
+    field3: i32 = 1 + 2, //~ ERROR default values on fields are experimental
+    field4: i32 = { 1 + 2 }, //~ ERROR default values on fields are experimental
+    field5: E = foo(42), //~ ERROR default values on fields are experimental
+    field6: E = { foo(42) }, //~ ERROR default values on fields are experimental
 }
 
 struct S2 {
diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.stderr b/tests/ui/parser/struct-default-values-and-missing-field-separator.stderr
index 1fb57ab11f9..fdd9f0d6dce 100644
--- a/tests/ui/parser/struct-default-values-and-missing-field-separator.stderr
+++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.stderr
@@ -1,152 +1,133 @@
-error: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:9:16
+error: expected `,`, or `}`, found `field2`
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:17:16
    |
-LL |     field1: i32 = 42,
-   |                ^^^^^
+LL |     field1: i32
+   |                ^ help: try adding a comma: `,`
+
+error: expected `,`, or `}`, found `field3`
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:18:14
+   |
+LL |     field2: E
+   |              ^ help: try adding a comma: `,`
+
+error: expected `:`, found `=`
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:26:12
+   |
+LL |     field1 = i32,
+   |            ^
+   |            |
+   |            expected `:`
+   |            help: field names and their types are separated with `:`
+
+error: expected `:`, found `;`
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:27:11
    |
-help: remove this unsupported default value
+LL |     field2; E,
+   |           ^
+   |           |
+   |           expected `:`
+   |           help: field names and their types are separated with `:`
+
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:8:16
    |
-LL -     field1: i32 = 42,
-LL +     field1: i32,
+LL |     field1: i32 = 42,
+   |                ^^^^^
    |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:10:14
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:9:14
    |
 LL |     field2: E = E::A,
    |              ^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field2: E = E::A,
-LL +     field2: E,
-   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:11:16
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:10:16
    |
 LL |     field3: i32 = 1 + 2,
    |                ^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field3: i32 = 1 + 2,
-LL +     field3: i32,
-   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:12:16
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:11:16
    |
 LL |     field4: i32 = { 1 + 2 },
    |                ^^^^^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field4: i32 = { 1 + 2 },
-LL +     field4: i32,
-   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:13:14
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:12:14
    |
 LL |     field5: E = foo(42),
    |              ^^^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field5: E = foo(42),
-LL +     field5: E,
-   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:14:14
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:13:14
    |
 LL |     field6: E = { foo(42) },
    |              ^^^^^^^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field6: E = { foo(42) },
-LL +     field6: E,
-   |
-
-error: expected `,`, or `}`, found `field2`
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:18:16
-   |
-LL |     field1: i32
-   |                ^ help: try adding a comma: `,`
-
-error: expected `,`, or `}`, found `field3`
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:19:14
-   |
-LL |     field2: E
-   |              ^ help: try adding a comma: `,`
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:20:16
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:19:16
    |
 LL |     field3: i32 = 1 + 2,
    |                ^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field3: i32 = 1 + 2,
-LL +     field3: i32,
-   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:21:16
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:20:16
    |
 LL |     field4: i32 = { 1 + 2 },
    |                ^^^^^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field4: i32 = { 1 + 2 },
-LL +     field4: i32,
-   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:22:14
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:21:14
    |
 LL |     field5: E = foo(42),
    |              ^^^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field5: E = foo(42),
-LL +     field5: E,
-   |
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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: default values on `struct` fields aren't supported
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:23:14
+error[E0658]: default values on fields are experimental
+  --> $DIR/struct-default-values-and-missing-field-separator.rs:22:14
    |
 LL |     field6: E = { foo(42) },
    |              ^^^^^^^^^^^^^^
    |
-help: remove this unsupported default value
-   |
-LL -     field6: E = { foo(42) },
-LL +     field6: E,
-   |
-
-error: expected `:`, found `=`
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:27:12
-   |
-LL |     field1 = i32,
-   |            ^
-   |            |
-   |            expected `:`
-   |            help: field names and their types are separated with `:`
-
-error: expected `:`, found `;`
-  --> $DIR/struct-default-values-and-missing-field-separator.rs:28:11
-   |
-LL |     field2; E,
-   |           ^
-   |           |
-   |           expected `:`
-   |           help: field names and their types are separated with `:`
+   = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
+   = help: add `#![feature(default_field_values)]` 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 14 previous errors
 
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/range/issue-54505-no-std.rs b/tests/ui/range/issue-54505-no-std.rs
index a1595685372..0c913f766b7 100644
--- a/tests/ui/range/issue-54505-no-std.rs
+++ b/tests/ui/range/issue-54505-no-std.rs
@@ -38,6 +38,7 @@ fn main() {
 
     take_range(..);
     //~^ ERROR mismatched types [E0308]
+    //~| HELP you might have meant
     //~| HELP consider borrowing here
     //~| SUGGESTION &(
 
diff --git a/tests/ui/range/issue-54505-no-std.stderr b/tests/ui/range/issue-54505-no-std.stderr
index f15a0ae6138..2aa1d584046 100644
--- a/tests/ui/range/issue-54505-no-std.stderr
+++ b/tests/ui/range/issue-54505-no-std.stderr
@@ -53,13 +53,18 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals when `#![feature(default_field_values)]` is enabled; it is instead interpreted as a `std::ops::RangeFull` literal
+  --> $DIR/issue-54505-no-std.rs:39:16
+   |
+LL |     take_range(..);
+   |                ^^
 help: consider borrowing here
    |
 LL |     take_range(&(..));
    |                ++  +
 
 error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:44:16
+  --> $DIR/issue-54505-no-std.rs:45:16
    |
 LL |     take_range(0..=1);
    |     ---------- ^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
@@ -79,7 +84,7 @@ LL |     take_range(&(0..=1));
    |                ++     +
 
 error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:49:16
+  --> $DIR/issue-54505-no-std.rs:50:16
    |
 LL |     take_range(..5);
    |     ---------- ^^^ expected `&_`, found `RangeTo<{integer}>`
@@ -99,7 +104,7 @@ LL |     take_range(&(..5));
    |                ++   +
 
 error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:54:16
+  --> $DIR/issue-54505-no-std.rs:55:16
    |
 LL |     take_range(..=42);
    |     ---------- ^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
diff --git a/tests/ui/range/issue-54505.fixed b/tests/ui/range/issue-54505.fixed
index 054d3c2cf5e..08a2682140a 100644
--- a/tests/ui/range/issue-54505.fixed
+++ b/tests/ui/range/issue-54505.fixed
@@ -23,6 +23,7 @@ fn main() {
 
     take_range(&(..));
     //~^ ERROR mismatched types [E0308]
+    //~| HELP you might have meant
     //~| HELP consider borrowing here
     //~| SUGGESTION &(
 
diff --git a/tests/ui/range/issue-54505.rs b/tests/ui/range/issue-54505.rs
index f5cec831760..0a9d7083e4f 100644
--- a/tests/ui/range/issue-54505.rs
+++ b/tests/ui/range/issue-54505.rs
@@ -23,6 +23,7 @@ fn main() {
 
     take_range(..);
     //~^ ERROR mismatched types [E0308]
+    //~| HELP you might have meant
     //~| HELP consider borrowing here
     //~| SUGGESTION &(
 
diff --git a/tests/ui/range/issue-54505.stderr b/tests/ui/range/issue-54505.stderr
index 0e959fc05e2..291e097e865 100644
--- a/tests/ui/range/issue-54505.stderr
+++ b/tests/ui/range/issue-54505.stderr
@@ -53,13 +53,18 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals when `#![feature(default_field_values)]` is enabled; it is instead interpreted as a `std::ops::RangeFull` literal
+  --> $DIR/issue-54505.rs:24:16
+   |
+LL |     take_range(..);
+   |                ^^
 help: consider borrowing here
    |
 LL |     take_range(&(..));
    |                ++  +
 
 error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:29:16
+  --> $DIR/issue-54505.rs:30:16
    |
 LL |     take_range(0..=1);
    |     ---------- ^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
@@ -79,7 +84,7 @@ LL |     take_range(&(0..=1));
    |                ++     +
 
 error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:34:16
+  --> $DIR/issue-54505.rs:35:16
    |
 LL |     take_range(..5);
    |     ---------- ^^^ expected `&_`, found `RangeTo<{integer}>`
@@ -99,7 +104,7 @@ LL |     take_range(&(..5));
    |                ++   +
 
 error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:39:16
+  --> $DIR/issue-54505.rs:40:16
    |
 LL |     take_range(..=42);
    |     ---------- ^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
diff --git a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.default.stderr b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.default.stderr
index c7e9df10d41..fbb9ede8aa1 100644
--- a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.default.stderr
+++ b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.default.stderr
@@ -29,20 +29,6 @@ LL |     const _: u32 = T::C;
    |
    = note: a `const` is a separate item from the item that contains it
 
-note: erroneous constant encountered
-  --> $DIR/generic-params-from-outer-item-in-const-item.rs:22:9
-   |
-LL |         I
-   |         ^
-
-note: erroneous constant encountered
-  --> $DIR/generic-params-from-outer-item-in-const-item.rs:22:9
-   |
-LL |         I
-   |         ^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
 error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.generic_const_items.stderr b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.generic_const_items.stderr
index 64c436d3ceb..60aa94038c3 100644
--- a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.generic_const_items.stderr
+++ b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.generic_const_items.stderr
@@ -35,20 +35,6 @@ LL |     const _: u32 = T::C;
    |
    = note: a `const` is a separate item from the item that contains it
 
-note: erroneous constant encountered
-  --> $DIR/generic-params-from-outer-item-in-const-item.rs:22:9
-   |
-LL |         I
-   |         ^
-
-note: erroneous constant encountered
-  --> $DIR/generic-params-from-outer-item-in-const-item.rs:22:9
-   |
-LL |         I
-   |         ^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
 error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/resolve/issue-50599.stderr b/tests/ui/resolve/issue-50599.stderr
index 427dc9f2049..24fb3d580b8 100644
--- a/tests/ui/resolve/issue-50599.stderr
+++ b/tests/ui/resolve/issue-50599.stderr
@@ -20,12 +20,6 @@ LL -     const M: usize = (f64::from(N) * std::f64::LOG10_2) as usize;
 LL +     const M: usize = (f64::from(N) * LOG10_2) as usize;
    |
 
-note: erroneous constant encountered
-  --> $DIR/issue-50599.rs:4:29
-   |
-LL |     let mut digits = [0u32; M];
-   |                             ^
-
 error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr
index eab2604d4c0..606f808f093 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr
@@ -6,11 +6,5 @@ LL |     !let y = 42;
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 
-note: erroneous constant encountered
-  --> $DIR/avoid-invalid-mir.rs:11:13
-   |
-LL |     x: [(); N]
-   |             ^
-
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/self/arbitrary-self-from-method-substs-ice.stderr b/tests/ui/self/arbitrary-self-from-method-substs-ice.stderr
index e4991823d28..cf4c219215e 100644
--- a/tests/ui/self/arbitrary-self-from-method-substs-ice.stderr
+++ b/tests/ui/self/arbitrary-self-from-method-substs-ice.stderr
@@ -17,12 +17,6 @@ LL |     const fn get<R: Deref<Target = Self>>(self: R) -> u32 {
 LL |     }
    |     - value is dropped here
 
-note: erroneous constant encountered
-  --> $DIR/arbitrary-self-from-method-substs-ice.rs:24:5
-   |
-LL |     FOO;
-   |     ^^^
-
 error[E0801]: invalid generic `self` parameter type: `R`
   --> $DIR/arbitrary-self-from-method-substs-ice.rs:10:49
    |
diff --git a/tests/ui/stats/input-stats.stderr b/tests/ui/stats/input-stats.stderr
index 2adbcfab612..e3bc68a2134 100644
--- a/tests/ui/stats/input-stats.stderr
+++ b/tests/ui/stats/input-stats.stderr
@@ -20,8 +20,8 @@ ast-stats-1 Stmt                     160 ( 2.4%)             5            32
 ast-stats-1 - Let                       32 ( 0.5%)             1
 ast-stats-1 - MacCall                   32 ( 0.5%)             1
 ast-stats-1 - Expr                      96 ( 1.4%)             3
-ast-stats-1 FieldDef                 176 ( 2.6%)             2            88
 ast-stats-1 Block                    192 ( 2.9%)             6            32
+ast-stats-1 FieldDef                 208 ( 3.1%)             2           104
 ast-stats-1 Variant                  208 ( 3.1%)             2           104
 ast-stats-1 AssocItem                352 ( 5.3%)             4            88
 ast-stats-1 - Type                     176 ( 2.6%)             2
@@ -29,7 +29,7 @@ ast-stats-1 - Fn                       176 ( 2.6%)             2
 ast-stats-1 GenericBound             352 ( 5.3%)             4            88
 ast-stats-1 - Trait                    352 ( 5.3%)             4
 ast-stats-1 GenericParam             480 ( 7.2%)             5            96
-ast-stats-1 Pat                      504 ( 7.6%)             7            72
+ast-stats-1 Pat                      504 ( 7.5%)             7            72
 ast-stats-1 - Struct                    72 ( 1.1%)             1
 ast-stats-1 - Wild                      72 ( 1.1%)             1
 ast-stats-1 - Ident                    360 ( 5.4%)             5
@@ -39,13 +39,13 @@ ast-stats-1 - Match                     72 ( 1.1%)             1
 ast-stats-1 - Struct                    72 ( 1.1%)             1
 ast-stats-1 - Lit                      144 ( 2.2%)             2
 ast-stats-1 - Block                    216 ( 3.2%)             3
-ast-stats-1 PathSegment              744 (11.2%)            31            24
+ast-stats-1 PathSegment              744 (11.1%)            31            24
 ast-stats-1 Ty                       896 (13.4%)            14            64
 ast-stats-1 - Ref                       64 ( 1.0%)             1
 ast-stats-1 - Ptr                       64 ( 1.0%)             1
 ast-stats-1 - ImplicitSelf             128 ( 1.9%)             2
 ast-stats-1 - Path                     640 ( 9.6%)            10
-ast-stats-1 Item                   1_224 (18.4%)             9           136
+ast-stats-1 Item                   1_224 (18.3%)             9           136
 ast-stats-1 - ForeignMod               136 ( 2.0%)             1
 ast-stats-1 - Trait                    136 ( 2.0%)             1
 ast-stats-1 - Impl                     136 ( 2.0%)             1
@@ -53,7 +53,7 @@ ast-stats-1 - Enum                     136 ( 2.0%)             1
 ast-stats-1 - Fn                       272 ( 4.1%)             2
 ast-stats-1 - Use                      408 ( 6.1%)             3
 ast-stats-1 ----------------------------------------------------------------
-ast-stats-1 Total                  6_664                   116
+ast-stats-1 Total                  6_696                   116
 ast-stats-1
 ast-stats-2 POST EXPANSION AST STATS
 ast-stats-2 Name                Accumulated Size         Count     Item Size
@@ -70,7 +70,7 @@ ast-stats-2 - Fn                        88 ( 1.2%)             1
 ast-stats-2 Arm                       96 ( 1.3%)             2            48
 ast-stats-2 FnDecl                   120 ( 1.6%)             5            24
 ast-stats-2 InlineAsm                120 ( 1.6%)             1           120
-ast-stats-2 Attribute                128 ( 1.8%)             4            32
+ast-stats-2 Attribute                128 ( 1.7%)             4            32
 ast-stats-2 - DocComment                32 ( 0.4%)             1
 ast-stats-2 - Normal                    96 ( 1.3%)             3
 ast-stats-2 Param                    160 ( 2.2%)             4            40
@@ -78,33 +78,33 @@ ast-stats-2 Stmt                     160 ( 2.2%)             5            32
 ast-stats-2 - Let                       32 ( 0.4%)             1
 ast-stats-2 - Semi                      32 ( 0.4%)             1
 ast-stats-2 - Expr                      96 ( 1.3%)             3
-ast-stats-2 FieldDef                 176 ( 2.4%)             2            88
 ast-stats-2 Block                    192 ( 2.6%)             6            32
+ast-stats-2 FieldDef                 208 ( 2.8%)             2           104
 ast-stats-2 Variant                  208 ( 2.8%)             2           104
 ast-stats-2 AssocItem                352 ( 4.8%)             4            88
 ast-stats-2 - Type                     176 ( 2.4%)             2
 ast-stats-2 - Fn                       176 ( 2.4%)             2
 ast-stats-2 GenericBound             352 ( 4.8%)             4            88
 ast-stats-2 - Trait                    352 ( 4.8%)             4
-ast-stats-2 GenericParam             480 ( 6.6%)             5            96
+ast-stats-2 GenericParam             480 ( 6.5%)             5            96
 ast-stats-2 Pat                      504 ( 6.9%)             7            72
 ast-stats-2 - Struct                    72 ( 1.0%)             1
 ast-stats-2 - Wild                      72 ( 1.0%)             1
 ast-stats-2 - Ident                    360 ( 4.9%)             5
-ast-stats-2 Expr                     648 ( 8.9%)             9            72
+ast-stats-2 Expr                     648 ( 8.8%)             9            72
 ast-stats-2 - Path                      72 ( 1.0%)             1
 ast-stats-2 - Match                     72 ( 1.0%)             1
 ast-stats-2 - Struct                    72 ( 1.0%)             1
 ast-stats-2 - InlineAsm                 72 ( 1.0%)             1
 ast-stats-2 - Lit                      144 ( 2.0%)             2
-ast-stats-2 - Block                    216 ( 3.0%)             3
+ast-stats-2 - Block                    216 ( 2.9%)             3
 ast-stats-2 PathSegment              864 (11.8%)            36            24
-ast-stats-2 Ty                       896 (12.3%)            14            64
+ast-stats-2 Ty                       896 (12.2%)            14            64
 ast-stats-2 - Ref                       64 ( 0.9%)             1
 ast-stats-2 - Ptr                       64 ( 0.9%)             1
-ast-stats-2 - ImplicitSelf             128 ( 1.8%)             2
-ast-stats-2 - Path                     640 ( 8.8%)            10
-ast-stats-2 Item                   1_496 (20.5%)            11           136
+ast-stats-2 - ImplicitSelf             128 ( 1.7%)             2
+ast-stats-2 - Path                     640 ( 8.7%)            10
+ast-stats-2 Item                   1_496 (20.4%)            11           136
 ast-stats-2 - Enum                     136 ( 1.9%)             1
 ast-stats-2 - Trait                    136 ( 1.9%)             1
 ast-stats-2 - Impl                     136 ( 1.9%)             1
@@ -113,7 +113,7 @@ ast-stats-2 - ForeignMod               136 ( 1.9%)             1
 ast-stats-2 - Fn                       272 ( 3.7%)             2
 ast-stats-2 - Use                      544 ( 7.4%)             4
 ast-stats-2 ----------------------------------------------------------------
-ast-stats-2 Total                  7_312                   127
+ast-stats-2 Total                  7_344                   127
 ast-stats-2
 hir-stats HIR STATS
 hir-stats Name                Accumulated Size         Count     Item Size
@@ -138,9 +138,9 @@ hir-stats Stmt                      96 ( 1.1%)             3            32
 hir-stats - Let                       32 ( 0.4%)             1
 hir-stats - Semi                      32 ( 0.4%)             1
 hir-stats - Expr                      32 ( 0.4%)             1
-hir-stats FieldDef                 112 ( 1.3%)             2            56
 hir-stats FnDecl                   120 ( 1.3%)             3            40
 hir-stats Attribute                128 ( 1.4%)             4            32
+hir-stats FieldDef                 128 ( 1.4%)             2            64
 hir-stats GenericArgs              144 ( 1.6%)             3            48
 hir-stats Variant                  144 ( 1.6%)             2            72
 hir-stats GenericBound             256 ( 2.9%)             4            64
@@ -163,7 +163,7 @@ hir-stats - Struct                    64 ( 0.7%)             1
 hir-stats - InlineAsm                 64 ( 0.7%)             1
 hir-stats - Lit                      128 ( 1.4%)             2
 hir-stats - Block                    384 ( 4.3%)             6
-hir-stats Item                     968 (10.9%)            11            88
+hir-stats Item                     968 (10.8%)            11            88
 hir-stats - Enum                      88 ( 1.0%)             1
 hir-stats - Trait                     88 ( 1.0%)             1
 hir-stats - Impl                      88 ( 1.0%)             1
@@ -174,5 +174,5 @@ hir-stats - Use                      352 ( 3.9%)             4
 hir-stats Path                   1_240 (13.9%)            31            40
 hir-stats PathSegment            1_920 (21.5%)            40            48
 hir-stats ----------------------------------------------------------------
-hir-stats Total                  8_920                   180
+hir-stats Total                  8_936                   180
 hir-stats
diff --git a/tests/ui/structs/auxiliary/struct_field_default.rs b/tests/ui/structs/auxiliary/struct_field_default.rs
new file mode 100644
index 00000000000..b315df5dba2
--- /dev/null
+++ b/tests/ui/structs/auxiliary/struct_field_default.rs
@@ -0,0 +1,5 @@
+#![feature(default_field_values)]
+
+pub struct A {
+    pub a: isize = 42,
+}
diff --git a/tests/ui/structs/default-field-values-failures.rs b/tests/ui/structs/default-field-values-failures.rs
new file mode 100644
index 00000000000..0ac071d91d6
--- /dev/null
+++ b/tests/ui/structs/default-field-values-failures.rs
@@ -0,0 +1,64 @@
+#![feature(default_field_values)]
+
+#[derive(Debug)]
+pub struct S;
+
+#[derive(Debug, Default)]
+pub struct Foo {
+    pub bar: S = S,
+    pub baz: i32 = 42 + 3,
+}
+
+#[derive(Debug, Default)]
+pub struct Bar {
+    pub bar: S, //~ ERROR the trait bound `S: Default` is not satisfied
+    pub baz: i32 = 42 + 3,
+}
+
+#[derive(Default)]
+pub struct Qux<const C: i32> {
+    bar: S = Self::S, //~ ERROR generic `Self` types are currently not permitted in anonymous constants
+    baz: i32 = foo(),
+    bat: i32 = <Qux<{ C }> as T>::K, //~ ERROR generic parameters may not be used in const operations
+    bay: i32 = C,
+}
+
+pub struct Rak(i32 = 42); //~ ERROR default fields are not supported in tuple structs
+
+impl<const C: i32> Qux<C> {
+    const S: S = S;
+}
+
+trait T {
+    const K: i32;
+}
+
+impl<const C: i32> T for Qux<C> {
+    const K: i32 = 2;
+}
+
+const fn foo() -> i32 {
+    42
+}
+
+#[derive(Debug, Default)]
+enum E {
+    #[default]
+    Variant {} //~ ERROR the `#[default]` attribute may only be used on unit enum variants
+}
+
+fn main () {
+    let _ = Foo { .. }; // ok
+    let _ = Foo::default(); // ok
+    let _ = Bar { .. }; //~ ERROR mandatory field
+    let _ = Bar::default(); // silenced
+    let _ = Bar { bar: S, .. }; // ok
+    let _ = Qux::<4> { .. };
+    let _ = Rak(..); //~ ERROR E0308
+    //~^ you might have meant to use `..` to skip providing
+    let _ = Rak(0, ..); //~ ERROR E0061
+    //~^ you might have meant to use `..` to skip providing
+    let _ = Rak(.., 0); //~ ERROR E0061
+    //~^ you might have meant to use `..` to skip providing
+    let _ = Rak { .. }; // ok
+}
diff --git a/tests/ui/structs/default-field-values-failures.stderr b/tests/ui/structs/default-field-values-failures.stderr
new file mode 100644
index 00000000000..5b9d2df5a5d
--- /dev/null
+++ b/tests/ui/structs/default-field-values-failures.stderr
@@ -0,0 +1,118 @@
+error: the `#[default]` attribute may only be used on unit enum variants or variants where every field has a default value
+  --> $DIR/default-field-values-failures.rs:47:5
+   |
+LL |     Variant {}
+   |     ^^^^^^^
+   |
+   = help: consider a manual implementation of `Default`
+
+error: generic parameters may not be used in const operations
+  --> $DIR/default-field-values-failures.rs:22:23
+   |
+LL |     bat: i32 = <Qux<{ C }> as T>::K,
+   |                       ^ cannot perform const operation using `C`
+   |
+   = help: const parameters may only be used as standalone arguments, i.e. `C`
+   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
+
+error: default fields are not supported in tuple structs
+  --> $DIR/default-field-values-failures.rs:26:22
+   |
+LL | pub struct Rak(i32 = 42);
+   |                      ^^ default fields are only supported on structs
+
+error: generic `Self` types are currently not permitted in anonymous constants
+  --> $DIR/default-field-values-failures.rs:20:14
+   |
+LL |     bar: S = Self::S,
+   |              ^^^^
+
+error[E0277]: the trait bound `S: Default` is not satisfied
+  --> $DIR/default-field-values-failures.rs:14:5
+   |
+LL | #[derive(Debug, Default)]
+   |                 ------- in this derive macro expansion
+LL | pub struct Bar {
+LL |     pub bar: S,
+   |     ^^^^^^^^^^ the trait `Default` is not implemented for `S`
+   |
+   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider annotating `S` with `#[derive(Default)]`
+   |
+LL + #[derive(Default)]
+LL | pub struct S;
+   |
+
+error: missing mandatory field `bar`
+  --> $DIR/default-field-values-failures.rs:53:21
+   |
+LL |     let _ = Bar { .. };
+   |                     ^
+
+error[E0308]: mismatched types
+  --> $DIR/default-field-values-failures.rs:57:17
+   |
+LL |     let _ = Rak(..);
+   |             --- ^^ expected `i32`, found `RangeFull`
+   |             |
+   |             arguments to this struct are incorrect
+   |
+note: tuple struct defined here
+  --> $DIR/default-field-values-failures.rs:26:12
+   |
+LL | pub struct Rak(i32 = 42);
+   |            ^^^
+help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals; it is instead interpreted as a `std::ops::RangeFull` literal
+  --> $DIR/default-field-values-failures.rs:57:17
+   |
+LL |     let _ = Rak(..);
+   |                 ^^
+
+error[E0061]: this struct takes 1 argument but 2 arguments were supplied
+  --> $DIR/default-field-values-failures.rs:59:13
+   |
+LL |     let _ = Rak(0, ..);
+   |             ^^^    -- unexpected argument #2 of type `RangeFull`
+   |
+help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals; it is instead interpreted as a `std::ops::RangeFull` literal
+  --> $DIR/default-field-values-failures.rs:59:20
+   |
+LL |     let _ = Rak(0, ..);
+   |                    ^^
+note: tuple struct defined here
+  --> $DIR/default-field-values-failures.rs:26:12
+   |
+LL | pub struct Rak(i32 = 42);
+   |            ^^^
+help: remove the extra argument
+   |
+LL -     let _ = Rak(0, ..);
+LL +     let _ = Rak(0);
+   |
+
+error[E0061]: this struct takes 1 argument but 2 arguments were supplied
+  --> $DIR/default-field-values-failures.rs:61:13
+   |
+LL |     let _ = Rak(.., 0);
+   |             ^^^ -- unexpected argument #1 of type `RangeFull`
+   |
+help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals; it is instead interpreted as a `std::ops::RangeFull` literal
+  --> $DIR/default-field-values-failures.rs:61:17
+   |
+LL |     let _ = Rak(.., 0);
+   |                 ^^
+note: tuple struct defined here
+  --> $DIR/default-field-values-failures.rs:26:12
+   |
+LL | pub struct Rak(i32 = 42);
+   |            ^^^
+help: remove the extra argument
+   |
+LL -     let _ = Rak(.., 0);
+LL +     let _ = Rak(0);
+   |
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0061, E0277, E0308.
+For more information about an error, try `rustc --explain E0061`.
diff --git a/tests/ui/structs/default-field-values-invalid-const.rs b/tests/ui/structs/default-field-values-invalid-const.rs
new file mode 100644
index 00000000000..203a712868b
--- /dev/null
+++ b/tests/ui/structs/default-field-values-invalid-const.rs
@@ -0,0 +1,16 @@
+#![feature(default_field_values, generic_const_exprs)]
+#![allow(incomplete_features)]
+
+pub struct Bat {
+    pub bax: u8 = panic!("asdf"),
+    //~^ ERROR evaluation of constant value failed
+}
+
+pub struct Baz<const C: u8> {
+    pub bax: u8 = 130 + C, // ok
+    pub bat: u8 = 130 + 130,
+    //~^ ERROR evaluation of `Baz::<C>::bat::{constant#0}` failed
+    pub bay: u8 = 1, // ok
+}
+
+fn main() {}
diff --git a/tests/ui/structs/default-field-values-invalid-const.stderr b/tests/ui/structs/default-field-values-invalid-const.stderr
new file mode 100644
index 00000000000..47f25a1f38e
--- /dev/null
+++ b/tests/ui/structs/default-field-values-invalid-const.stderr
@@ -0,0 +1,17 @@
+error[E0080]: evaluation of constant value failed
+  --> $DIR/default-field-values-invalid-const.rs:5:19
+   |
+LL |     pub bax: u8 = panic!("asdf"),
+   |                   ^^^^^^^^^^^^^^ the evaluated program panicked at 'asdf', $DIR/default-field-values-invalid-const.rs:5:19
+   |
+   = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0080]: evaluation of `Baz::<C>::bat::{constant#0}` failed
+  --> $DIR/default-field-values-invalid-const.rs:11:19
+   |
+LL |     pub bat: u8 = 130 + 130,
+   |                   ^^^^^^^^^ attempt to compute `130_u8 + 130_u8`, which would overflow
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/structs/default-field-values-support.rs b/tests/ui/structs/default-field-values-support.rs
new file mode 100644
index 00000000000..da0379af94b
--- /dev/null
+++ b/tests/ui/structs/default-field-values-support.rs
@@ -0,0 +1,74 @@
+//@ run-pass
+//@ aux-build:struct_field_default.rs
+#![feature(default_field_values, generic_const_exprs)]
+#![allow(unused_variables, dead_code, incomplete_features)]
+
+extern crate struct_field_default as xc;
+
+pub struct S;
+
+#[derive(Default)]
+pub struct Foo {
+    pub bar: S = S,
+    pub baz: i32 = 42 + 3,
+}
+
+#[derive(Default)]
+pub enum Bar {
+    #[default]
+    Foo {
+        bar: S = S,
+        baz: i32 = 42 + 3,
+    }
+}
+
+#[derive(Default)]
+pub struct Qux<A, const C: i32> {
+    bar: S = Qux::<A, C>::S,
+    baz: i32 = foo(),
+    bat: i32 = <Qux<A, C> as T>::K,
+    baq: i32 = Self::K,
+    bay: i32 = C,
+    bak: Vec<A> = Vec::new(),
+}
+
+impl<A, const C: i32> Qux<A, C> {
+    const S: S = S;
+}
+
+trait T {
+    const K: i32;
+}
+
+impl<A, const C: i32> T for Qux<A, C> {
+    const K: i32 = 2;
+}
+
+const fn foo() -> i32 {
+    42
+}
+
+fn main () {
+    let x = Foo { .. };
+    let y = Foo::default();
+    let z = Foo { baz: 1, .. };
+
+    assert_eq!(45, x.baz);
+    assert_eq!(45, y.baz);
+    assert_eq!(1, z.baz);
+
+    let x = Bar::Foo { .. };
+    let y = Bar::default();
+    let z = Bar::Foo { baz: 1, .. };
+
+    assert!(matches!(Bar::Foo { bar: S, baz: 45 }, x));
+    assert!(matches!(Bar::Foo { bar: S, baz: 45 }, y));
+    assert!(matches!(Bar::Foo { bar: S, baz: 1 }, z));
+
+    let x = Qux::<i32, 4> { .. };
+    assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, baq: 2, bay: 4, .. }, x));
+    assert!(x.bak.is_empty());
+
+    let x = xc::A { .. };
+    assert!(matches!(xc::A { a: 42 }, x));
+}
diff --git a/tests/ui/thir-print/thir-tree-match.stdout b/tests/ui/thir-print/thir-tree-match.stdout
index d56f15fb221..916f296ccfc 100644
--- a/tests/ui/thir-print/thir-tree-match.stdout
+++ b/tests/ui/thir-print/thir-tree-match.stdout
@@ -92,7 +92,7 @@ body:
                                                                                         adt_def: 
                                                                                             AdtDef {
                                                                                                 did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
-                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])), safety: Safe }], tainted: None, flags:  }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], tainted: None, flags:  }]
+                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])), safety: Safe, value: None }], tainted: None, flags:  }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], tainted: None, flags:  }]
                                                                                                 flags: IS_ENUM
                                                                                                 repr: ReprOptions { int: None, align: None, pack: None, flags: , field_shuffle_seed: 3477539199540094892 }
                                                                                         args: []
@@ -154,7 +154,7 @@ body:
                                                                                         adt_def: 
                                                                                             AdtDef {
                                                                                                 did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
-                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])), safety: Safe }], tainted: None, flags:  }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], tainted: None, flags:  }]
+                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])), safety: Safe, value: None }], tainted: None, flags:  }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], tainted: None, flags:  }]
                                                                                                 flags: IS_ENUM
                                                                                                 repr: ReprOptions { int: None, align: None, pack: None, flags: , field_shuffle_seed: 3477539199540094892 }
                                                                                         args: []
@@ -206,7 +206,7 @@ body:
                                                                                         adt_def: 
                                                                                             AdtDef {
                                                                                                 did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
-                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])), safety: Safe }], tainted: None, flags:  }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], tainted: None, flags:  }]
+                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])), safety: Safe, value: None }], tainted: None, flags:  }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], tainted: None, flags:  }]
                                                                                                 flags: IS_ENUM
                                                                                                 repr: ReprOptions { int: None, align: None, pack: None, flags: , field_shuffle_seed: 3477539199540094892 }
                                                                                         args: []
diff --git a/tests/ui/type/type-dependent-def-issue-49241.stderr b/tests/ui/type/type-dependent-def-issue-49241.stderr
index 4e55618e5cb..cf372dc5968 100644
--- a/tests/ui/type/type-dependent-def-issue-49241.stderr
+++ b/tests/ui/type/type-dependent-def-issue-49241.stderr
@@ -9,12 +9,6 @@ help: consider using `let` instead of `const`
 LL |     let l: usize = v.count();
    |     ~~~
 
-note: erroneous constant encountered
-  --> $DIR/type-dependent-def-issue-49241.rs:4:18
-   |
-LL |     let s: [u32; l] = v.into_iter().collect();
-   |                  ^
-
 error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0435`.