summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/nll/assign-while-to-immutable.rs (renamed from src/test/ui/nll/assign-while-to-immutable.rs)0
-rw-r--r--tests/ui/nll/borrow-use-issue-46875.rs (renamed from src/test/ui/nll/borrow-use-issue-46875.rs)0
-rw-r--r--tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs (renamed from src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs)0
-rw-r--r--tests/ui/nll/borrowed-local-error.rs (renamed from src/test/ui/nll/borrowed-local-error.rs)0
-rw-r--r--tests/ui/nll/borrowed-local-error.stderr (renamed from src/test/ui/nll/borrowed-local-error.stderr)0
-rw-r--r--tests/ui/nll/borrowed-match-issue-45045.rs (renamed from src/test/ui/nll/borrowed-match-issue-45045.rs)0
-rw-r--r--tests/ui/nll/borrowed-match-issue-45045.stderr (renamed from src/test/ui/nll/borrowed-match-issue-45045.stderr)0
-rw-r--r--tests/ui/nll/borrowed-referent-issue-38899.rs (renamed from src/test/ui/nll/borrowed-referent-issue-38899.rs)0
-rw-r--r--tests/ui/nll/borrowed-referent-issue-38899.stderr (renamed from src/test/ui/nll/borrowed-referent-issue-38899.stderr)0
-rw-r--r--tests/ui/nll/borrowed-temporary-error.rs (renamed from src/test/ui/nll/borrowed-temporary-error.rs)0
-rw-r--r--tests/ui/nll/borrowed-temporary-error.stderr (renamed from src/test/ui/nll/borrowed-temporary-error.stderr)0
-rw-r--r--tests/ui/nll/borrowed-universal-error-2.rs (renamed from src/test/ui/nll/borrowed-universal-error-2.rs)0
-rw-r--r--tests/ui/nll/borrowed-universal-error-2.stderr (renamed from src/test/ui/nll/borrowed-universal-error-2.stderr)0
-rw-r--r--tests/ui/nll/borrowed-universal-error.rs (renamed from src/test/ui/nll/borrowed-universal-error.rs)0
-rw-r--r--tests/ui/nll/borrowed-universal-error.stderr (renamed from src/test/ui/nll/borrowed-universal-error.stderr)0
-rw-r--r--tests/ui/nll/cannot-move-block-spans.rs (renamed from src/test/ui/nll/cannot-move-block-spans.rs)0
-rw-r--r--tests/ui/nll/cannot-move-block-spans.stderr118
-rw-r--r--tests/ui/nll/capture-mut-ref.fixed (renamed from src/test/ui/nll/capture-mut-ref.fixed)0
-rw-r--r--tests/ui/nll/capture-mut-ref.rs (renamed from src/test/ui/nll/capture-mut-ref.rs)0
-rw-r--r--tests/ui/nll/capture-mut-ref.stderr (renamed from src/test/ui/nll/capture-mut-ref.stderr)0
-rw-r--r--tests/ui/nll/capture-ref-in-struct.rs (renamed from src/test/ui/nll/capture-ref-in-struct.rs)0
-rw-r--r--tests/ui/nll/capture-ref-in-struct.stderr (renamed from src/test/ui/nll/capture-ref-in-struct.stderr)0
-rw-r--r--tests/ui/nll/closure-access-spans.rs (renamed from src/test/ui/nll/closure-access-spans.rs)0
-rw-r--r--tests/ui/nll/closure-access-spans.stderr (renamed from src/test/ui/nll/closure-access-spans.stderr)0
-rw-r--r--tests/ui/nll/closure-borrow-spans.rs (renamed from src/test/ui/nll/closure-borrow-spans.rs)0
-rw-r--r--tests/ui/nll/closure-borrow-spans.stderr (renamed from src/test/ui/nll/closure-borrow-spans.stderr)0
-rw-r--r--tests/ui/nll/closure-captures.rs (renamed from src/test/ui/nll/closure-captures.rs)0
-rw-r--r--tests/ui/nll/closure-captures.stderr (renamed from src/test/ui/nll/closure-captures.stderr)0
-rw-r--r--tests/ui/nll/closure-malformed-projection-input-issue-102800.rs21
-rw-r--r--tests/ui/nll/closure-malformed-projection-input-issue-102800.stderr20
-rw-r--r--tests/ui/nll/closure-move-spans.rs (renamed from src/test/ui/nll/closure-move-spans.rs)0
-rw-r--r--tests/ui/nll/closure-move-spans.stderr (renamed from src/test/ui/nll/closure-move-spans.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument-callee.rs (renamed from src/test/ui/nll/closure-requirements/escape-argument-callee.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument-callee.stderr (renamed from src/test/ui/nll/closure-requirements/escape-argument-callee.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument.rs (renamed from src/test/ui/nll/closure-requirements/escape-argument.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument.stderr (renamed from src/test/ui/nll/closure-requirements/escape-argument.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-upvar-nested.rs (renamed from src/test/ui/nll/closure-requirements/escape-upvar-nested.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-upvar-nested.stderr (renamed from src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-upvar-ref.rs (renamed from src/test/ui/nll/closure-requirements/escape-upvar-ref.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/escape-upvar-ref.stderr (renamed from src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs (renamed from src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-ref.rs (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-val.rs (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-val.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-val.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs (renamed from src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs (renamed from src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs (renamed from src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-from-trait-match.rs (renamed from src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-multiple-requirements.rs (renamed from src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr (renamed from src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs (renamed from src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr (renamed from src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs (renamed from src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr (renamed from src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs (renamed from src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr (renamed from src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr)0
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs (renamed from src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/return-wrong-bound-region.rs (renamed from src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs)0
-rw-r--r--tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr (renamed from src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr)0
-rw-r--r--tests/ui/nll/closure-use-spans.rs (renamed from src/test/ui/nll/closure-use-spans.rs)0
-rw-r--r--tests/ui/nll/closure-use-spans.stderr (renamed from src/test/ui/nll/closure-use-spans.stderr)0
-rw-r--r--tests/ui/nll/closures-in-loops.rs (renamed from src/test/ui/nll/closures-in-loops.rs)0
-rw-r--r--tests/ui/nll/closures-in-loops.stderr (renamed from src/test/ui/nll/closures-in-loops.stderr)0
-rw-r--r--tests/ui/nll/constant-thread-locals-issue-47053.rs (renamed from src/test/ui/nll/constant-thread-locals-issue-47053.rs)0
-rw-r--r--tests/ui/nll/constant-thread-locals-issue-47053.stderr (renamed from src/test/ui/nll/constant-thread-locals-issue-47053.stderr)0
-rw-r--r--tests/ui/nll/constant.rs (renamed from src/test/ui/nll/constant.rs)0
-rw-r--r--tests/ui/nll/continue-after-missing-main.rs (renamed from src/test/ui/nll/continue-after-missing-main.rs)0
-rw-r--r--tests/ui/nll/continue-after-missing-main.stderr (renamed from src/test/ui/nll/continue-after-missing-main.stderr)0
-rw-r--r--tests/ui/nll/decl-macro-illegal-copy.rs (renamed from src/test/ui/nll/decl-macro-illegal-copy.rs)0
-rw-r--r--tests/ui/nll/decl-macro-illegal-copy.stderr (renamed from src/test/ui/nll/decl-macro-illegal-copy.stderr)0
-rw-r--r--tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.rs (renamed from src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.rs)0
-rw-r--r--tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr (renamed from src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr)0
-rw-r--r--tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.rs (renamed from src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.rs)0
-rw-r--r--tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr (renamed from src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr)0
-rw-r--r--tests/ui/nll/dont-print-desugared.rs (renamed from src/test/ui/nll/dont-print-desugared.rs)0
-rw-r--r--tests/ui/nll/dont-print-desugared.stderr (renamed from src/test/ui/nll/dont-print-desugared.stderr)0
-rw-r--r--tests/ui/nll/drop-may-dangle.rs (renamed from src/test/ui/nll/drop-may-dangle.rs)0
-rw-r--r--tests/ui/nll/drop-no-may-dangle.rs (renamed from src/test/ui/nll/drop-no-may-dangle.rs)0
-rw-r--r--tests/ui/nll/drop-no-may-dangle.stderr (renamed from src/test/ui/nll/drop-no-may-dangle.stderr)0
-rw-r--r--tests/ui/nll/empty-type-predicate-2.rs (renamed from src/test/ui/nll/empty-type-predicate-2.rs)0
-rw-r--r--tests/ui/nll/empty-type-predicate.rs (renamed from src/test/ui/nll/empty-type-predicate.rs)0
-rw-r--r--tests/ui/nll/enum-drop-access.rs (renamed from src/test/ui/nll/enum-drop-access.rs)0
-rw-r--r--tests/ui/nll/enum-drop-access.stderr (renamed from src/test/ui/nll/enum-drop-access.stderr)0
-rw-r--r--tests/ui/nll/extra-unused-mut.rs (renamed from src/test/ui/nll/extra-unused-mut.rs)0
-rw-r--r--tests/ui/nll/generator-distinct-lifetime.rs (renamed from src/test/ui/nll/generator-distinct-lifetime.rs)0
-rw-r--r--tests/ui/nll/generator-upvar-mutability.rs (renamed from src/test/ui/nll/generator-upvar-mutability.rs)0
-rw-r--r--tests/ui/nll/generator-upvar-mutability.stderr (renamed from src/test/ui/nll/generator-upvar-mutability.stderr)0
-rw-r--r--tests/ui/nll/get_default.polonius.stderr (renamed from src/test/ui/nll/get_default.polonius.stderr)0
-rw-r--r--tests/ui/nll/get_default.rs (renamed from src/test/ui/nll/get_default.rs)0
-rw-r--r--tests/ui/nll/get_default.stderr (renamed from src/test/ui/nll/get_default.stderr)0
-rw-r--r--tests/ui/nll/guarantor-issue-46974.rs (renamed from src/test/ui/nll/guarantor-issue-46974.rs)0
-rw-r--r--tests/ui/nll/guarantor-issue-46974.stderr (renamed from src/test/ui/nll/guarantor-issue-46974.stderr)0
-rw-r--r--tests/ui/nll/issue-16223.rs (renamed from src/test/ui/nll/issue-16223.rs)0
-rw-r--r--tests/ui/nll/issue-21114-ebfull.rs (renamed from src/test/ui/nll/issue-21114-ebfull.rs)0
-rw-r--r--tests/ui/nll/issue-21114-kixunil.rs (renamed from src/test/ui/nll/issue-21114-kixunil.rs)0
-rw-r--r--tests/ui/nll/issue-21232-partial-init-and-erroneous-use.rs (renamed from src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs)0
-rw-r--r--tests/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr (renamed from src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr)0
-rw-r--r--tests/ui/nll/issue-21232-partial-init-and-use.rs (renamed from src/test/ui/nll/issue-21232-partial-init-and-use.rs)0
-rw-r--r--tests/ui/nll/issue-21232-partial-init-and-use.stderr (renamed from src/test/ui/nll/issue-21232-partial-init-and-use.stderr)0
-rw-r--r--tests/ui/nll/issue-22323-temp-destruction.rs (renamed from src/test/ui/nll/issue-22323-temp-destruction.rs)0
-rw-r--r--tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs (renamed from src/test/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs)8
-rw-r--r--tests/ui/nll/issue-27282-move-match-input-into-guard.rs34
-rw-r--r--tests/ui/nll/issue-27282-move-match-input-into-guard.stderr29
-rw-r--r--tests/ui/nll/issue-27282-move-ref-mut-into-guard.rs23
-rw-r--r--tests/ui/nll/issue-27282-move-ref-mut-into-guard.stderr23
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs (renamed from src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs)0
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr (renamed from src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr)0
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs (renamed from src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs)0
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr (renamed from src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr)0
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs (renamed from src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs)0
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr (renamed from src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr)0
-rw-r--r--tests/ui/nll/issue-27282-mutation-in-guard.rs26
-rw-r--r--tests/ui/nll/issue-27282-mutation-in-guard.stderr23
-rw-r--r--tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.rs30
-rw-r--r--tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.stderr23
-rw-r--r--tests/ui/nll/issue-27868.rs (renamed from src/test/ui/nll/issue-27868.rs)0
-rw-r--r--tests/ui/nll/issue-27868.stderr (renamed from src/test/ui/nll/issue-27868.stderr)0
-rw-r--r--tests/ui/nll/issue-30104.rs (renamed from src/test/ui/nll/issue-30104.rs)0
-rw-r--r--tests/ui/nll/issue-31567.rs (renamed from src/test/ui/nll/issue-31567.rs)0
-rw-r--r--tests/ui/nll/issue-31567.stderr (renamed from src/test/ui/nll/issue-31567.stderr)0
-rw-r--r--tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs (renamed from src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs)0
-rw-r--r--tests/ui/nll/issue-42574-diagnostic-in-nested-closure.rs (renamed from src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.rs)0
-rw-r--r--tests/ui/nll/issue-42574-diagnostic-in-nested-closure.stderr (renamed from src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.stderr)0
-rw-r--r--tests/ui/nll/issue-43058.rs (renamed from src/test/ui/nll/issue-43058.rs)0
-rw-r--r--tests/ui/nll/issue-45157.rs (renamed from src/test/ui/nll/issue-45157.rs)0
-rw-r--r--tests/ui/nll/issue-45157.stderr (renamed from src/test/ui/nll/issue-45157.stderr)0
-rw-r--r--tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs (renamed from src/test/ui/nll/issue-45696-long-live-borrows-in-boxes.rs)0
-rw-r--r--tests/ui/nll/issue-45696-no-variant-box-recur.rs (renamed from src/test/ui/nll/issue-45696-no-variant-box-recur.rs)0
-rw-r--r--tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs (renamed from src/test/ui/nll/issue-45696-scribble-on-boxed-borrow.rs)0
-rw-r--r--tests/ui/nll/issue-45696-scribble-on-boxed-borrow.stderr (renamed from src/test/ui/nll/issue-45696-scribble-on-boxed-borrow.stderr)0
-rw-r--r--tests/ui/nll/issue-46023.rs (renamed from src/test/ui/nll/issue-46023.rs)0
-rw-r--r--tests/ui/nll/issue-46023.stderr (renamed from src/test/ui/nll/issue-46023.stderr)0
-rw-r--r--tests/ui/nll/issue-46036.rs (renamed from src/test/ui/nll/issue-46036.rs)0
-rw-r--r--tests/ui/nll/issue-46036.stderr (renamed from src/test/ui/nll/issue-46036.stderr)0
-rw-r--r--tests/ui/nll/issue-46589.rs (renamed from src/test/ui/nll/issue-46589.rs)0
-rw-r--r--tests/ui/nll/issue-46589.stderr (renamed from src/test/ui/nll/issue-46589.stderr)0
-rw-r--r--tests/ui/nll/issue-47022.rs (renamed from src/test/ui/nll/issue-47022.rs)0
-rw-r--r--tests/ui/nll/issue-47153-generic-const.rs (renamed from src/test/ui/nll/issue-47153-generic-const.rs)0
-rw-r--r--tests/ui/nll/issue-47388.rs (renamed from src/test/ui/nll/issue-47388.rs)0
-rw-r--r--tests/ui/nll/issue-47388.stderr14
-rw-r--r--tests/ui/nll/issue-47470.rs (renamed from src/test/ui/nll/issue-47470.rs)0
-rw-r--r--tests/ui/nll/issue-47470.stderr (renamed from src/test/ui/nll/issue-47470.stderr)0
-rw-r--r--tests/ui/nll/issue-47589.rs (renamed from src/test/ui/nll/issue-47589.rs)0
-rw-r--r--tests/ui/nll/issue-48070.rs (renamed from src/test/ui/nll/issue-48070.rs)0
-rw-r--r--tests/ui/nll/issue-48238.rs (renamed from src/test/ui/nll/issue-48238.rs)0
-rw-r--r--tests/ui/nll/issue-48238.stderr (renamed from src/test/ui/nll/issue-48238.stderr)0
-rw-r--r--tests/ui/nll/issue-48623-closure.rs (renamed from src/test/ui/nll/issue-48623-closure.rs)0
-rw-r--r--tests/ui/nll/issue-48623-generator.rs (renamed from src/test/ui/nll/issue-48623-generator.rs)0
-rw-r--r--tests/ui/nll/issue-48623-generator.stderr (renamed from src/test/ui/nll/issue-48623-generator.stderr)0
-rw-r--r--tests/ui/nll/issue-48697.rs (renamed from src/test/ui/nll/issue-48697.rs)0
-rw-r--r--tests/ui/nll/issue-48697.stderr (renamed from src/test/ui/nll/issue-48697.stderr)0
-rw-r--r--tests/ui/nll/issue-48803.rs (renamed from src/test/ui/nll/issue-48803.rs)0
-rw-r--r--tests/ui/nll/issue-48803.stderr (renamed from src/test/ui/nll/issue-48803.stderr)0
-rw-r--r--tests/ui/nll/issue-50343.rs (renamed from src/test/ui/nll/issue-50343.rs)0
-rw-r--r--tests/ui/nll/issue-50461-used-mut-from-moves.rs (renamed from src/test/ui/nll/issue-50461-used-mut-from-moves.rs)0
-rw-r--r--tests/ui/nll/issue-50716-1.rs (renamed from src/test/ui/nll/issue-50716-1.rs)0
-rw-r--r--tests/ui/nll/issue-50716.rs (renamed from src/test/ui/nll/issue-50716.rs)0
-rw-r--r--tests/ui/nll/issue-50716.stderr (renamed from src/test/ui/nll/issue-50716.stderr)0
-rw-r--r--tests/ui/nll/issue-51191.rs (renamed from src/test/ui/nll/issue-51191.rs)0
-rw-r--r--tests/ui/nll/issue-51191.stderr (renamed from src/test/ui/nll/issue-51191.stderr)7
-rw-r--r--tests/ui/nll/issue-51244.rs (renamed from src/test/ui/nll/issue-51244.rs)0
-rw-r--r--tests/ui/nll/issue-51244.stderr14
-rw-r--r--tests/ui/nll/issue-51268.rs (renamed from src/test/ui/nll/issue-51268.rs)0
-rw-r--r--tests/ui/nll/issue-51268.stderr (renamed from src/test/ui/nll/issue-51268.stderr)0
-rw-r--r--tests/ui/nll/issue-51345-2.rs (renamed from src/test/ui/nll/issue-51345-2.rs)0
-rw-r--r--tests/ui/nll/issue-51351.rs (renamed from src/test/ui/nll/issue-51351.rs)0
-rw-r--r--tests/ui/nll/issue-51512.rs (renamed from src/test/ui/nll/issue-51512.rs)0
-rw-r--r--tests/ui/nll/issue-51512.stderr (renamed from src/test/ui/nll/issue-51512.stderr)0
-rw-r--r--tests/ui/nll/issue-51770.rs (renamed from src/test/ui/nll/issue-51770.rs)0
-rw-r--r--tests/ui/nll/issue-52057.rs (renamed from src/test/ui/nll/issue-52057.rs)0
-rw-r--r--tests/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs (renamed from src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs)0
-rw-r--r--tests/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr (renamed from src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr)6
-rw-r--r--tests/ui/nll/issue-52078.rs (renamed from src/test/ui/nll/issue-52078.rs)0
-rw-r--r--tests/ui/nll/issue-52086.rs (renamed from src/test/ui/nll/issue-52086.rs)0
-rw-r--r--tests/ui/nll/issue-52086.stderr (renamed from src/test/ui/nll/issue-52086.stderr)0
-rw-r--r--tests/ui/nll/issue-52113.rs (renamed from src/test/ui/nll/issue-52113.rs)0
-rw-r--r--tests/ui/nll/issue-52113.stderr (renamed from src/test/ui/nll/issue-52113.stderr)0
-rw-r--r--tests/ui/nll/issue-52213.rs (renamed from src/test/ui/nll/issue-52213.rs)0
-rw-r--r--tests/ui/nll/issue-52213.stderr (renamed from src/test/ui/nll/issue-52213.stderr)0
-rw-r--r--tests/ui/nll/issue-52533-1.rs (renamed from src/test/ui/nll/issue-52533-1.rs)0
-rw-r--r--tests/ui/nll/issue-52533-1.stderr (renamed from src/test/ui/nll/issue-52533-1.stderr)0
-rw-r--r--tests/ui/nll/issue-52534-1.rs (renamed from src/test/ui/nll/issue-52534-1.rs)0
-rw-r--r--tests/ui/nll/issue-52534-1.stderr (renamed from src/test/ui/nll/issue-52534-1.stderr)0
-rw-r--r--tests/ui/nll/issue-52534-2.rs (renamed from src/test/ui/nll/issue-52534-2.rs)0
-rw-r--r--tests/ui/nll/issue-52534-2.stderr (renamed from src/test/ui/nll/issue-52534-2.stderr)0
-rw-r--r--tests/ui/nll/issue-52534.rs (renamed from src/test/ui/nll/issue-52534.rs)0
-rw-r--r--tests/ui/nll/issue-52534.stderr (renamed from src/test/ui/nll/issue-52534.stderr)0
-rw-r--r--tests/ui/nll/issue-52663-span-decl-captured-variable.rs (renamed from src/test/ui/nll/issue-52663-span-decl-captured-variable.rs)0
-rw-r--r--tests/ui/nll/issue-52663-span-decl-captured-variable.stderr (renamed from src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr)0
-rw-r--r--tests/ui/nll/issue-52663-trait-object.rs (renamed from src/test/ui/nll/issue-52663-trait-object.rs)0
-rw-r--r--tests/ui/nll/issue-52663-trait-object.stderr (renamed from src/test/ui/nll/issue-52663-trait-object.stderr)0
-rw-r--r--tests/ui/nll/issue-52669.rs (renamed from src/test/ui/nll/issue-52669.rs)0
-rw-r--r--tests/ui/nll/issue-52669.stderr (renamed from src/test/ui/nll/issue-52669.stderr)0
-rw-r--r--tests/ui/nll/issue-52742.rs (renamed from src/test/ui/nll/issue-52742.rs)0
-rw-r--r--tests/ui/nll/issue-52742.stderr (renamed from src/test/ui/nll/issue-52742.stderr)0
-rw-r--r--tests/ui/nll/issue-52992.rs (renamed from src/test/ui/nll/issue-52992.rs)0
-rw-r--r--tests/ui/nll/issue-53040.rs (renamed from src/test/ui/nll/issue-53040.rs)0
-rw-r--r--tests/ui/nll/issue-53040.stderr (renamed from src/test/ui/nll/issue-53040.stderr)0
-rw-r--r--tests/ui/nll/issue-53119.rs (renamed from src/test/ui/nll/issue-53119.rs)0
-rw-r--r--tests/ui/nll/issue-53123-raw-pointer-cast.rs (renamed from src/test/ui/nll/issue-53123-raw-pointer-cast.rs)0
-rw-r--r--tests/ui/nll/issue-53570.rs (renamed from src/test/ui/nll/issue-53570.rs)0
-rw-r--r--tests/ui/nll/issue-53773.rs (renamed from src/test/ui/nll/issue-53773.rs)0
-rw-r--r--tests/ui/nll/issue-53773.stderr (renamed from src/test/ui/nll/issue-53773.stderr)0
-rw-r--r--tests/ui/nll/issue-53807.rs (renamed from src/test/ui/nll/issue-53807.rs)0
-rw-r--r--tests/ui/nll/issue-53807.stderr (renamed from src/test/ui/nll/issue-53807.stderr)0
-rw-r--r--tests/ui/nll/issue-54189.rs (renamed from src/test/ui/issues/issue-54189.rs)0
-rw-r--r--tests/ui/nll/issue-54189.stderr (renamed from src/test/ui/issues/issue-54189.stderr)0
-rw-r--r--tests/ui/nll/issue-54382-use-span-of-tail-of-block.rs (renamed from src/test/ui/nll/issue-54382-use-span-of-tail-of-block.rs)0
-rw-r--r--tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr (renamed from src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr)0
-rw-r--r--tests/ui/nll/issue-54556-niconii.rs (renamed from src/test/ui/nll/issue-54556-niconii.rs)0
-rw-r--r--tests/ui/nll/issue-54556-niconii.stderr (renamed from src/test/ui/nll/issue-54556-niconii.stderr)0
-rw-r--r--tests/ui/nll/issue-54556-stephaneyfx.rs (renamed from src/test/ui/nll/issue-54556-stephaneyfx.rs)0
-rw-r--r--tests/ui/nll/issue-54556-stephaneyfx.stderr (renamed from src/test/ui/nll/issue-54556-stephaneyfx.stderr)0
-rw-r--r--tests/ui/nll/issue-54556-temps-in-tail-diagnostic.rs (renamed from src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.rs)0
-rw-r--r--tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr (renamed from src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr)0
-rw-r--r--tests/ui/nll/issue-54556-used-vs-unused-tails.rs (renamed from src/test/ui/nll/issue-54556-used-vs-unused-tails.rs)0
-rw-r--r--tests/ui/nll/issue-54556-used-vs-unused-tails.stderr (renamed from src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr)0
-rw-r--r--tests/ui/nll/issue-54556-wrap-it-up.rs (renamed from src/test/ui/nll/issue-54556-wrap-it-up.rs)0
-rw-r--r--tests/ui/nll/issue-54556-wrap-it-up.stderr (renamed from src/test/ui/nll/issue-54556-wrap-it-up.stderr)0
-rw-r--r--tests/ui/nll/issue-54779-anon-static-lifetime.rs (renamed from src/test/ui/nll/issue-54779-anon-static-lifetime.rs)0
-rw-r--r--tests/ui/nll/issue-54779-anon-static-lifetime.stderr (renamed from src/test/ui/nll/issue-54779-anon-static-lifetime.stderr)0
-rw-r--r--tests/ui/nll/issue-54943-3.rs (renamed from src/test/ui/nll/issue-54943-3.rs)0
-rw-r--r--tests/ui/nll/issue-54943.rs (renamed from src/test/ui/nll/issue-54943.rs)0
-rw-r--r--tests/ui/nll/issue-54943.stderr (renamed from src/test/ui/nll/issue-54943.stderr)0
-rw-r--r--tests/ui/nll/issue-55288.rs (renamed from src/test/ui/nll/issue-55288.rs)0
-rw-r--r--tests/ui/nll/issue-55344.rs (renamed from src/test/ui/nll/issue-55344.rs)0
-rw-r--r--tests/ui/nll/issue-55394.rs (renamed from src/test/ui/nll/issue-55394.rs)0
-rw-r--r--tests/ui/nll/issue-55394.stderr (renamed from src/test/ui/nll/issue-55394.stderr)0
-rw-r--r--tests/ui/nll/issue-55401.rs (renamed from src/test/ui/nll/issue-55401.rs)0
-rw-r--r--tests/ui/nll/issue-55401.stderr (renamed from src/test/ui/nll/issue-55401.stderr)0
-rw-r--r--tests/ui/nll/issue-55511.rs (renamed from src/test/ui/nll/issue-55511.rs)0
-rw-r--r--tests/ui/nll/issue-55511.stderr (renamed from src/test/ui/nll/issue-55511.stderr)0
-rw-r--r--tests/ui/nll/issue-55651.rs (renamed from src/test/ui/nll/issue-55651.rs)0
-rw-r--r--tests/ui/nll/issue-55825-const-fn.rs (renamed from src/test/ui/nll/issue-55825-const-fn.rs)0
-rw-r--r--tests/ui/nll/issue-55850.rs (renamed from src/test/ui/nll/issue-55850.rs)0
-rw-r--r--tests/ui/nll/issue-55850.stderr (renamed from src/test/ui/nll/issue-55850.stderr)0
-rw-r--r--tests/ui/nll/issue-57100.rs (renamed from src/test/ui/nll/issue-57100.rs)0
-rw-r--r--tests/ui/nll/issue-57100.stderr (renamed from src/test/ui/nll/issue-57100.stderr)0
-rw-r--r--tests/ui/nll/issue-57265-return-type-wf-check.rs (renamed from src/test/ui/nll/issue-57265-return-type-wf-check.rs)0
-rw-r--r--tests/ui/nll/issue-57265-return-type-wf-check.stderr (renamed from src/test/ui/nll/issue-57265-return-type-wf-check.stderr)0
-rw-r--r--tests/ui/nll/issue-57280-1-flipped.rs (renamed from src/test/ui/nll/issue-57280-1-flipped.rs)0
-rw-r--r--tests/ui/nll/issue-57280-1-flipped.stderr (renamed from src/test/ui/nll/issue-57280-1-flipped.stderr)0
-rw-r--r--tests/ui/nll/issue-57280-1.rs (renamed from src/test/ui/nll/issue-57280-1.rs)0
-rw-r--r--tests/ui/nll/issue-57280.rs (renamed from src/test/ui/nll/issue-57280.rs)0
-rw-r--r--tests/ui/nll/issue-57642-higher-ranked-subtype.rs (renamed from src/test/ui/nll/issue-57642-higher-ranked-subtype.rs)0
-rw-r--r--tests/ui/nll/issue-57642-higher-ranked-subtype.stderr (renamed from src/test/ui/nll/issue-57642-higher-ranked-subtype.stderr)0
-rw-r--r--tests/ui/nll/issue-57843.rs (renamed from src/test/ui/nll/issue-57843.rs)0
-rw-r--r--tests/ui/nll/issue-57843.stderr (renamed from src/test/ui/nll/issue-57843.stderr)0
-rw-r--r--tests/ui/nll/issue-57960.rs (renamed from src/test/ui/nll/issue-57960.rs)0
-rw-r--r--tests/ui/nll/issue-57989.rs (renamed from src/test/ui/nll/issue-57989.rs)0
-rw-r--r--tests/ui/nll/issue-57989.stderr (renamed from src/test/ui/nll/issue-57989.stderr)8
-rw-r--r--tests/ui/nll/issue-58053.rs (renamed from src/test/ui/nll/issue-58053.rs)0
-rw-r--r--tests/ui/nll/issue-58053.stderr (renamed from src/test/ui/nll/issue-58053.stderr)0
-rw-r--r--tests/ui/nll/issue-58299.rs (renamed from src/test/ui/nll/issue-58299.rs)0
-rw-r--r--tests/ui/nll/issue-58299.stderr (renamed from src/test/ui/nll/issue-58299.stderr)0
-rw-r--r--tests/ui/nll/issue-61311-normalize.rs (renamed from src/test/ui/nll/issue-61311-normalize.rs)0
-rw-r--r--tests/ui/nll/issue-61320-normalize.rs (renamed from src/test/ui/nll/issue-61320-normalize.rs)0
-rw-r--r--tests/ui/nll/issue-61424.fixed (renamed from src/test/ui/nll/issue-61424.fixed)0
-rw-r--r--tests/ui/nll/issue-61424.rs (renamed from src/test/ui/nll/issue-61424.rs)0
-rw-r--r--tests/ui/nll/issue-61424.stderr (renamed from src/test/ui/nll/issue-61424.stderr)0
-rw-r--r--tests/ui/nll/issue-62007-assign-const-index.rs (renamed from src/test/ui/nll/issue-62007-assign-const-index.rs)0
-rw-r--r--tests/ui/nll/issue-62007-assign-const-index.stderr (renamed from src/test/ui/nll/issue-62007-assign-const-index.stderr)0
-rw-r--r--tests/ui/nll/issue-62007-assign-differing-fields.rs (renamed from src/test/ui/nll/issue-62007-assign-differing-fields.rs)0
-rw-r--r--tests/ui/nll/issue-62007-assign-differing-fields.stderr (renamed from src/test/ui/nll/issue-62007-assign-differing-fields.stderr)0
-rw-r--r--tests/ui/nll/issue-63154-normalize.rs (renamed from src/test/ui/nll/issue-63154-normalize.rs)0
-rw-r--r--tests/ui/nll/issue-67007-escaping-data.rs (renamed from src/test/ui/nll/issue-67007-escaping-data.rs)0
-rw-r--r--tests/ui/nll/issue-67007-escaping-data.stderr (renamed from src/test/ui/nll/issue-67007-escaping-data.stderr)0
-rw-r--r--tests/ui/nll/issue-68550.rs (renamed from src/test/ui/nll/issue-68550.rs)0
-rw-r--r--tests/ui/nll/issue-68550.stderr (renamed from src/test/ui/nll/issue-68550.stderr)0
-rw-r--r--tests/ui/nll/issue-69114-static-mut-ty.rs (renamed from src/test/ui/nll/issue-69114-static-mut-ty.rs)0
-rw-r--r--tests/ui/nll/issue-69114-static-mut-ty.stderr (renamed from src/test/ui/nll/issue-69114-static-mut-ty.stderr)0
-rw-r--r--tests/ui/nll/issue-69114-static-ty.rs (renamed from src/test/ui/nll/issue-69114-static-ty.rs)0
-rw-r--r--tests/ui/nll/issue-69114-static-ty.stderr (renamed from src/test/ui/nll/issue-69114-static-ty.stderr)0
-rw-r--r--tests/ui/nll/issue-73159-rpit-static.rs (renamed from src/test/ui/nll/issue-73159-rpit-static.rs)0
-rw-r--r--tests/ui/nll/issue-73159-rpit-static.stderr (renamed from src/test/ui/nll/issue-73159-rpit-static.stderr)0
-rw-r--r--tests/ui/nll/issue-78561.rs (renamed from src/test/ui/nll/issue-78561.rs)0
-rw-r--r--tests/ui/nll/issue-95272.rs (renamed from src/test/ui/nll/issue-95272.rs)0
-rw-r--r--tests/ui/nll/issue-95272.stderr (renamed from src/test/ui/nll/issue-95272.stderr)0
-rw-r--r--tests/ui/nll/issue-97997.rs (renamed from src/test/ui/nll/issue-97997.rs)0
-rw-r--r--tests/ui/nll/issue-97997.stderr (renamed from src/test/ui/nll/issue-97997.stderr)0
-rw-r--r--tests/ui/nll/issue-98170.rs (renamed from src/test/ui/nll/issue-98170.rs)0
-rw-r--r--tests/ui/nll/issue-98170.stderr (renamed from src/test/ui/nll/issue-98170.stderr)0
-rw-r--r--tests/ui/nll/issue-98589-closures-relate-named-regions.rs (renamed from src/test/ui/nll/issue-98589-closures-relate-named-regions.rs)0
-rw-r--r--tests/ui/nll/issue-98589-closures-relate-named-regions.stderr (renamed from src/test/ui/nll/issue-98589-closures-relate-named-regions.stderr)0
-rw-r--r--tests/ui/nll/issue-98693.rs (renamed from src/test/ui/nll/issue-98693.rs)0
-rw-r--r--tests/ui/nll/issue-98693.stderr (renamed from src/test/ui/nll/issue-98693.stderr)0
-rw-r--r--tests/ui/nll/lint-no-err.rs (renamed from src/test/ui/nll/lint-no-err.rs)0
-rw-r--r--tests/ui/nll/loan_ends_mid_block_pair.rs (renamed from src/test/ui/nll/loan_ends_mid_block_pair.rs)0
-rw-r--r--tests/ui/nll/loan_ends_mid_block_pair.stderr (renamed from src/test/ui/nll/loan_ends_mid_block_pair.stderr)0
-rw-r--r--tests/ui/nll/loan_ends_mid_block_vec.rs (renamed from src/test/ui/nll/loan_ends_mid_block_vec.rs)0
-rw-r--r--tests/ui/nll/loan_ends_mid_block_vec.stderr (renamed from src/test/ui/nll/loan_ends_mid_block_vec.stderr)0
-rw-r--r--tests/ui/nll/local-outlives-static-via-hrtb.rs (renamed from src/test/ui/nll/local-outlives-static-via-hrtb.rs)0
-rw-r--r--tests/ui/nll/local-outlives-static-via-hrtb.stderr (renamed from src/test/ui/nll/local-outlives-static-via-hrtb.stderr)0
-rw-r--r--tests/ui/nll/lub-if.rs (renamed from src/test/ui/nll/lub-if.rs)0
-rw-r--r--tests/ui/nll/lub-if.stderr (renamed from src/test/ui/nll/lub-if.stderr)0
-rw-r--r--tests/ui/nll/lub-match.rs (renamed from src/test/ui/nll/lub-match.rs)0
-rw-r--r--tests/ui/nll/lub-match.stderr (renamed from src/test/ui/nll/lub-match.stderr)0
-rw-r--r--tests/ui/nll/match-cfg-fake-edges.rs70
-rw-r--r--tests/ui/nll/match-cfg-fake-edges.stderr72
-rw-r--r--tests/ui/nll/match-cfg-fake-edges2.rs (renamed from src/test/ui/nll/match-cfg-fake-edges2.rs)0
-rw-r--r--tests/ui/nll/match-cfg-fake-edges2.stderr (renamed from src/test/ui/nll/match-cfg-fake-edges2.stderr)0
-rw-r--r--tests/ui/nll/match-guards-always-borrow.rs64
-rw-r--r--tests/ui/nll/match-guards-always-borrow.stderr23
-rw-r--r--tests/ui/nll/match-guards-partially-borrow.rs332
-rw-r--r--tests/ui/nll/match-guards-partially-borrow.stderr170
-rw-r--r--tests/ui/nll/match-on-borrowed.rs (renamed from src/test/ui/nll/match-on-borrowed.rs)0
-rw-r--r--tests/ui/nll/match-on-borrowed.stderr (renamed from src/test/ui/nll/match-on-borrowed.stderr)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs (renamed from src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr (renamed from src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop-uninitialized.rs (renamed from src/test/ui/nll/maybe-initialized-drop-uninitialized.rs)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop-with-fragment.rs (renamed from src/test/ui/nll/maybe-initialized-drop-with-fragment.rs)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop-with-fragment.stderr (renamed from src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.rs (renamed from src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.rs)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr (renamed from src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop.rs (renamed from src/test/ui/nll/maybe-initialized-drop.rs)0
-rw-r--r--tests/ui/nll/maybe-initialized-drop.stderr (renamed from src/test/ui/nll/maybe-initialized-drop.stderr)0
-rw-r--r--tests/ui/nll/mir_check_cast_closure.rs (renamed from src/test/ui/nll/mir_check_cast_closure.rs)0
-rw-r--r--tests/ui/nll/mir_check_cast_closure.stderr (renamed from src/test/ui/nll/mir_check_cast_closure.stderr)0
-rw-r--r--tests/ui/nll/mir_check_cast_reify.rs (renamed from src/test/ui/nll/mir_check_cast_reify.rs)0
-rw-r--r--tests/ui/nll/mir_check_cast_reify.stderr (renamed from src/test/ui/nll/mir_check_cast_reify.stderr)0
-rw-r--r--tests/ui/nll/mir_check_cast_unsafe_fn.rs (renamed from src/test/ui/nll/mir_check_cast_unsafe_fn.rs)0
-rw-r--r--tests/ui/nll/mir_check_cast_unsafe_fn.stderr (renamed from src/test/ui/nll/mir_check_cast_unsafe_fn.stderr)0
-rw-r--r--tests/ui/nll/mir_check_cast_unsize.rs (renamed from src/test/ui/nll/mir_check_cast_unsize.rs)0
-rw-r--r--tests/ui/nll/mir_check_cast_unsize.stderr (renamed from src/test/ui/nll/mir_check_cast_unsize.stderr)0
-rw-r--r--tests/ui/nll/move-errors.rs (renamed from src/test/ui/nll/move-errors.rs)0
-rw-r--r--tests/ui/nll/move-errors.stderr210
-rw-r--r--tests/ui/nll/move-subpaths-moves-root.rs (renamed from src/test/ui/nll/move-subpaths-moves-root.rs)0
-rw-r--r--tests/ui/nll/move-subpaths-moves-root.stderr (renamed from src/test/ui/nll/move-subpaths-moves-root.stderr)0
-rw-r--r--tests/ui/nll/mutating_references.rs (renamed from src/test/ui/nll/mutating_references.rs)0
-rw-r--r--tests/ui/nll/normalization-bounds-error.rs (renamed from src/test/ui/nll/normalization-bounds-error.rs)0
-rw-r--r--tests/ui/nll/normalization-bounds-error.stderr (renamed from src/test/ui/nll/normalization-bounds-error.stderr)8
-rw-r--r--tests/ui/nll/normalization-bounds.rs (renamed from src/test/ui/nll/normalization-bounds.rs)0
-rw-r--r--tests/ui/nll/outlives-suggestion-more.rs (renamed from src/test/ui/nll/outlives-suggestion-more.rs)0
-rw-r--r--tests/ui/nll/outlives-suggestion-more.stderr (renamed from src/test/ui/nll/outlives-suggestion-more.stderr)0
-rw-r--r--tests/ui/nll/outlives-suggestion-simple.polonius.stderr (renamed from src/test/ui/nll/outlives-suggestion-simple.polonius.stderr)0
-rw-r--r--tests/ui/nll/outlives-suggestion-simple.rs (renamed from src/test/ui/nll/outlives-suggestion-simple.rs)0
-rw-r--r--tests/ui/nll/outlives-suggestion-simple.stderr (renamed from src/test/ui/nll/outlives-suggestion-simple.stderr)0
-rw-r--r--tests/ui/nll/polonius/assignment-kills-loans.rs (renamed from src/test/ui/nll/polonius/assignment-kills-loans.rs)0
-rw-r--r--tests/ui/nll/polonius/assignment-to-differing-field.rs (renamed from src/test/ui/nll/polonius/assignment-to-differing-field.rs)0
-rw-r--r--tests/ui/nll/polonius/assignment-to-differing-field.stderr (renamed from src/test/ui/nll/polonius/assignment-to-differing-field.stderr)0
-rw-r--r--tests/ui/nll/polonius/call-kills-loans.rs (renamed from src/test/ui/nll/polonius/call-kills-loans.rs)0
-rw-r--r--tests/ui/nll/polonius/issue-46589.rs (renamed from src/test/ui/nll/polonius/issue-46589.rs)0
-rw-r--r--tests/ui/nll/polonius/polonius-smoke-test.rs (renamed from src/test/ui/nll/polonius/polonius-smoke-test.rs)0
-rw-r--r--tests/ui/nll/polonius/polonius-smoke-test.stderr (renamed from src/test/ui/nll/polonius/polonius-smoke-test.stderr)0
-rw-r--r--tests/ui/nll/polonius/storagedead-kills-loans.rs (renamed from src/test/ui/nll/polonius/storagedead-kills-loans.rs)0
-rw-r--r--tests/ui/nll/polonius/subset-relations.rs (renamed from src/test/ui/nll/polonius/subset-relations.rs)0
-rw-r--r--tests/ui/nll/polonius/subset-relations.stderr (renamed from src/test/ui/nll/polonius/subset-relations.stderr)0
-rw-r--r--tests/ui/nll/process_or_insert_default.rs (renamed from src/test/ui/nll/process_or_insert_default.rs)0
-rw-r--r--tests/ui/nll/projection-return.rs (renamed from src/test/ui/nll/projection-return.rs)0
-rw-r--r--tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs (renamed from src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs)0
-rw-r--r--tests/ui/nll/promoted-bounds.rs (renamed from src/test/ui/nll/promoted-bounds.rs)0
-rw-r--r--tests/ui/nll/promoted-bounds.stderr (renamed from src/test/ui/nll/promoted-bounds.stderr)0
-rw-r--r--tests/ui/nll/promoted-closure-pair.rs (renamed from src/test/ui/nll/promoted-closure-pair.rs)0
-rw-r--r--tests/ui/nll/promoted-closure-pair.stderr (renamed from src/test/ui/nll/promoted-closure-pair.stderr)0
-rw-r--r--tests/ui/nll/promoted-liveness.rs (renamed from src/test/ui/nll/promoted-liveness.rs)0
-rw-r--r--tests/ui/nll/rc-loop.rs (renamed from src/test/ui/nll/rc-loop.rs)0
-rw-r--r--tests/ui/nll/ref-suggestion.rs (renamed from src/test/ui/nll/ref-suggestion.rs)0
-rw-r--r--tests/ui/nll/ref-suggestion.stderr (renamed from src/test/ui/nll/ref-suggestion.stderr)0
-rw-r--r--tests/ui/nll/reference-carried-through-struct-field.rs (renamed from src/test/ui/nll/reference-carried-through-struct-field.rs)0
-rw-r--r--tests/ui/nll/reference-carried-through-struct-field.stderr (renamed from src/test/ui/nll/reference-carried-through-struct-field.stderr)0
-rw-r--r--tests/ui/nll/region-ends-after-if-condition.rs (renamed from src/test/ui/nll/region-ends-after-if-condition.rs)0
-rw-r--r--tests/ui/nll/region-ends-after-if-condition.stderr (renamed from src/test/ui/nll/region-ends-after-if-condition.stderr)0
-rw-r--r--tests/ui/nll/relate_tys/fn-subtype.rs (renamed from src/test/ui/nll/relate_tys/fn-subtype.rs)0
-rw-r--r--tests/ui/nll/relate_tys/fn-subtype.stderr (renamed from src/test/ui/nll/relate_tys/fn-subtype.stderr)0
-rw-r--r--tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs (renamed from src/test/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs)0
-rw-r--r--tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr (renamed from src/test/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr)0
-rw-r--r--tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs (renamed from src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs)0
-rw-r--r--tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs (renamed from src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs)0
-rw-r--r--tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs (renamed from src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs)0
-rw-r--r--tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr (renamed from src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr)0
-rw-r--r--tests/ui/nll/relate_tys/issue-48071.rs (renamed from src/test/ui/nll/relate_tys/issue-48071.rs)0
-rw-r--r--tests/ui/nll/relate_tys/opaque-hrtb.rs (renamed from src/test/ui/nll/relate_tys/opaque-hrtb.rs)0
-rw-r--r--tests/ui/nll/relate_tys/opaque-hrtb.stderr (renamed from src/test/ui/nll/relate_tys/opaque-hrtb.stderr)0
-rw-r--r--tests/ui/nll/relate_tys/trait-hrtb.rs (renamed from src/test/ui/nll/relate_tys/trait-hrtb.rs)0
-rw-r--r--tests/ui/nll/relate_tys/trait-hrtb.stderr (renamed from src/test/ui/nll/relate_tys/trait-hrtb.stderr)0
-rw-r--r--tests/ui/nll/relate_tys/universe-violation.rs (renamed from src/test/ui/nll/relate_tys/universe-violation.rs)0
-rw-r--r--tests/ui/nll/relate_tys/universe-violation.stderr (renamed from src/test/ui/nll/relate_tys/universe-violation.stderr)0
-rw-r--r--tests/ui/nll/relate_tys/var-appears-twice.rs (renamed from src/test/ui/nll/relate_tys/var-appears-twice.rs)0
-rw-r--r--tests/ui/nll/relate_tys/var-appears-twice.stderr (renamed from src/test/ui/nll/relate_tys/var-appears-twice.stderr)0
-rw-r--r--tests/ui/nll/return-ref-mut-issue-46557.rs (renamed from src/test/ui/nll/return-ref-mut-issue-46557.rs)0
-rw-r--r--tests/ui/nll/return-ref-mut-issue-46557.stderr (renamed from src/test/ui/nll/return-ref-mut-issue-46557.stderr)0
-rw-r--r--tests/ui/nll/return_from_loop.rs (renamed from src/test/ui/nll/return_from_loop.rs)0
-rw-r--r--tests/ui/nll/return_from_loop.stderr (renamed from src/test/ui/nll/return_from_loop.stderr)0
-rw-r--r--tests/ui/nll/self-assign-ref-mut.rs (renamed from src/test/ui/nll/self-assign-ref-mut.rs)0
-rw-r--r--tests/ui/nll/snocat-regression.rs (renamed from src/test/ui/nll/snocat-regression.rs)0
-rw-r--r--tests/ui/nll/snocat-regression.stderr (renamed from src/test/ui/nll/snocat-regression.stderr)0
-rw-r--r--tests/ui/nll/trait-associated-constant.rs (renamed from src/test/ui/nll/trait-associated-constant.rs)0
-rw-r--r--tests/ui/nll/trait-associated-constant.stderr (renamed from src/test/ui/nll/trait-associated-constant.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/impl-trait-captures.rs (renamed from src/test/ui/nll/ty-outlives/impl-trait-captures.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/impl-trait-captures.stderr (renamed from src/test/ui/nll/ty-outlives/impl-trait-captures.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/impl-trait-outlives.rs (renamed from src/test/ui/nll/ty-outlives/impl-trait-outlives.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/impl-trait-outlives.stderr (renamed from src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/issue-53789-1.rs (renamed from src/test/ui/nll/ty-outlives/issue-53789-1.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/issue-53789-2.rs (renamed from src/test/ui/nll/ty-outlives/issue-53789-2.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/issue-55756.rs (renamed from src/test/ui/nll/ty-outlives/issue-55756.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-body.rs (renamed from src/test/ui/nll/ty-outlives/projection-body.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-implied-bounds.rs (renamed from src/test/ui/nll/ty-outlives/projection-implied-bounds.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-implied-bounds.stderr (renamed from src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-no-regions-closure.rs (renamed from src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr (renamed from src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-no-regions-fn.rs (renamed from src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr (renamed from src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-closure.rs (renamed from src/test/ui/nll/ty-outlives/projection-one-region-closure.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-closure.stderr (renamed from src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs (renamed from src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr (renamed from src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs (renamed from src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr (renamed from src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs (renamed from src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr (renamed from src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env.rs (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-env.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-none.rs (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-none.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-none.stderr (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-none.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-trait.rs (renamed from src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs (renamed from src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr (renamed from src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs (renamed from src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr (renamed from src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs (renamed from src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr (renamed from src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-fn-body.rs (renamed from src/test/ui/nll/ty-outlives/ty-param-fn-body.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-fn-body.stderr (renamed from src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-fn.rs (renamed from src/test/ui/nll/ty-outlives/ty-param-fn.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-fn.stderr (renamed from src/test/ui/nll/ty-outlives/ty-param-fn.stderr)0
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs (renamed from src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/wf-unreachable.rs (renamed from src/test/ui/nll/ty-outlives/wf-unreachable.rs)0
-rw-r--r--tests/ui/nll/ty-outlives/wf-unreachable.stderr73
-rw-r--r--tests/ui/nll/type-alias-free-regions.rs (renamed from src/test/ui/nll/type-alias-free-regions.rs)0
-rw-r--r--tests/ui/nll/type-alias-free-regions.stderr (renamed from src/test/ui/nll/type-alias-free-regions.stderr)0
-rw-r--r--tests/ui/nll/type-check-pointer-coercions.rs (renamed from src/test/ui/nll/type-check-pointer-coercions.rs)0
-rw-r--r--tests/ui/nll/type-check-pointer-coercions.stderr (renamed from src/test/ui/nll/type-check-pointer-coercions.stderr)0
-rw-r--r--tests/ui/nll/type-check-pointer-comparisons.rs (renamed from src/test/ui/nll/type-check-pointer-comparisons.rs)0
-rw-r--r--tests/ui/nll/type-check-pointer-comparisons.stderr (renamed from src/test/ui/nll/type-check-pointer-comparisons.stderr)0
-rw-r--r--tests/ui/nll/type-test-universe.rs (renamed from src/test/ui/nll/type-test-universe.rs)0
-rw-r--r--tests/ui/nll/type-test-universe.stderr (renamed from src/test/ui/nll/type-test-universe.stderr)0
-rw-r--r--tests/ui/nll/unused-mut-issue-50343.fixed (renamed from src/test/ui/nll/unused-mut-issue-50343.fixed)0
-rw-r--r--tests/ui/nll/unused-mut-issue-50343.rs (renamed from src/test/ui/nll/unused-mut-issue-50343.rs)0
-rw-r--r--tests/ui/nll/unused-mut-issue-50343.stderr (renamed from src/test/ui/nll/unused-mut-issue-50343.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/adt-brace-enums.rs (renamed from src/test/ui/nll/user-annotations/adt-brace-enums.rs)0
-rw-r--r--tests/ui/nll/user-annotations/adt-brace-enums.stderr (renamed from src/test/ui/nll/user-annotations/adt-brace-enums.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/adt-brace-structs.rs (renamed from src/test/ui/nll/user-annotations/adt-brace-structs.rs)0
-rw-r--r--tests/ui/nll/user-annotations/adt-brace-structs.stderr (renamed from src/test/ui/nll/user-annotations/adt-brace-structs.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/adt-nullary-enums.rs (renamed from src/test/ui/nll/user-annotations/adt-nullary-enums.rs)0
-rw-r--r--tests/ui/nll/user-annotations/adt-nullary-enums.stderr (renamed from src/test/ui/nll/user-annotations/adt-nullary-enums.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/adt-tuple-enums.rs (renamed from src/test/ui/nll/user-annotations/adt-tuple-enums.rs)0
-rw-r--r--tests/ui/nll/user-annotations/adt-tuple-enums.stderr (renamed from src/test/ui/nll/user-annotations/adt-tuple-enums.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/adt-tuple-struct-calls.rs (renamed from src/test/ui/nll/user-annotations/adt-tuple-struct-calls.rs)0
-rw-r--r--tests/ui/nll/user-annotations/adt-tuple-struct-calls.stderr (renamed from src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/adt-tuple-struct.rs (renamed from src/test/ui/nll/user-annotations/adt-tuple-struct.rs)0
-rw-r--r--tests/ui/nll/user-annotations/adt-tuple-struct.stderr (renamed from src/test/ui/nll/user-annotations/adt-tuple-struct.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/ascribed-type-wf.rs17
-rw-r--r--tests/ui/nll/user-annotations/ascribed-type-wf.stderr10
-rw-r--r--tests/ui/nll/user-annotations/cast_static_lifetime.rs (renamed from src/test/ui/nll/user-annotations/cast_static_lifetime.rs)0
-rw-r--r--tests/ui/nll/user-annotations/cast_static_lifetime.stderr (renamed from src/test/ui/nll/user-annotations/cast_static_lifetime.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/closure-sig.rs15
-rw-r--r--tests/ui/nll/user-annotations/closure-substs.polonius.stderr (renamed from src/test/ui/nll/user-annotations/closure-substs.polonius.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/closure-substs.rs (renamed from src/test/ui/nll/user-annotations/closure-substs.rs)0
-rw-r--r--tests/ui/nll/user-annotations/closure-substs.stderr (renamed from src/test/ui/nll/user-annotations/closure-substs.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-inherent-1.rs (renamed from src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr (renamed from src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-inherent-2.rs (renamed from src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr (renamed from src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-normalize.rs (renamed from src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr (renamed from src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs (renamed from src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr (renamed from src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs (renamed from src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr (renamed from src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs (renamed from src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs)0
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr (renamed from src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/downcast-infer.rs (renamed from src/test/ui/nll/user-annotations/downcast-infer.rs)0
-rw-r--r--tests/ui/nll/user-annotations/dump-adt-brace-struct.rs (renamed from src/test/ui/nll/user-annotations/dump-adt-brace-struct.rs)0
-rw-r--r--tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr (renamed from src/test/ui/nll/user-annotations/dump-adt-brace-struct.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/dump-fn-method.rs (renamed from src/test/ui/nll/user-annotations/dump-fn-method.rs)0
-rw-r--r--tests/ui/nll/user-annotations/dump-fn-method.stderr (renamed from src/test/ui/nll/user-annotations/dump-fn-method.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/fns.rs (renamed from src/test/ui/nll/user-annotations/fns.rs)0
-rw-r--r--tests/ui/nll/user-annotations/fns.stderr (renamed from src/test/ui/nll/user-annotations/fns.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/inherent-associated-constants.rs (renamed from src/test/ui/nll/user-annotations/inherent-associated-constants.rs)0
-rw-r--r--tests/ui/nll/user-annotations/inherent-associated-constants.stderr (renamed from src/test/ui/nll/user-annotations/inherent-associated-constants.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/issue-54124.rs (renamed from src/test/ui/nll/user-annotations/issue-54124.rs)0
-rw-r--r--tests/ui/nll/user-annotations/issue-54124.stderr (renamed from src/test/ui/nll/user-annotations/issue-54124.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs (renamed from src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs)0
-rw-r--r--tests/ui/nll/user-annotations/issue-55219.rs (renamed from src/test/ui/nll/user-annotations/issue-55219.rs)0
-rw-r--r--tests/ui/nll/user-annotations/issue-55241.rs (renamed from src/test/ui/nll/user-annotations/issue-55241.rs)0
-rw-r--r--tests/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs (renamed from src/test/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs)0
-rw-r--r--tests/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.stderr (renamed from src/test/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs (renamed from src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs)0
-rw-r--r--tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr (renamed from src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-call.rs (renamed from src/test/ui/nll/user-annotations/method-call.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-call.stderr (renamed from src/test/ui/nll/user-annotations/method-call.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-1.rs (renamed from src/test/ui/nll/user-annotations/method-ufcs-1.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-1.stderr (renamed from src/test/ui/nll/user-annotations/method-ufcs-1.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-2.rs (renamed from src/test/ui/nll/user-annotations/method-ufcs-2.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-2.stderr (renamed from src/test/ui/nll/user-annotations/method-ufcs-2.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-3.rs (renamed from src/test/ui/nll/user-annotations/method-ufcs-3.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-3.stderr (renamed from src/test/ui/nll/user-annotations/method-ufcs-3.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-1.rs (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-1.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-2.rs (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-2.stderr (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-3.rs (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-3.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-4.rs (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs)0
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-4.stderr (renamed from src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/normalization-2.rs152
-rw-r--r--tests/ui/nll/user-annotations/normalization-2.stderr296
-rw-r--r--tests/ui/nll/user-annotations/normalization-default.rs22
-rw-r--r--tests/ui/nll/user-annotations/normalization-default.stderr36
-rw-r--r--tests/ui/nll/user-annotations/normalization-infer.rs40
-rw-r--r--tests/ui/nll/user-annotations/normalization-infer.stderr101
-rw-r--r--tests/ui/nll/user-annotations/normalization-self.rs26
-rw-r--r--tests/ui/nll/user-annotations/normalization-self.stderr36
-rw-r--r--tests/ui/nll/user-annotations/normalization.rs17
-rw-r--r--tests/ui/nll/user-annotations/normalization.stderr25
-rw-r--r--tests/ui/nll/user-annotations/normalize-self-ty.rs (renamed from src/test/ui/nll/user-annotations/normalize-self-ty.rs)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs)0
-rw-r--r--tests/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr (renamed from src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/patterns.rs (renamed from src/test/ui/nll/user-annotations/patterns.rs)0
-rw-r--r--tests/ui/nll/user-annotations/patterns.stderr (renamed from src/test/ui/nll/user-annotations/patterns.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/promoted-annotation.rs (renamed from src/test/ui/nll/user-annotations/promoted-annotation.rs)0
-rw-r--r--tests/ui/nll/user-annotations/promoted-annotation.stderr (renamed from src/test/ui/nll/user-annotations/promoted-annotation.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs (renamed from src/test/ui/nll/user-annotations/type-annotation-with-hrtb.rs)0
-rw-r--r--tests/ui/nll/user-annotations/type_ascription_static_lifetime.rs (renamed from src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs)0
-rw-r--r--tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr (renamed from src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr)0
-rw-r--r--tests/ui/nll/user-annotations/wf-self-type.rs (renamed from src/test/ui/nll/user-annotations/wf-self-type.rs)0
-rw-r--r--tests/ui/nll/user-annotations/wf-self-type.stderr (renamed from src/test/ui/nll/user-annotations/wf-self-type.stderr)0
-rw-r--r--tests/ui/nll/vimwiki-core-regression.rs (renamed from src/test/ui/nll/vimwiki-core-regression.rs)0
-rw-r--r--tests/ui/nll/where_clauses_in_functions.rs (renamed from src/test/ui/nll/where_clauses_in_functions.rs)0
-rw-r--r--tests/ui/nll/where_clauses_in_functions.stderr (renamed from src/test/ui/nll/where_clauses_in_functions.stderr)0
-rw-r--r--tests/ui/nll/where_clauses_in_structs.rs (renamed from src/test/ui/nll/where_clauses_in_structs.rs)0
-rw-r--r--tests/ui/nll/where_clauses_in_structs.stderr (renamed from src/test/ui/nll/where_clauses_in_structs.stderr)0
554 files changed, 2232 insertions, 10 deletions
diff --git a/src/test/ui/nll/assign-while-to-immutable.rs b/tests/ui/nll/assign-while-to-immutable.rs
index c803321b5..c803321b5 100644
--- a/src/test/ui/nll/assign-while-to-immutable.rs
+++ b/tests/ui/nll/assign-while-to-immutable.rs
diff --git a/src/test/ui/nll/borrow-use-issue-46875.rs b/tests/ui/nll/borrow-use-issue-46875.rs
index 42e28b967..42e28b967 100644
--- a/src/test/ui/nll/borrow-use-issue-46875.rs
+++ b/tests/ui/nll/borrow-use-issue-46875.rs
diff --git a/src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs
index 7d3b00dfc..7d3b00dfc 100644
--- a/src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs
+++ b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs
diff --git a/src/test/ui/nll/borrowed-local-error.rs b/tests/ui/nll/borrowed-local-error.rs
index d333356d9..d333356d9 100644
--- a/src/test/ui/nll/borrowed-local-error.rs
+++ b/tests/ui/nll/borrowed-local-error.rs
diff --git a/src/test/ui/nll/borrowed-local-error.stderr b/tests/ui/nll/borrowed-local-error.stderr
index d629caa43..d629caa43 100644
--- a/src/test/ui/nll/borrowed-local-error.stderr
+++ b/tests/ui/nll/borrowed-local-error.stderr
diff --git a/src/test/ui/nll/borrowed-match-issue-45045.rs b/tests/ui/nll/borrowed-match-issue-45045.rs
index 978eeb868..978eeb868 100644
--- a/src/test/ui/nll/borrowed-match-issue-45045.rs
+++ b/tests/ui/nll/borrowed-match-issue-45045.rs
diff --git a/src/test/ui/nll/borrowed-match-issue-45045.stderr b/tests/ui/nll/borrowed-match-issue-45045.stderr
index 9d4682667..9d4682667 100644
--- a/src/test/ui/nll/borrowed-match-issue-45045.stderr
+++ b/tests/ui/nll/borrowed-match-issue-45045.stderr
diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.rs b/tests/ui/nll/borrowed-referent-issue-38899.rs
index 1fe133283..1fe133283 100644
--- a/src/test/ui/nll/borrowed-referent-issue-38899.rs
+++ b/tests/ui/nll/borrowed-referent-issue-38899.rs
diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.stderr b/tests/ui/nll/borrowed-referent-issue-38899.stderr
index 16588cbcf..16588cbcf 100644
--- a/src/test/ui/nll/borrowed-referent-issue-38899.stderr
+++ b/tests/ui/nll/borrowed-referent-issue-38899.stderr
diff --git a/src/test/ui/nll/borrowed-temporary-error.rs b/tests/ui/nll/borrowed-temporary-error.rs
index 37d0e670d..37d0e670d 100644
--- a/src/test/ui/nll/borrowed-temporary-error.rs
+++ b/tests/ui/nll/borrowed-temporary-error.rs
diff --git a/src/test/ui/nll/borrowed-temporary-error.stderr b/tests/ui/nll/borrowed-temporary-error.stderr
index 89781d96f..89781d96f 100644
--- a/src/test/ui/nll/borrowed-temporary-error.stderr
+++ b/tests/ui/nll/borrowed-temporary-error.stderr
diff --git a/src/test/ui/nll/borrowed-universal-error-2.rs b/tests/ui/nll/borrowed-universal-error-2.rs
index 3f9b2f292..3f9b2f292 100644
--- a/src/test/ui/nll/borrowed-universal-error-2.rs
+++ b/tests/ui/nll/borrowed-universal-error-2.rs
diff --git a/src/test/ui/nll/borrowed-universal-error-2.stderr b/tests/ui/nll/borrowed-universal-error-2.stderr
index 7213ed3ba..7213ed3ba 100644
--- a/src/test/ui/nll/borrowed-universal-error-2.stderr
+++ b/tests/ui/nll/borrowed-universal-error-2.stderr
diff --git a/src/test/ui/nll/borrowed-universal-error.rs b/tests/ui/nll/borrowed-universal-error.rs
index fc9ffd470..fc9ffd470 100644
--- a/src/test/ui/nll/borrowed-universal-error.rs
+++ b/tests/ui/nll/borrowed-universal-error.rs
diff --git a/src/test/ui/nll/borrowed-universal-error.stderr b/tests/ui/nll/borrowed-universal-error.stderr
index 88a2d8fcf..88a2d8fcf 100644
--- a/src/test/ui/nll/borrowed-universal-error.stderr
+++ b/tests/ui/nll/borrowed-universal-error.stderr
diff --git a/src/test/ui/nll/cannot-move-block-spans.rs b/tests/ui/nll/cannot-move-block-spans.rs
index e994fd3d5..e994fd3d5 100644
--- a/src/test/ui/nll/cannot-move-block-spans.rs
+++ b/tests/ui/nll/cannot-move-block-spans.rs
diff --git a/tests/ui/nll/cannot-move-block-spans.stderr b/tests/ui/nll/cannot-move-block-spans.stderr
new file mode 100644
index 000000000..0dc5c08ea
--- /dev/null
+++ b/tests/ui/nll/cannot-move-block-spans.stderr
@@ -0,0 +1,118 @@
+error[E0507]: cannot move out of `*r` which is behind a shared reference
+ --> $DIR/cannot-move-block-spans.rs:5:15
+ |
+LL | let x = { *r };
+ | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let x = { *r };
+LL + let x = { r };
+ |
+
+error[E0507]: cannot move out of `*r` which is behind a shared reference
+ --> $DIR/cannot-move-block-spans.rs:6:22
+ |
+LL | let y = unsafe { *r };
+ | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let y = unsafe { *r };
+LL + let y = unsafe { r };
+ |
+
+error[E0507]: cannot move out of `*r` which is behind a shared reference
+ --> $DIR/cannot-move-block-spans.rs:7:26
+ |
+LL | let z = loop { break *r; };
+ | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let z = loop { break *r; };
+LL + let z = loop { break r; };
+ |
+
+error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
+ --> $DIR/cannot-move-block-spans.rs:11:15
+ |
+LL | let x = { arr[0] };
+ | ^^^^^^
+ | |
+ | cannot move out of here
+ | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing here
+ |
+LL | let x = { &arr[0] };
+ | +
+
+error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
+ --> $DIR/cannot-move-block-spans.rs:12:22
+ |
+LL | let y = unsafe { arr[0] };
+ | ^^^^^^
+ | |
+ | cannot move out of here
+ | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing here
+ |
+LL | let y = unsafe { &arr[0] };
+ | +
+
+error[E0508]: cannot move out of type `[String; 2]`, a non-copy array
+ --> $DIR/cannot-move-block-spans.rs:13:26
+ |
+LL | let z = loop { break arr[0]; };
+ | ^^^^^^
+ | |
+ | cannot move out of here
+ | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing here
+ |
+LL | let z = loop { break &arr[0]; };
+ | +
+
+error[E0507]: cannot move out of `*r` which is behind a shared reference
+ --> $DIR/cannot-move-block-spans.rs:17:38
+ |
+LL | let x = { let mut u = 0; u += 1; *r };
+ | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let x = { let mut u = 0; u += 1; *r };
+LL + let x = { let mut u = 0; u += 1; r };
+ |
+
+error[E0507]: cannot move out of `*r` which is behind a shared reference
+ --> $DIR/cannot-move-block-spans.rs:18:45
+ |
+LL | let y = unsafe { let mut u = 0; u += 1; *r };
+ | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let y = unsafe { let mut u = 0; u += 1; *r };
+LL + let y = unsafe { let mut u = 0; u += 1; r };
+ |
+
+error[E0507]: cannot move out of `*r` which is behind a shared reference
+ --> $DIR/cannot-move-block-spans.rs:19:49
+ |
+LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
+ | ^^ move occurs because `*r` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let z = loop { let mut u = 0; u += 1; break *r; u += 2; };
+LL + let z = loop { let mut u = 0; u += 1; break r; u += 2; };
+ |
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0507, E0508.
+For more information about an error, try `rustc --explain E0507`.
diff --git a/src/test/ui/nll/capture-mut-ref.fixed b/tests/ui/nll/capture-mut-ref.fixed
index 2dacb26b6..2dacb26b6 100644
--- a/src/test/ui/nll/capture-mut-ref.fixed
+++ b/tests/ui/nll/capture-mut-ref.fixed
diff --git a/src/test/ui/nll/capture-mut-ref.rs b/tests/ui/nll/capture-mut-ref.rs
index 56e01f7b7..56e01f7b7 100644
--- a/src/test/ui/nll/capture-mut-ref.rs
+++ b/tests/ui/nll/capture-mut-ref.rs
diff --git a/src/test/ui/nll/capture-mut-ref.stderr b/tests/ui/nll/capture-mut-ref.stderr
index 4898d5692..4898d5692 100644
--- a/src/test/ui/nll/capture-mut-ref.stderr
+++ b/tests/ui/nll/capture-mut-ref.stderr
diff --git a/src/test/ui/nll/capture-ref-in-struct.rs b/tests/ui/nll/capture-ref-in-struct.rs
index db6ac7d66..db6ac7d66 100644
--- a/src/test/ui/nll/capture-ref-in-struct.rs
+++ b/tests/ui/nll/capture-ref-in-struct.rs
diff --git a/src/test/ui/nll/capture-ref-in-struct.stderr b/tests/ui/nll/capture-ref-in-struct.stderr
index cdfe7f6db..cdfe7f6db 100644
--- a/src/test/ui/nll/capture-ref-in-struct.stderr
+++ b/tests/ui/nll/capture-ref-in-struct.stderr
diff --git a/src/test/ui/nll/closure-access-spans.rs b/tests/ui/nll/closure-access-spans.rs
index 2a59e80b2..2a59e80b2 100644
--- a/src/test/ui/nll/closure-access-spans.rs
+++ b/tests/ui/nll/closure-access-spans.rs
diff --git a/src/test/ui/nll/closure-access-spans.stderr b/tests/ui/nll/closure-access-spans.stderr
index 0a09353b8..0a09353b8 100644
--- a/src/test/ui/nll/closure-access-spans.stderr
+++ b/tests/ui/nll/closure-access-spans.stderr
diff --git a/src/test/ui/nll/closure-borrow-spans.rs b/tests/ui/nll/closure-borrow-spans.rs
index b38f7900e..b38f7900e 100644
--- a/src/test/ui/nll/closure-borrow-spans.rs
+++ b/tests/ui/nll/closure-borrow-spans.rs
diff --git a/src/test/ui/nll/closure-borrow-spans.stderr b/tests/ui/nll/closure-borrow-spans.stderr
index bada4e1b8..bada4e1b8 100644
--- a/src/test/ui/nll/closure-borrow-spans.stderr
+++ b/tests/ui/nll/closure-borrow-spans.stderr
diff --git a/src/test/ui/nll/closure-captures.rs b/tests/ui/nll/closure-captures.rs
index 16d90b971..16d90b971 100644
--- a/src/test/ui/nll/closure-captures.rs
+++ b/tests/ui/nll/closure-captures.rs
diff --git a/src/test/ui/nll/closure-captures.stderr b/tests/ui/nll/closure-captures.stderr
index 5233f0b24..5233f0b24 100644
--- a/src/test/ui/nll/closure-captures.stderr
+++ b/tests/ui/nll/closure-captures.stderr
diff --git a/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs b/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs
new file mode 100644
index 000000000..260c16c17
--- /dev/null
+++ b/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs
@@ -0,0 +1,21 @@
+// Regression test for #102800
+//
+// Here we are generating higher-ranked region constraints when normalizing and relating closure
+// input types. Previously this was an ICE in the error path because we didn't register enough
+// diagnostic information to render the higher-ranked subtyping error.
+
+// check-fail
+
+trait Trait {
+ type Ty;
+}
+
+impl Trait for &'static () {
+ type Ty = ();
+}
+
+fn main() {
+ let _: for<'a> fn(<&'a () as Trait>::Ty) = |_| {};
+ //~^ ERROR implementation of `Trait` is not general enough
+ //~| ERROR implementation of `Trait` is not general enough
+}
diff --git a/tests/ui/nll/closure-malformed-projection-input-issue-102800.stderr b/tests/ui/nll/closure-malformed-projection-input-issue-102800.stderr
new file mode 100644
index 000000000..46dba0064
--- /dev/null
+++ b/tests/ui/nll/closure-malformed-projection-input-issue-102800.stderr
@@ -0,0 +1,20 @@
+error: implementation of `Trait` is not general enough
+ --> $DIR/closure-malformed-projection-input-issue-102800.rs:18:12
+ |
+LL | let _: for<'a> fn(<&'a () as Trait>::Ty) = |_| {};
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Trait` is not general enough
+ |
+ = note: `&'0 ()` must implement `Trait`, for any lifetime `'0`...
+ = note: ...but `Trait` is actually implemented for the type `&'static ()`
+
+error: implementation of `Trait` is not general enough
+ --> $DIR/closure-malformed-projection-input-issue-102800.rs:18:12
+ |
+LL | let _: for<'a> fn(<&'a () as Trait>::Ty) = |_| {};
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Trait` is not general enough
+ |
+ = note: `&'0 ()` must implement `Trait`, for any lifetime `'0`...
+ = note: ...but `Trait` is actually implemented for the type `&'static ()`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/nll/closure-move-spans.rs b/tests/ui/nll/closure-move-spans.rs
index bf2431870..bf2431870 100644
--- a/src/test/ui/nll/closure-move-spans.rs
+++ b/tests/ui/nll/closure-move-spans.rs
diff --git a/src/test/ui/nll/closure-move-spans.stderr b/tests/ui/nll/closure-move-spans.stderr
index 0446ef7b0..0446ef7b0 100644
--- a/src/test/ui/nll/closure-move-spans.stderr
+++ b/tests/ui/nll/closure-move-spans.stderr
diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.rs b/tests/ui/nll/closure-requirements/escape-argument-callee.rs
index 3aea511b0..3aea511b0 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument-callee.rs
+++ b/tests/ui/nll/closure-requirements/escape-argument-callee.rs
diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
index 363ddfaff..363ddfaff 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr
+++ b/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
diff --git a/src/test/ui/nll/closure-requirements/escape-argument.rs b/tests/ui/nll/closure-requirements/escape-argument.rs
index 066cd4360..066cd4360 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument.rs
+++ b/tests/ui/nll/closure-requirements/escape-argument.rs
diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/tests/ui/nll/closure-requirements/escape-argument.stderr
index f67c312b9..f67c312b9 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument.stderr
+++ b/tests/ui/nll/closure-requirements/escape-argument.stderr
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.rs b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs
index 765a3cf96..765a3cf96 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.rs
+++ b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/tests/ui/nll/closure-requirements/escape-upvar-nested.stderr
index 4fbd5eb19..4fbd5eb19 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr
+++ b/tests/ui/nll/closure-requirements/escape-upvar-nested.stderr
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.rs b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs
index 0a562a0a1..0a562a0a1 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.rs
+++ b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr b/tests/ui/nll/closure-requirements/escape-upvar-ref.stderr
index bc1ceac5b..bc1ceac5b 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr
+++ b/tests/ui/nll/closure-requirements/escape-upvar-ref.stderr
diff --git a/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs b/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs
index a83ebc21f..a83ebc21f 100644
--- a/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs
+++ b/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs
index 35a864b88..35a864b88 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
index 7da6ce58b..7da6ce58b 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs
index 7291c6e97..7291c6e97 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
index 993687605..993687605 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs
index afe6f10a5..afe6f10a5 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
index 7991abeb7..7991abeb7 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs
index 372209075..372209075 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
index 43dfc3bb9..43dfc3bb9 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs
index 9898777c7..9898777c7 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
index 96c734226..96c734226 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs
index 5bb5eea99..5bb5eea99 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
index 03dbd686e..03dbd686e 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs
index 704a026d2..704a026d2 100644
--- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs
+++ b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
index d716d3de2..d716d3de2 100644
--- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs
index dcd05d7fa..dcd05d7fa 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
index b924873fc..b924873fc 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs
index 98be92d1c..98be92d1c 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
index 9b25efd0b..9b25efd0b 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs
index cda781d8e..cda781d8e 100644
--- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs
+++ b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr
index 038a5e11f..038a5e11f 100644
--- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr
diff --git a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.rs
index a9d2a0771..a9d2a0771 100644
--- a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs
+++ b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.rs
diff --git a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
index 2fec9bc62..2fec9bc62 100644
--- a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
diff --git a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs
index 8147da09d..8147da09d 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs
+++ b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs
diff --git a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
index 7034492ce..7034492ce 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
+++ b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
diff --git a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs
index 4acd2fc92..4acd2fc92 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs
+++ b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs
diff --git a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
index d0a24a267..d0a24a267 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
+++ b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs
index 06e96be80..06e96be80 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs
+++ b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs
diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr
index d0ba53925..d0ba53925 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr
+++ b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr
diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs
index 014959fdb..014959fdb 100644
--- a/src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs
+++ b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs
diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs
index e34a3f6f2..e34a3f6f2 100644
--- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs
+++ b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs
diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
index 6db72b886..6db72b886 100644
--- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr
+++ b/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
diff --git a/src/test/ui/nll/closure-use-spans.rs b/tests/ui/nll/closure-use-spans.rs
index 6768250dc..6768250dc 100644
--- a/src/test/ui/nll/closure-use-spans.rs
+++ b/tests/ui/nll/closure-use-spans.rs
diff --git a/src/test/ui/nll/closure-use-spans.stderr b/tests/ui/nll/closure-use-spans.stderr
index ad928f1bb..ad928f1bb 100644
--- a/src/test/ui/nll/closure-use-spans.stderr
+++ b/tests/ui/nll/closure-use-spans.stderr
diff --git a/src/test/ui/nll/closures-in-loops.rs b/tests/ui/nll/closures-in-loops.rs
index 491c186ec..491c186ec 100644
--- a/src/test/ui/nll/closures-in-loops.rs
+++ b/tests/ui/nll/closures-in-loops.rs
diff --git a/src/test/ui/nll/closures-in-loops.stderr b/tests/ui/nll/closures-in-loops.stderr
index 1c1a31d35..1c1a31d35 100644
--- a/src/test/ui/nll/closures-in-loops.stderr
+++ b/tests/ui/nll/closures-in-loops.stderr
diff --git a/src/test/ui/nll/constant-thread-locals-issue-47053.rs b/tests/ui/nll/constant-thread-locals-issue-47053.rs
index dde0ef7a5..dde0ef7a5 100644
--- a/src/test/ui/nll/constant-thread-locals-issue-47053.rs
+++ b/tests/ui/nll/constant-thread-locals-issue-47053.rs
diff --git a/src/test/ui/nll/constant-thread-locals-issue-47053.stderr b/tests/ui/nll/constant-thread-locals-issue-47053.stderr
index a44acfb5f..a44acfb5f 100644
--- a/src/test/ui/nll/constant-thread-locals-issue-47053.stderr
+++ b/tests/ui/nll/constant-thread-locals-issue-47053.stderr
diff --git a/src/test/ui/nll/constant.rs b/tests/ui/nll/constant.rs
index 47f0eadf9..47f0eadf9 100644
--- a/src/test/ui/nll/constant.rs
+++ b/tests/ui/nll/constant.rs
diff --git a/src/test/ui/nll/continue-after-missing-main.rs b/tests/ui/nll/continue-after-missing-main.rs
index 778639158..778639158 100644
--- a/src/test/ui/nll/continue-after-missing-main.rs
+++ b/tests/ui/nll/continue-after-missing-main.rs
diff --git a/src/test/ui/nll/continue-after-missing-main.stderr b/tests/ui/nll/continue-after-missing-main.stderr
index 0df8d8d70..0df8d8d70 100644
--- a/src/test/ui/nll/continue-after-missing-main.stderr
+++ b/tests/ui/nll/continue-after-missing-main.stderr
diff --git a/src/test/ui/nll/decl-macro-illegal-copy.rs b/tests/ui/nll/decl-macro-illegal-copy.rs
index f72432946..f72432946 100644
--- a/src/test/ui/nll/decl-macro-illegal-copy.rs
+++ b/tests/ui/nll/decl-macro-illegal-copy.rs
diff --git a/src/test/ui/nll/decl-macro-illegal-copy.stderr b/tests/ui/nll/decl-macro-illegal-copy.stderr
index 7948485bd..7948485bd 100644
--- a/src/test/ui/nll/decl-macro-illegal-copy.stderr
+++ b/tests/ui/nll/decl-macro-illegal-copy.stderr
diff --git a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.rs b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.rs
index 96c871946..96c871946 100644
--- a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.rs
+++ b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.rs
diff --git a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr
index 65be3b37e..65be3b37e 100644
--- a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr
+++ b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr
diff --git a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.rs b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.rs
index 99922cc51..99922cc51 100644
--- a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.rs
+++ b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.rs
diff --git a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr
index b811ba4fd..b811ba4fd 100644
--- a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr
+++ b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr
diff --git a/src/test/ui/nll/dont-print-desugared.rs b/tests/ui/nll/dont-print-desugared.rs
index 829d78ed4..829d78ed4 100644
--- a/src/test/ui/nll/dont-print-desugared.rs
+++ b/tests/ui/nll/dont-print-desugared.rs
diff --git a/src/test/ui/nll/dont-print-desugared.stderr b/tests/ui/nll/dont-print-desugared.stderr
index fad6121cb..fad6121cb 100644
--- a/src/test/ui/nll/dont-print-desugared.stderr
+++ b/tests/ui/nll/dont-print-desugared.stderr
diff --git a/src/test/ui/nll/drop-may-dangle.rs b/tests/ui/nll/drop-may-dangle.rs
index b5531c29b..b5531c29b 100644
--- a/src/test/ui/nll/drop-may-dangle.rs
+++ b/tests/ui/nll/drop-may-dangle.rs
diff --git a/src/test/ui/nll/drop-no-may-dangle.rs b/tests/ui/nll/drop-no-may-dangle.rs
index a0ff0c398..a0ff0c398 100644
--- a/src/test/ui/nll/drop-no-may-dangle.rs
+++ b/tests/ui/nll/drop-no-may-dangle.rs
diff --git a/src/test/ui/nll/drop-no-may-dangle.stderr b/tests/ui/nll/drop-no-may-dangle.stderr
index cb2808809..cb2808809 100644
--- a/src/test/ui/nll/drop-no-may-dangle.stderr
+++ b/tests/ui/nll/drop-no-may-dangle.stderr
diff --git a/src/test/ui/nll/empty-type-predicate-2.rs b/tests/ui/nll/empty-type-predicate-2.rs
index 20d6e47f7..20d6e47f7 100644
--- a/src/test/ui/nll/empty-type-predicate-2.rs
+++ b/tests/ui/nll/empty-type-predicate-2.rs
diff --git a/src/test/ui/nll/empty-type-predicate.rs b/tests/ui/nll/empty-type-predicate.rs
index d126a455d..d126a455d 100644
--- a/src/test/ui/nll/empty-type-predicate.rs
+++ b/tests/ui/nll/empty-type-predicate.rs
diff --git a/src/test/ui/nll/enum-drop-access.rs b/tests/ui/nll/enum-drop-access.rs
index 5ef0c3fe7..5ef0c3fe7 100644
--- a/src/test/ui/nll/enum-drop-access.rs
+++ b/tests/ui/nll/enum-drop-access.rs
diff --git a/src/test/ui/nll/enum-drop-access.stderr b/tests/ui/nll/enum-drop-access.stderr
index a532ae121..a532ae121 100644
--- a/src/test/ui/nll/enum-drop-access.stderr
+++ b/tests/ui/nll/enum-drop-access.stderr
diff --git a/src/test/ui/nll/extra-unused-mut.rs b/tests/ui/nll/extra-unused-mut.rs
index 340f2952a..340f2952a 100644
--- a/src/test/ui/nll/extra-unused-mut.rs
+++ b/tests/ui/nll/extra-unused-mut.rs
diff --git a/src/test/ui/nll/generator-distinct-lifetime.rs b/tests/ui/nll/generator-distinct-lifetime.rs
index 90fe6b569..90fe6b569 100644
--- a/src/test/ui/nll/generator-distinct-lifetime.rs
+++ b/tests/ui/nll/generator-distinct-lifetime.rs
diff --git a/src/test/ui/nll/generator-upvar-mutability.rs b/tests/ui/nll/generator-upvar-mutability.rs
index c49ea15b8..c49ea15b8 100644
--- a/src/test/ui/nll/generator-upvar-mutability.rs
+++ b/tests/ui/nll/generator-upvar-mutability.rs
diff --git a/src/test/ui/nll/generator-upvar-mutability.stderr b/tests/ui/nll/generator-upvar-mutability.stderr
index 31b061b61..31b061b61 100644
--- a/src/test/ui/nll/generator-upvar-mutability.stderr
+++ b/tests/ui/nll/generator-upvar-mutability.stderr
diff --git a/src/test/ui/nll/get_default.polonius.stderr b/tests/ui/nll/get_default.polonius.stderr
index 476d86cfb..476d86cfb 100644
--- a/src/test/ui/nll/get_default.polonius.stderr
+++ b/tests/ui/nll/get_default.polonius.stderr
diff --git a/src/test/ui/nll/get_default.rs b/tests/ui/nll/get_default.rs
index ffac8a33d..ffac8a33d 100644
--- a/src/test/ui/nll/get_default.rs
+++ b/tests/ui/nll/get_default.rs
diff --git a/src/test/ui/nll/get_default.stderr b/tests/ui/nll/get_default.stderr
index 6998c0433..6998c0433 100644
--- a/src/test/ui/nll/get_default.stderr
+++ b/tests/ui/nll/get_default.stderr
diff --git a/src/test/ui/nll/guarantor-issue-46974.rs b/tests/ui/nll/guarantor-issue-46974.rs
index 96af4bf5c..96af4bf5c 100644
--- a/src/test/ui/nll/guarantor-issue-46974.rs
+++ b/tests/ui/nll/guarantor-issue-46974.rs
diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/tests/ui/nll/guarantor-issue-46974.stderr
index 8854dd8d6..8854dd8d6 100644
--- a/src/test/ui/nll/guarantor-issue-46974.stderr
+++ b/tests/ui/nll/guarantor-issue-46974.stderr
diff --git a/src/test/ui/nll/issue-16223.rs b/tests/ui/nll/issue-16223.rs
index 0ae0ed3d8..0ae0ed3d8 100644
--- a/src/test/ui/nll/issue-16223.rs
+++ b/tests/ui/nll/issue-16223.rs
diff --git a/src/test/ui/nll/issue-21114-ebfull.rs b/tests/ui/nll/issue-21114-ebfull.rs
index fc4a6845a..fc4a6845a 100644
--- a/src/test/ui/nll/issue-21114-ebfull.rs
+++ b/tests/ui/nll/issue-21114-ebfull.rs
diff --git a/src/test/ui/nll/issue-21114-kixunil.rs b/tests/ui/nll/issue-21114-kixunil.rs
index 666f89f35..666f89f35 100644
--- a/src/test/ui/nll/issue-21114-kixunil.rs
+++ b/tests/ui/nll/issue-21114-kixunil.rs
diff --git a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs b/tests/ui/nll/issue-21232-partial-init-and-erroneous-use.rs
index 46a156d2a..46a156d2a 100644
--- a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs
+++ b/tests/ui/nll/issue-21232-partial-init-and-erroneous-use.rs
diff --git a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr b/tests/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr
index 63f230be7..63f230be7 100644
--- a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr
+++ b/tests/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr
diff --git a/src/test/ui/nll/issue-21232-partial-init-and-use.rs b/tests/ui/nll/issue-21232-partial-init-and-use.rs
index ad3eb2483..ad3eb2483 100644
--- a/src/test/ui/nll/issue-21232-partial-init-and-use.rs
+++ b/tests/ui/nll/issue-21232-partial-init-and-use.rs
diff --git a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr b/tests/ui/nll/issue-21232-partial-init-and-use.stderr
index 97ed414b1..97ed414b1 100644
--- a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr
+++ b/tests/ui/nll/issue-21232-partial-init-and-use.stderr
diff --git a/src/test/ui/nll/issue-22323-temp-destruction.rs b/tests/ui/nll/issue-22323-temp-destruction.rs
index 3f2ece1cf..3f2ece1cf 100644
--- a/src/test/ui/nll/issue-22323-temp-destruction.rs
+++ b/tests/ui/nll/issue-22323-temp-destruction.rs
diff --git a/src/test/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs b/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs
index 7253d35ed..ccfc8937f 100644
--- a/src/test/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs
+++ b/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs
@@ -5,6 +5,8 @@
// See further discussion on rust-lang/rust#24535,
// rust-lang/rfcs#1006, and rust-lang/rfcs#107
+#![feature(if_let_guard)]
+
fn main() {
rust_issue_24535();
rfcs_issue_1006_1();
@@ -23,6 +25,12 @@ fn rust_issue_24535() {
3 if compare(&a, &mut 3) => (),
_ => panic!("nope"),
}
+
+ match a {
+ 0 => panic!("nope"),
+ 3 if let true = compare(&a, &mut 3) => (),
+ _ => panic!("nope"),
+ }
}
fn rfcs_issue_1006_1() {
diff --git a/tests/ui/nll/issue-27282-move-match-input-into-guard.rs b/tests/ui/nll/issue-27282-move-match-input-into-guard.rs
new file mode 100644
index 000000000..85feda582
--- /dev/null
+++ b/tests/ui/nll/issue-27282-move-match-input-into-guard.rs
@@ -0,0 +1,34 @@
+// Issue 27282: Example 2: This sidesteps the AST checks disallowing
+// mutable borrows in match guards by hiding the mutable borrow in a
+// guard behind a move (of the mutably borrowed match input) within a
+// closure.
+//
+// This example is not rejected by AST borrowck (and then reliably
+// reaches the panic code when executed, despite the compiler warning
+// about that match arm being unreachable.
+
+#![feature(if_let_guard)]
+
+fn main() {
+ let b = &mut true;
+ match b {
+ //~^ ERROR use of moved value: `b` [E0382]
+ &mut false => {},
+ _ if { (|| { let bar = b; *bar = false; })();
+ false } => { },
+ &mut true => { println!("You might think we should get here"); },
+ _ => panic!("surely we could never get here, since rustc warns it is unreachable."),
+ }
+
+ let b = &mut true;
+ match b {
+ //~^ ERROR use of moved value: `b` [E0382]
+ &mut false => {}
+ _ if let Some(()) = {
+ (|| { let bar = b; *bar = false; })();
+ None
+ } => {}
+ &mut true => {}
+ _ => {}
+ }
+}
diff --git a/tests/ui/nll/issue-27282-move-match-input-into-guard.stderr b/tests/ui/nll/issue-27282-move-match-input-into-guard.stderr
new file mode 100644
index 000000000..ae7978004
--- /dev/null
+++ b/tests/ui/nll/issue-27282-move-match-input-into-guard.stderr
@@ -0,0 +1,29 @@
+error[E0382]: use of moved value: `b`
+ --> $DIR/issue-27282-move-match-input-into-guard.rs:14:5
+ |
+LL | let b = &mut true;
+ | - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
+LL | match b {
+ | ^^^^^^^ value used here after move
+...
+LL | _ if { (|| { let bar = b; *bar = false; })();
+ | -- - variable moved due to use in closure
+ | |
+ | value moved into closure here
+
+error[E0382]: use of moved value: `b`
+ --> $DIR/issue-27282-move-match-input-into-guard.rs:24:5
+ |
+LL | let b = &mut true;
+ | - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
+LL | match b {
+ | ^^^^^^^ value used here after move
+...
+LL | (|| { let bar = b; *bar = false; })();
+ | -- - variable moved due to use in closure
+ | |
+ | value moved into closure here
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/nll/issue-27282-move-ref-mut-into-guard.rs b/tests/ui/nll/issue-27282-move-ref-mut-into-guard.rs
new file mode 100644
index 000000000..833ca8afd
--- /dev/null
+++ b/tests/ui/nll/issue-27282-move-ref-mut-into-guard.rs
@@ -0,0 +1,23 @@
+// Issue 27282: Example 1: This sidesteps the AST checks disallowing
+// mutable borrows in match guards by hiding the mutable borrow in a
+// guard behind a move (of the ref mut pattern id) within a closure.
+
+#![feature(if_let_guard)]
+
+fn main() {
+ match Some(&4) {
+ None => {},
+ ref mut foo
+ if { (|| { let bar = foo; bar.take() })(); false } => {},
+ //~^ ERROR cannot move out of `foo` in pattern guard [E0507]
+ Some(s) => std::process::exit(*s),
+ }
+
+ match Some(&4) {
+ None => {},
+ ref mut foo
+ if let Some(()) = { (|| { let bar = foo; bar.take() })(); None } => {},
+ //~^ ERROR cannot move out of `foo` in pattern guard [E0507]
+ Some(s) => std::process::exit(*s),
+ }
+}
diff --git a/tests/ui/nll/issue-27282-move-ref-mut-into-guard.stderr b/tests/ui/nll/issue-27282-move-ref-mut-into-guard.stderr
new file mode 100644
index 000000000..45119018d
--- /dev/null
+++ b/tests/ui/nll/issue-27282-move-ref-mut-into-guard.stderr
@@ -0,0 +1,23 @@
+error[E0507]: cannot move out of `foo` in pattern guard
+ --> $DIR/issue-27282-move-ref-mut-into-guard.rs:11:19
+ |
+LL | if { (|| { let bar = foo; bar.take() })(); false } => {},
+ | ^^ --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
+ | |
+ | move out of `foo` occurs here
+ |
+ = note: variables bound in patterns cannot be moved from until after the end of the pattern guard
+
+error[E0507]: cannot move out of `foo` in pattern guard
+ --> $DIR/issue-27282-move-ref-mut-into-guard.rs:19:34
+ |
+LL | if let Some(()) = { (|| { let bar = foo; bar.take() })(); None } => {},
+ | ^^ --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
+ | |
+ | move out of `foo` occurs here
+ |
+ = note: variables bound in patterns cannot be moved from until after the end of the pattern guard
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs
index d17d6f07f..d17d6f07f 100644
--- a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs
diff --git a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr
index a1f973e0f..a1f973e0f 100644
--- a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr
diff --git a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs
index 9c3e7e997..9c3e7e997 100644
--- a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs
diff --git a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr
index dd46308d1..dd46308d1 100644
--- a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr
diff --git a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs
index cff9e963e..cff9e963e 100644
--- a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs
diff --git a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr
index 4a4a25790..4a4a25790 100644
--- a/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr
diff --git a/tests/ui/nll/issue-27282-mutation-in-guard.rs b/tests/ui/nll/issue-27282-mutation-in-guard.rs
new file mode 100644
index 000000000..4f41fc23f
--- /dev/null
+++ b/tests/ui/nll/issue-27282-mutation-in-guard.rs
@@ -0,0 +1,26 @@
+#![feature(if_let_guard)]
+
+fn main() {
+ match Some(&4) {
+ None => {},
+ ref mut foo
+ if {
+ (|| { let bar = foo; bar.take() })();
+ //~^ ERROR cannot move out of `foo` in pattern guard
+ false
+ } => {},
+ Some(ref _s) => println!("Note this arm is bogus; the `Some` became `None` in the guard."),
+ _ => println!("Here is some supposedly unreachable code."),
+ }
+
+ match Some(&4) {
+ None => {},
+ ref mut foo
+ if let Some(()) = {
+ (|| { let bar = foo; bar.take() })();
+ //~^ ERROR cannot move out of `foo` in pattern guard
+ None
+ } => {},
+ Some(_) => {},
+ }
+}
diff --git a/tests/ui/nll/issue-27282-mutation-in-guard.stderr b/tests/ui/nll/issue-27282-mutation-in-guard.stderr
new file mode 100644
index 000000000..1ba696593
--- /dev/null
+++ b/tests/ui/nll/issue-27282-mutation-in-guard.stderr
@@ -0,0 +1,23 @@
+error[E0507]: cannot move out of `foo` in pattern guard
+ --> $DIR/issue-27282-mutation-in-guard.rs:8:18
+ |
+LL | (|| { let bar = foo; bar.take() })();
+ | ^^ --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
+ | |
+ | move out of `foo` occurs here
+ |
+ = note: variables bound in patterns cannot be moved from until after the end of the pattern guard
+
+error[E0507]: cannot move out of `foo` in pattern guard
+ --> $DIR/issue-27282-mutation-in-guard.rs:20:18
+ |
+LL | (|| { let bar = foo; bar.take() })();
+ | ^^ --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
+ | |
+ | move out of `foo` occurs here
+ |
+ = note: variables bound in patterns cannot be moved from until after the end of the pattern guard
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.rs b/tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.rs
new file mode 100644
index 000000000..ac06b2b01
--- /dev/null
+++ b/tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.rs
@@ -0,0 +1,30 @@
+// Issue 27282: This is a variation on issue-27282-move-ref-mut-into-guard.rs
+//
+// It reborrows instead of moving the `ref mut` pattern borrow. This
+// means that our conservative check for mutation in guards will
+// reject it. But I want to make sure that we continue to reject it
+// (under NLL) even when that conservative check goes away.
+
+#![feature(if_let_guard)]
+
+fn main() {
+ let mut b = &mut true;
+ match b {
+ &mut false => {},
+ ref mut r if { (|| { let bar = &mut *r; **bar = false; })();
+ //~^ ERROR cannot borrow `r` as mutable, as it is immutable for the pattern guard
+ false } => { &mut *r; },
+ &mut true => { println!("You might think we should get here"); },
+ _ => panic!("surely we could never get here, since rustc warns it is unreachable."),
+ }
+
+ let mut b = &mut true;
+ match b {
+ &mut false => {},
+ ref mut r if let Some(()) = { (|| { let bar = &mut *r; **bar = false; })();
+ //~^ ERROR cannot borrow `r` as mutable, as it is immutable for the pattern guard
+ None } => { &mut *r; },
+ &mut true => {},
+ _ => {},
+ }
+}
diff --git a/tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.stderr b/tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.stderr
new file mode 100644
index 000000000..5eb7a25bf
--- /dev/null
+++ b/tests/ui/nll/issue-27282-reborrow-ref-mut-in-guard.stderr
@@ -0,0 +1,23 @@
+error[E0596]: cannot borrow `r` as mutable, as it is immutable for the pattern guard
+ --> $DIR/issue-27282-reborrow-ref-mut-in-guard.rs:14:25
+ |
+LL | ref mut r if { (|| { let bar = &mut *r; **bar = false; })();
+ | ^^ -- mutable borrow occurs due to use of `r` in closure
+ | |
+ | cannot borrow as mutable
+ |
+ = note: variables bound in patterns are immutable until the end of the pattern guard
+
+error[E0596]: cannot borrow `r` as mutable, as it is immutable for the pattern guard
+ --> $DIR/issue-27282-reborrow-ref-mut-in-guard.rs:24:40
+ |
+LL | ref mut r if let Some(()) = { (|| { let bar = &mut *r; **bar = false; })();
+ | ^^ -- mutable borrow occurs due to use of `r` in closure
+ | |
+ | cannot borrow as mutable
+ |
+ = note: variables bound in patterns are immutable until the end of the pattern guard
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/src/test/ui/nll/issue-27868.rs b/tests/ui/nll/issue-27868.rs
index e436b22db..e436b22db 100644
--- a/src/test/ui/nll/issue-27868.rs
+++ b/tests/ui/nll/issue-27868.rs
diff --git a/src/test/ui/nll/issue-27868.stderr b/tests/ui/nll/issue-27868.stderr
index e0b3b5494..e0b3b5494 100644
--- a/src/test/ui/nll/issue-27868.stderr
+++ b/tests/ui/nll/issue-27868.stderr
diff --git a/src/test/ui/nll/issue-30104.rs b/tests/ui/nll/issue-30104.rs
index 38850cd3f..38850cd3f 100644
--- a/src/test/ui/nll/issue-30104.rs
+++ b/tests/ui/nll/issue-30104.rs
diff --git a/src/test/ui/nll/issue-31567.rs b/tests/ui/nll/issue-31567.rs
index 623954e6d..623954e6d 100644
--- a/src/test/ui/nll/issue-31567.rs
+++ b/tests/ui/nll/issue-31567.rs
diff --git a/src/test/ui/nll/issue-31567.stderr b/tests/ui/nll/issue-31567.stderr
index 7d43383e8..7d43383e8 100644
--- a/src/test/ui/nll/issue-31567.stderr
+++ b/tests/ui/nll/issue-31567.stderr
diff --git a/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs b/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs
index a8a8e6930..a8a8e6930 100644
--- a/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs
+++ b/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs
diff --git a/src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.rs b/tests/ui/nll/issue-42574-diagnostic-in-nested-closure.rs
index 0ec0179e8..0ec0179e8 100644
--- a/src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.rs
+++ b/tests/ui/nll/issue-42574-diagnostic-in-nested-closure.rs
diff --git a/src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.stderr b/tests/ui/nll/issue-42574-diagnostic-in-nested-closure.stderr
index f7a525ee9..f7a525ee9 100644
--- a/src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.stderr
+++ b/tests/ui/nll/issue-42574-diagnostic-in-nested-closure.stderr
diff --git a/src/test/ui/nll/issue-43058.rs b/tests/ui/nll/issue-43058.rs
index 227888d17..227888d17 100644
--- a/src/test/ui/nll/issue-43058.rs
+++ b/tests/ui/nll/issue-43058.rs
diff --git a/src/test/ui/nll/issue-45157.rs b/tests/ui/nll/issue-45157.rs
index 8d2bf22a0..8d2bf22a0 100644
--- a/src/test/ui/nll/issue-45157.rs
+++ b/tests/ui/nll/issue-45157.rs
diff --git a/src/test/ui/nll/issue-45157.stderr b/tests/ui/nll/issue-45157.stderr
index 57fd8d49c..57fd8d49c 100644
--- a/src/test/ui/nll/issue-45157.stderr
+++ b/tests/ui/nll/issue-45157.stderr
diff --git a/src/test/ui/nll/issue-45696-long-live-borrows-in-boxes.rs b/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs
index b3f655628..b3f655628 100644
--- a/src/test/ui/nll/issue-45696-long-live-borrows-in-boxes.rs
+++ b/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs
diff --git a/src/test/ui/nll/issue-45696-no-variant-box-recur.rs b/tests/ui/nll/issue-45696-no-variant-box-recur.rs
index 39f1607a3..39f1607a3 100644
--- a/src/test/ui/nll/issue-45696-no-variant-box-recur.rs
+++ b/tests/ui/nll/issue-45696-no-variant-box-recur.rs
diff --git a/src/test/ui/nll/issue-45696-scribble-on-boxed-borrow.rs b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs
index 637cf278f..637cf278f 100644
--- a/src/test/ui/nll/issue-45696-scribble-on-boxed-borrow.rs
+++ b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs
diff --git a/src/test/ui/nll/issue-45696-scribble-on-boxed-borrow.stderr b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.stderr
index db0a17199..db0a17199 100644
--- a/src/test/ui/nll/issue-45696-scribble-on-boxed-borrow.stderr
+++ b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.stderr
diff --git a/src/test/ui/nll/issue-46023.rs b/tests/ui/nll/issue-46023.rs
index a923eb244..a923eb244 100644
--- a/src/test/ui/nll/issue-46023.rs
+++ b/tests/ui/nll/issue-46023.rs
diff --git a/src/test/ui/nll/issue-46023.stderr b/tests/ui/nll/issue-46023.stderr
index ca19c2501..ca19c2501 100644
--- a/src/test/ui/nll/issue-46023.stderr
+++ b/tests/ui/nll/issue-46023.stderr
diff --git a/src/test/ui/nll/issue-46036.rs b/tests/ui/nll/issue-46036.rs
index 18af33c18..18af33c18 100644
--- a/src/test/ui/nll/issue-46036.rs
+++ b/tests/ui/nll/issue-46036.rs
diff --git a/src/test/ui/nll/issue-46036.stderr b/tests/ui/nll/issue-46036.stderr
index e6e95ee61..e6e95ee61 100644
--- a/src/test/ui/nll/issue-46036.stderr
+++ b/tests/ui/nll/issue-46036.stderr
diff --git a/src/test/ui/nll/issue-46589.rs b/tests/ui/nll/issue-46589.rs
index 0a4c20d15..0a4c20d15 100644
--- a/src/test/ui/nll/issue-46589.rs
+++ b/tests/ui/nll/issue-46589.rs
diff --git a/src/test/ui/nll/issue-46589.stderr b/tests/ui/nll/issue-46589.stderr
index 60ef3f7b8..60ef3f7b8 100644
--- a/src/test/ui/nll/issue-46589.stderr
+++ b/tests/ui/nll/issue-46589.stderr
diff --git a/src/test/ui/nll/issue-47022.rs b/tests/ui/nll/issue-47022.rs
index 521643c66..521643c66 100644
--- a/src/test/ui/nll/issue-47022.rs
+++ b/tests/ui/nll/issue-47022.rs
diff --git a/src/test/ui/nll/issue-47153-generic-const.rs b/tests/ui/nll/issue-47153-generic-const.rs
index 9f4d57111..9f4d57111 100644
--- a/src/test/ui/nll/issue-47153-generic-const.rs
+++ b/tests/ui/nll/issue-47153-generic-const.rs
diff --git a/src/test/ui/nll/issue-47388.rs b/tests/ui/nll/issue-47388.rs
index 207af380e..207af380e 100644
--- a/src/test/ui/nll/issue-47388.rs
+++ b/tests/ui/nll/issue-47388.rs
diff --git a/tests/ui/nll/issue-47388.stderr b/tests/ui/nll/issue-47388.stderr
new file mode 100644
index 000000000..c780451df
--- /dev/null
+++ b/tests/ui/nll/issue-47388.stderr
@@ -0,0 +1,14 @@
+error[E0594]: cannot assign to `fancy_ref.num`, which is behind a `&` reference
+ --> $DIR/issue-47388.rs:8:5
+ |
+LL | fancy_ref.num = 6;
+ | ^^^^^^^^^^^^^^^^^ `fancy_ref` is a `&` reference, so the data it refers to cannot be written
+ |
+help: consider changing this to be a mutable reference
+ |
+LL | let fancy_ref = &mut (&mut fancy);
+ | ~~~~~~~~~~~~~~~~~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0594`.
diff --git a/src/test/ui/nll/issue-47470.rs b/tests/ui/nll/issue-47470.rs
index 72ee7f886..72ee7f886 100644
--- a/src/test/ui/nll/issue-47470.rs
+++ b/tests/ui/nll/issue-47470.rs
diff --git a/src/test/ui/nll/issue-47470.stderr b/tests/ui/nll/issue-47470.stderr
index 0b1247d60..0b1247d60 100644
--- a/src/test/ui/nll/issue-47470.stderr
+++ b/tests/ui/nll/issue-47470.stderr
diff --git a/src/test/ui/nll/issue-47589.rs b/tests/ui/nll/issue-47589.rs
index 280bf0811..280bf0811 100644
--- a/src/test/ui/nll/issue-47589.rs
+++ b/tests/ui/nll/issue-47589.rs
diff --git a/src/test/ui/nll/issue-48070.rs b/tests/ui/nll/issue-48070.rs
index a9fe3521d..a9fe3521d 100644
--- a/src/test/ui/nll/issue-48070.rs
+++ b/tests/ui/nll/issue-48070.rs
diff --git a/src/test/ui/nll/issue-48238.rs b/tests/ui/nll/issue-48238.rs
index d2e9285fa..d2e9285fa 100644
--- a/src/test/ui/nll/issue-48238.rs
+++ b/tests/ui/nll/issue-48238.rs
diff --git a/src/test/ui/nll/issue-48238.stderr b/tests/ui/nll/issue-48238.stderr
index 0aa1eedad..0aa1eedad 100644
--- a/src/test/ui/nll/issue-48238.stderr
+++ b/tests/ui/nll/issue-48238.stderr
diff --git a/src/test/ui/nll/issue-48623-closure.rs b/tests/ui/nll/issue-48623-closure.rs
index 3f8587eed..3f8587eed 100644
--- a/src/test/ui/nll/issue-48623-closure.rs
+++ b/tests/ui/nll/issue-48623-closure.rs
diff --git a/src/test/ui/nll/issue-48623-generator.rs b/tests/ui/nll/issue-48623-generator.rs
index 08d2584ee..08d2584ee 100644
--- a/src/test/ui/nll/issue-48623-generator.rs
+++ b/tests/ui/nll/issue-48623-generator.rs
diff --git a/src/test/ui/nll/issue-48623-generator.stderr b/tests/ui/nll/issue-48623-generator.stderr
index bfdfca210..bfdfca210 100644
--- a/src/test/ui/nll/issue-48623-generator.stderr
+++ b/tests/ui/nll/issue-48623-generator.stderr
diff --git a/src/test/ui/nll/issue-48697.rs b/tests/ui/nll/issue-48697.rs
index 16e29ab2a..16e29ab2a 100644
--- a/src/test/ui/nll/issue-48697.rs
+++ b/tests/ui/nll/issue-48697.rs
diff --git a/src/test/ui/nll/issue-48697.stderr b/tests/ui/nll/issue-48697.stderr
index f0c29b72b..f0c29b72b 100644
--- a/src/test/ui/nll/issue-48697.stderr
+++ b/tests/ui/nll/issue-48697.stderr
diff --git a/src/test/ui/nll/issue-48803.rs b/tests/ui/nll/issue-48803.rs
index f7fd04179..f7fd04179 100644
--- a/src/test/ui/nll/issue-48803.rs
+++ b/tests/ui/nll/issue-48803.rs
diff --git a/src/test/ui/nll/issue-48803.stderr b/tests/ui/nll/issue-48803.stderr
index 2f94039c0..2f94039c0 100644
--- a/src/test/ui/nll/issue-48803.stderr
+++ b/tests/ui/nll/issue-48803.stderr
diff --git a/src/test/ui/nll/issue-50343.rs b/tests/ui/nll/issue-50343.rs
index dd0afbbdf..dd0afbbdf 100644
--- a/src/test/ui/nll/issue-50343.rs
+++ b/tests/ui/nll/issue-50343.rs
diff --git a/src/test/ui/nll/issue-50461-used-mut-from-moves.rs b/tests/ui/nll/issue-50461-used-mut-from-moves.rs
index 2458b171e..2458b171e 100644
--- a/src/test/ui/nll/issue-50461-used-mut-from-moves.rs
+++ b/tests/ui/nll/issue-50461-used-mut-from-moves.rs
diff --git a/src/test/ui/nll/issue-50716-1.rs b/tests/ui/nll/issue-50716-1.rs
index 9c3e24de4..9c3e24de4 100644
--- a/src/test/ui/nll/issue-50716-1.rs
+++ b/tests/ui/nll/issue-50716-1.rs
diff --git a/src/test/ui/nll/issue-50716.rs b/tests/ui/nll/issue-50716.rs
index c2fc345fa..c2fc345fa 100644
--- a/src/test/ui/nll/issue-50716.rs
+++ b/tests/ui/nll/issue-50716.rs
diff --git a/src/test/ui/nll/issue-50716.stderr b/tests/ui/nll/issue-50716.stderr
index 38dd1b5f6..38dd1b5f6 100644
--- a/src/test/ui/nll/issue-50716.stderr
+++ b/tests/ui/nll/issue-50716.stderr
diff --git a/src/test/ui/nll/issue-51191.rs b/tests/ui/nll/issue-51191.rs
index 836587d93..836587d93 100644
--- a/src/test/ui/nll/issue-51191.rs
+++ b/tests/ui/nll/issue-51191.rs
diff --git a/src/test/ui/nll/issue-51191.stderr b/tests/ui/nll/issue-51191.stderr
index 63ca6ae5c..27b1f8705 100644
--- a/src/test/ui/nll/issue-51191.stderr
+++ b/tests/ui/nll/issue-51191.stderr
@@ -30,10 +30,13 @@ LL | (&mut self).bar();
error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
--> $DIR/issue-51191.rs:13:9
|
-LL | fn imm(self) {
- | ---- help: consider changing this to be mutable: `mut self`
LL | (&mut self).bar();
| ^^^^^^^^^^^ cannot borrow as mutable
+ |
+help: consider changing this to be mutable
+ |
+LL | fn imm(mut self) {
+ | +++
error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
--> $DIR/issue-51191.rs:22:9
diff --git a/src/test/ui/nll/issue-51244.rs b/tests/ui/nll/issue-51244.rs
index c4cbee675..c4cbee675 100644
--- a/src/test/ui/nll/issue-51244.rs
+++ b/tests/ui/nll/issue-51244.rs
diff --git a/tests/ui/nll/issue-51244.stderr b/tests/ui/nll/issue-51244.stderr
new file mode 100644
index 000000000..03d8acc81
--- /dev/null
+++ b/tests/ui/nll/issue-51244.stderr
@@ -0,0 +1,14 @@
+error[E0594]: cannot assign to `*my_ref`, which is behind a `&` reference
+ --> $DIR/issue-51244.rs:3:5
+ |
+LL | *my_ref = 0;
+ | ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written
+ |
+help: consider changing this to be a mutable reference
+ |
+LL | let ref mut my_ref @ _ = 0;
+ | ~~~~~~~~~~~~~~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0594`.
diff --git a/src/test/ui/nll/issue-51268.rs b/tests/ui/nll/issue-51268.rs
index dcdedf7d4..dcdedf7d4 100644
--- a/src/test/ui/nll/issue-51268.rs
+++ b/tests/ui/nll/issue-51268.rs
diff --git a/src/test/ui/nll/issue-51268.stderr b/tests/ui/nll/issue-51268.stderr
index 0483bda63..0483bda63 100644
--- a/src/test/ui/nll/issue-51268.stderr
+++ b/tests/ui/nll/issue-51268.stderr
diff --git a/src/test/ui/nll/issue-51345-2.rs b/tests/ui/nll/issue-51345-2.rs
index 52f342a85..52f342a85 100644
--- a/src/test/ui/nll/issue-51345-2.rs
+++ b/tests/ui/nll/issue-51345-2.rs
diff --git a/src/test/ui/nll/issue-51351.rs b/tests/ui/nll/issue-51351.rs
index 591d49584..591d49584 100644
--- a/src/test/ui/nll/issue-51351.rs
+++ b/tests/ui/nll/issue-51351.rs
diff --git a/src/test/ui/nll/issue-51512.rs b/tests/ui/nll/issue-51512.rs
index 691760eb9..691760eb9 100644
--- a/src/test/ui/nll/issue-51512.rs
+++ b/tests/ui/nll/issue-51512.rs
diff --git a/src/test/ui/nll/issue-51512.stderr b/tests/ui/nll/issue-51512.stderr
index 072e96788..072e96788 100644
--- a/src/test/ui/nll/issue-51512.stderr
+++ b/tests/ui/nll/issue-51512.stderr
diff --git a/src/test/ui/nll/issue-51770.rs b/tests/ui/nll/issue-51770.rs
index 3d6bc82f1..3d6bc82f1 100644
--- a/src/test/ui/nll/issue-51770.rs
+++ b/tests/ui/nll/issue-51770.rs
diff --git a/src/test/ui/nll/issue-52057.rs b/tests/ui/nll/issue-52057.rs
index 98f49fe8f..98f49fe8f 100644
--- a/src/test/ui/nll/issue-52057.rs
+++ b/tests/ui/nll/issue-52057.rs
diff --git a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs b/tests/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs
index 7ea1c445d..7ea1c445d 100644
--- a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs
+++ b/tests/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs
diff --git a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr b/tests/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr
index c0a17a67e..7f9cbc3c3 100644
--- a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr
+++ b/tests/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr
@@ -36,7 +36,11 @@ LL | let p = s.url; p
| |
| cannot move out of here
| move occurs because `s.url` has type `&mut String`, which does not implement the `Copy` trait
- | help: consider borrowing here: `&s.url`
+ |
+help: consider borrowing here
+ |
+LL | let p = &s.url; p
+ | +
error: aborting due to 4 previous errors
diff --git a/src/test/ui/nll/issue-52078.rs b/tests/ui/nll/issue-52078.rs
index a2bcb91ac..a2bcb91ac 100644
--- a/src/test/ui/nll/issue-52078.rs
+++ b/tests/ui/nll/issue-52078.rs
diff --git a/src/test/ui/nll/issue-52086.rs b/tests/ui/nll/issue-52086.rs
index 0414428e4..0414428e4 100644
--- a/src/test/ui/nll/issue-52086.rs
+++ b/tests/ui/nll/issue-52086.rs
diff --git a/src/test/ui/nll/issue-52086.stderr b/tests/ui/nll/issue-52086.stderr
index 3b2dae9b7..3b2dae9b7 100644
--- a/src/test/ui/nll/issue-52086.stderr
+++ b/tests/ui/nll/issue-52086.stderr
diff --git a/src/test/ui/nll/issue-52113.rs b/tests/ui/nll/issue-52113.rs
index ffaef272a..ffaef272a 100644
--- a/src/test/ui/nll/issue-52113.rs
+++ b/tests/ui/nll/issue-52113.rs
diff --git a/src/test/ui/nll/issue-52113.stderr b/tests/ui/nll/issue-52113.stderr
index 84d4eb266..84d4eb266 100644
--- a/src/test/ui/nll/issue-52113.stderr
+++ b/tests/ui/nll/issue-52113.stderr
diff --git a/src/test/ui/nll/issue-52213.rs b/tests/ui/nll/issue-52213.rs
index a016924a8..a016924a8 100644
--- a/src/test/ui/nll/issue-52213.rs
+++ b/tests/ui/nll/issue-52213.rs
diff --git a/src/test/ui/nll/issue-52213.stderr b/tests/ui/nll/issue-52213.stderr
index da31bcd54..da31bcd54 100644
--- a/src/test/ui/nll/issue-52213.stderr
+++ b/tests/ui/nll/issue-52213.stderr
diff --git a/src/test/ui/nll/issue-52533-1.rs b/tests/ui/nll/issue-52533-1.rs
index d15daeddc..d15daeddc 100644
--- a/src/test/ui/nll/issue-52533-1.rs
+++ b/tests/ui/nll/issue-52533-1.rs
diff --git a/src/test/ui/nll/issue-52533-1.stderr b/tests/ui/nll/issue-52533-1.stderr
index 20f19b259..20f19b259 100644
--- a/src/test/ui/nll/issue-52533-1.stderr
+++ b/tests/ui/nll/issue-52533-1.stderr
diff --git a/src/test/ui/nll/issue-52534-1.rs b/tests/ui/nll/issue-52534-1.rs
index d9ea3ae42..d9ea3ae42 100644
--- a/src/test/ui/nll/issue-52534-1.rs
+++ b/tests/ui/nll/issue-52534-1.rs
diff --git a/src/test/ui/nll/issue-52534-1.stderr b/tests/ui/nll/issue-52534-1.stderr
index 743179f05..743179f05 100644
--- a/src/test/ui/nll/issue-52534-1.stderr
+++ b/tests/ui/nll/issue-52534-1.stderr
diff --git a/src/test/ui/nll/issue-52534-2.rs b/tests/ui/nll/issue-52534-2.rs
index e416264ed..e416264ed 100644
--- a/src/test/ui/nll/issue-52534-2.rs
+++ b/tests/ui/nll/issue-52534-2.rs
diff --git a/src/test/ui/nll/issue-52534-2.stderr b/tests/ui/nll/issue-52534-2.stderr
index ac385e056..ac385e056 100644
--- a/src/test/ui/nll/issue-52534-2.stderr
+++ b/tests/ui/nll/issue-52534-2.stderr
diff --git a/src/test/ui/nll/issue-52534.rs b/tests/ui/nll/issue-52534.rs
index 559d4c859..559d4c859 100644
--- a/src/test/ui/nll/issue-52534.rs
+++ b/tests/ui/nll/issue-52534.rs
diff --git a/src/test/ui/nll/issue-52534.stderr b/tests/ui/nll/issue-52534.stderr
index b2b727fd4..b2b727fd4 100644
--- a/src/test/ui/nll/issue-52534.stderr
+++ b/tests/ui/nll/issue-52534.stderr
diff --git a/src/test/ui/nll/issue-52663-span-decl-captured-variable.rs b/tests/ui/nll/issue-52663-span-decl-captured-variable.rs
index cd1f457a1..cd1f457a1 100644
--- a/src/test/ui/nll/issue-52663-span-decl-captured-variable.rs
+++ b/tests/ui/nll/issue-52663-span-decl-captured-variable.rs
diff --git a/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr b/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
index fb61b30f0..fb61b30f0 100644
--- a/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr
+++ b/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
diff --git a/src/test/ui/nll/issue-52663-trait-object.rs b/tests/ui/nll/issue-52663-trait-object.rs
index f6bbb2d14..f6bbb2d14 100644
--- a/src/test/ui/nll/issue-52663-trait-object.rs
+++ b/tests/ui/nll/issue-52663-trait-object.rs
diff --git a/src/test/ui/nll/issue-52663-trait-object.stderr b/tests/ui/nll/issue-52663-trait-object.stderr
index 5cedea6e6..5cedea6e6 100644
--- a/src/test/ui/nll/issue-52663-trait-object.stderr
+++ b/tests/ui/nll/issue-52663-trait-object.stderr
diff --git a/src/test/ui/nll/issue-52669.rs b/tests/ui/nll/issue-52669.rs
index e33528ac5..e33528ac5 100644
--- a/src/test/ui/nll/issue-52669.rs
+++ b/tests/ui/nll/issue-52669.rs
diff --git a/src/test/ui/nll/issue-52669.stderr b/tests/ui/nll/issue-52669.stderr
index 807b95f7e..807b95f7e 100644
--- a/src/test/ui/nll/issue-52669.stderr
+++ b/tests/ui/nll/issue-52669.stderr
diff --git a/src/test/ui/nll/issue-52742.rs b/tests/ui/nll/issue-52742.rs
index d3e201b8a..d3e201b8a 100644
--- a/src/test/ui/nll/issue-52742.rs
+++ b/tests/ui/nll/issue-52742.rs
diff --git a/src/test/ui/nll/issue-52742.stderr b/tests/ui/nll/issue-52742.stderr
index a79738296..a79738296 100644
--- a/src/test/ui/nll/issue-52742.stderr
+++ b/tests/ui/nll/issue-52742.stderr
diff --git a/src/test/ui/nll/issue-52992.rs b/tests/ui/nll/issue-52992.rs
index 530d1a61b..530d1a61b 100644
--- a/src/test/ui/nll/issue-52992.rs
+++ b/tests/ui/nll/issue-52992.rs
diff --git a/src/test/ui/nll/issue-53040.rs b/tests/ui/nll/issue-53040.rs
index e4ee6e913..e4ee6e913 100644
--- a/src/test/ui/nll/issue-53040.rs
+++ b/tests/ui/nll/issue-53040.rs
diff --git a/src/test/ui/nll/issue-53040.stderr b/tests/ui/nll/issue-53040.stderr
index 87ffe9b1a..87ffe9b1a 100644
--- a/src/test/ui/nll/issue-53040.stderr
+++ b/tests/ui/nll/issue-53040.stderr
diff --git a/src/test/ui/nll/issue-53119.rs b/tests/ui/nll/issue-53119.rs
index 03c9c071c..03c9c071c 100644
--- a/src/test/ui/nll/issue-53119.rs
+++ b/tests/ui/nll/issue-53119.rs
diff --git a/src/test/ui/nll/issue-53123-raw-pointer-cast.rs b/tests/ui/nll/issue-53123-raw-pointer-cast.rs
index 941c9eeb4..941c9eeb4 100644
--- a/src/test/ui/nll/issue-53123-raw-pointer-cast.rs
+++ b/tests/ui/nll/issue-53123-raw-pointer-cast.rs
diff --git a/src/test/ui/nll/issue-53570.rs b/tests/ui/nll/issue-53570.rs
index 35860ba9c..35860ba9c 100644
--- a/src/test/ui/nll/issue-53570.rs
+++ b/tests/ui/nll/issue-53570.rs
diff --git a/src/test/ui/nll/issue-53773.rs b/tests/ui/nll/issue-53773.rs
index ed971b6ce..ed971b6ce 100644
--- a/src/test/ui/nll/issue-53773.rs
+++ b/tests/ui/nll/issue-53773.rs
diff --git a/src/test/ui/nll/issue-53773.stderr b/tests/ui/nll/issue-53773.stderr
index 90cba2a14..90cba2a14 100644
--- a/src/test/ui/nll/issue-53773.stderr
+++ b/tests/ui/nll/issue-53773.stderr
diff --git a/src/test/ui/nll/issue-53807.rs b/tests/ui/nll/issue-53807.rs
index d494f7e15..d494f7e15 100644
--- a/src/test/ui/nll/issue-53807.rs
+++ b/tests/ui/nll/issue-53807.rs
diff --git a/src/test/ui/nll/issue-53807.stderr b/tests/ui/nll/issue-53807.stderr
index d8f58b591..d8f58b591 100644
--- a/src/test/ui/nll/issue-53807.stderr
+++ b/tests/ui/nll/issue-53807.stderr
diff --git a/src/test/ui/issues/issue-54189.rs b/tests/ui/nll/issue-54189.rs
index 70aecc384..70aecc384 100644
--- a/src/test/ui/issues/issue-54189.rs
+++ b/tests/ui/nll/issue-54189.rs
diff --git a/src/test/ui/issues/issue-54189.stderr b/tests/ui/nll/issue-54189.stderr
index 4787abd49..4787abd49 100644
--- a/src/test/ui/issues/issue-54189.stderr
+++ b/tests/ui/nll/issue-54189.stderr
diff --git a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.rs b/tests/ui/nll/issue-54382-use-span-of-tail-of-block.rs
index 312e6dce8..312e6dce8 100644
--- a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.rs
+++ b/tests/ui/nll/issue-54382-use-span-of-tail-of-block.rs
diff --git a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr b/tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr
index d8f43cbc9..d8f43cbc9 100644
--- a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr
+++ b/tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr
diff --git a/src/test/ui/nll/issue-54556-niconii.rs b/tests/ui/nll/issue-54556-niconii.rs
index cae389e8c..cae389e8c 100644
--- a/src/test/ui/nll/issue-54556-niconii.rs
+++ b/tests/ui/nll/issue-54556-niconii.rs
diff --git a/src/test/ui/nll/issue-54556-niconii.stderr b/tests/ui/nll/issue-54556-niconii.stderr
index a8e1edc54..a8e1edc54 100644
--- a/src/test/ui/nll/issue-54556-niconii.stderr
+++ b/tests/ui/nll/issue-54556-niconii.stderr
diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.rs b/tests/ui/nll/issue-54556-stephaneyfx.rs
index b758228e4..b758228e4 100644
--- a/src/test/ui/nll/issue-54556-stephaneyfx.rs
+++ b/tests/ui/nll/issue-54556-stephaneyfx.rs
diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.stderr b/tests/ui/nll/issue-54556-stephaneyfx.stderr
index 036a7a0ab..036a7a0ab 100644
--- a/src/test/ui/nll/issue-54556-stephaneyfx.stderr
+++ b/tests/ui/nll/issue-54556-stephaneyfx.stderr
diff --git a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.rs b/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.rs
index 2935caaf2..2935caaf2 100644
--- a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.rs
+++ b/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.rs
diff --git a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr b/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr
index 92f5ffdf3..92f5ffdf3 100644
--- a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr
+++ b/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr
diff --git a/src/test/ui/nll/issue-54556-used-vs-unused-tails.rs b/tests/ui/nll/issue-54556-used-vs-unused-tails.rs
index a111acca6..a111acca6 100644
--- a/src/test/ui/nll/issue-54556-used-vs-unused-tails.rs
+++ b/tests/ui/nll/issue-54556-used-vs-unused-tails.rs
diff --git a/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr b/tests/ui/nll/issue-54556-used-vs-unused-tails.stderr
index 25226e296..25226e296 100644
--- a/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr
+++ b/tests/ui/nll/issue-54556-used-vs-unused-tails.stderr
diff --git a/src/test/ui/nll/issue-54556-wrap-it-up.rs b/tests/ui/nll/issue-54556-wrap-it-up.rs
index 11dbef0d8..11dbef0d8 100644
--- a/src/test/ui/nll/issue-54556-wrap-it-up.rs
+++ b/tests/ui/nll/issue-54556-wrap-it-up.rs
diff --git a/src/test/ui/nll/issue-54556-wrap-it-up.stderr b/tests/ui/nll/issue-54556-wrap-it-up.stderr
index 9f27fac15..9f27fac15 100644
--- a/src/test/ui/nll/issue-54556-wrap-it-up.stderr
+++ b/tests/ui/nll/issue-54556-wrap-it-up.stderr
diff --git a/src/test/ui/nll/issue-54779-anon-static-lifetime.rs b/tests/ui/nll/issue-54779-anon-static-lifetime.rs
index 260b6b109..260b6b109 100644
--- a/src/test/ui/nll/issue-54779-anon-static-lifetime.rs
+++ b/tests/ui/nll/issue-54779-anon-static-lifetime.rs
diff --git a/src/test/ui/nll/issue-54779-anon-static-lifetime.stderr b/tests/ui/nll/issue-54779-anon-static-lifetime.stderr
index 64ad7a21a..64ad7a21a 100644
--- a/src/test/ui/nll/issue-54779-anon-static-lifetime.stderr
+++ b/tests/ui/nll/issue-54779-anon-static-lifetime.stderr
diff --git a/src/test/ui/nll/issue-54943-3.rs b/tests/ui/nll/issue-54943-3.rs
index 077eb1563..077eb1563 100644
--- a/src/test/ui/nll/issue-54943-3.rs
+++ b/tests/ui/nll/issue-54943-3.rs
diff --git a/src/test/ui/nll/issue-54943.rs b/tests/ui/nll/issue-54943.rs
index 85722300b..85722300b 100644
--- a/src/test/ui/nll/issue-54943.rs
+++ b/tests/ui/nll/issue-54943.rs
diff --git a/src/test/ui/nll/issue-54943.stderr b/tests/ui/nll/issue-54943.stderr
index 59be0f983..59be0f983 100644
--- a/src/test/ui/nll/issue-54943.stderr
+++ b/tests/ui/nll/issue-54943.stderr
diff --git a/src/test/ui/nll/issue-55288.rs b/tests/ui/nll/issue-55288.rs
index aab2dc267..aab2dc267 100644
--- a/src/test/ui/nll/issue-55288.rs
+++ b/tests/ui/nll/issue-55288.rs
diff --git a/src/test/ui/nll/issue-55344.rs b/tests/ui/nll/issue-55344.rs
index 20f18dc46..20f18dc46 100644
--- a/src/test/ui/nll/issue-55344.rs
+++ b/tests/ui/nll/issue-55344.rs
diff --git a/src/test/ui/nll/issue-55394.rs b/tests/ui/nll/issue-55394.rs
index f813d1c91..f813d1c91 100644
--- a/src/test/ui/nll/issue-55394.rs
+++ b/tests/ui/nll/issue-55394.rs
diff --git a/src/test/ui/nll/issue-55394.stderr b/tests/ui/nll/issue-55394.stderr
index 24b8c84b4..24b8c84b4 100644
--- a/src/test/ui/nll/issue-55394.stderr
+++ b/tests/ui/nll/issue-55394.stderr
diff --git a/src/test/ui/nll/issue-55401.rs b/tests/ui/nll/issue-55401.rs
index fc45824e9..fc45824e9 100644
--- a/src/test/ui/nll/issue-55401.rs
+++ b/tests/ui/nll/issue-55401.rs
diff --git a/src/test/ui/nll/issue-55401.stderr b/tests/ui/nll/issue-55401.stderr
index 4f797f26a..4f797f26a 100644
--- a/src/test/ui/nll/issue-55401.stderr
+++ b/tests/ui/nll/issue-55401.stderr
diff --git a/src/test/ui/nll/issue-55511.rs b/tests/ui/nll/issue-55511.rs
index 7dfa9c7bc..7dfa9c7bc 100644
--- a/src/test/ui/nll/issue-55511.rs
+++ b/tests/ui/nll/issue-55511.rs
diff --git a/src/test/ui/nll/issue-55511.stderr b/tests/ui/nll/issue-55511.stderr
index bf3e58e8c..bf3e58e8c 100644
--- a/src/test/ui/nll/issue-55511.stderr
+++ b/tests/ui/nll/issue-55511.stderr
diff --git a/src/test/ui/nll/issue-55651.rs b/tests/ui/nll/issue-55651.rs
index 75ba48271..75ba48271 100644
--- a/src/test/ui/nll/issue-55651.rs
+++ b/tests/ui/nll/issue-55651.rs
diff --git a/src/test/ui/nll/issue-55825-const-fn.rs b/tests/ui/nll/issue-55825-const-fn.rs
index 8aaa19813..8aaa19813 100644
--- a/src/test/ui/nll/issue-55825-const-fn.rs
+++ b/tests/ui/nll/issue-55825-const-fn.rs
diff --git a/src/test/ui/nll/issue-55850.rs b/tests/ui/nll/issue-55850.rs
index e6279bd02..e6279bd02 100644
--- a/src/test/ui/nll/issue-55850.rs
+++ b/tests/ui/nll/issue-55850.rs
diff --git a/src/test/ui/nll/issue-55850.stderr b/tests/ui/nll/issue-55850.stderr
index 86a8cdc42..86a8cdc42 100644
--- a/src/test/ui/nll/issue-55850.stderr
+++ b/tests/ui/nll/issue-55850.stderr
diff --git a/src/test/ui/nll/issue-57100.rs b/tests/ui/nll/issue-57100.rs
index f15929334..f15929334 100644
--- a/src/test/ui/nll/issue-57100.rs
+++ b/tests/ui/nll/issue-57100.rs
diff --git a/src/test/ui/nll/issue-57100.stderr b/tests/ui/nll/issue-57100.stderr
index 523c3e8d0..523c3e8d0 100644
--- a/src/test/ui/nll/issue-57100.stderr
+++ b/tests/ui/nll/issue-57100.stderr
diff --git a/src/test/ui/nll/issue-57265-return-type-wf-check.rs b/tests/ui/nll/issue-57265-return-type-wf-check.rs
index 8fb8351ce..8fb8351ce 100644
--- a/src/test/ui/nll/issue-57265-return-type-wf-check.rs
+++ b/tests/ui/nll/issue-57265-return-type-wf-check.rs
diff --git a/src/test/ui/nll/issue-57265-return-type-wf-check.stderr b/tests/ui/nll/issue-57265-return-type-wf-check.stderr
index bb45575fa..bb45575fa 100644
--- a/src/test/ui/nll/issue-57265-return-type-wf-check.stderr
+++ b/tests/ui/nll/issue-57265-return-type-wf-check.stderr
diff --git a/src/test/ui/nll/issue-57280-1-flipped.rs b/tests/ui/nll/issue-57280-1-flipped.rs
index ad4b8dcfd..ad4b8dcfd 100644
--- a/src/test/ui/nll/issue-57280-1-flipped.rs
+++ b/tests/ui/nll/issue-57280-1-flipped.rs
diff --git a/src/test/ui/nll/issue-57280-1-flipped.stderr b/tests/ui/nll/issue-57280-1-flipped.stderr
index 7a2135a2a..7a2135a2a 100644
--- a/src/test/ui/nll/issue-57280-1-flipped.stderr
+++ b/tests/ui/nll/issue-57280-1-flipped.stderr
diff --git a/src/test/ui/nll/issue-57280-1.rs b/tests/ui/nll/issue-57280-1.rs
index b8979624e..b8979624e 100644
--- a/src/test/ui/nll/issue-57280-1.rs
+++ b/tests/ui/nll/issue-57280-1.rs
diff --git a/src/test/ui/nll/issue-57280.rs b/tests/ui/nll/issue-57280.rs
index b9d336ec3..b9d336ec3 100644
--- a/src/test/ui/nll/issue-57280.rs
+++ b/tests/ui/nll/issue-57280.rs
diff --git a/src/test/ui/nll/issue-57642-higher-ranked-subtype.rs b/tests/ui/nll/issue-57642-higher-ranked-subtype.rs
index eba859cde..eba859cde 100644
--- a/src/test/ui/nll/issue-57642-higher-ranked-subtype.rs
+++ b/tests/ui/nll/issue-57642-higher-ranked-subtype.rs
diff --git a/src/test/ui/nll/issue-57642-higher-ranked-subtype.stderr b/tests/ui/nll/issue-57642-higher-ranked-subtype.stderr
index 6e96f40c0..6e96f40c0 100644
--- a/src/test/ui/nll/issue-57642-higher-ranked-subtype.stderr
+++ b/tests/ui/nll/issue-57642-higher-ranked-subtype.stderr
diff --git a/src/test/ui/nll/issue-57843.rs b/tests/ui/nll/issue-57843.rs
index 11629690e..11629690e 100644
--- a/src/test/ui/nll/issue-57843.rs
+++ b/tests/ui/nll/issue-57843.rs
diff --git a/src/test/ui/nll/issue-57843.stderr b/tests/ui/nll/issue-57843.stderr
index 2ab49ec61..2ab49ec61 100644
--- a/src/test/ui/nll/issue-57843.stderr
+++ b/tests/ui/nll/issue-57843.stderr
diff --git a/src/test/ui/nll/issue-57960.rs b/tests/ui/nll/issue-57960.rs
index 32e45184a..32e45184a 100644
--- a/src/test/ui/nll/issue-57960.rs
+++ b/tests/ui/nll/issue-57960.rs
diff --git a/src/test/ui/nll/issue-57989.rs b/tests/ui/nll/issue-57989.rs
index 8f3dec454..8f3dec454 100644
--- a/src/test/ui/nll/issue-57989.rs
+++ b/tests/ui/nll/issue-57989.rs
diff --git a/src/test/ui/nll/issue-57989.stderr b/tests/ui/nll/issue-57989.stderr
index e85e63e52..31f40d825 100644
--- a/src/test/ui/nll/issue-57989.stderr
+++ b/tests/ui/nll/issue-57989.stderr
@@ -1,11 +1,13 @@
error[E0594]: cannot assign to `*x`, which is behind a `&` reference
--> $DIR/issue-57989.rs:5:5
|
-LL | fn f(x: &i32) {
- | ---- help: consider changing this to be a mutable reference: `&mut i32`
-LL | let g = &x;
LL | *x = 0;
| ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
+ |
+help: consider changing this to be a mutable reference
+ |
+LL | fn f(x: &mut i32) {
+ | ~~~~~~~~
error[E0506]: cannot assign to `*x` because it is borrowed
--> $DIR/issue-57989.rs:5:5
diff --git a/src/test/ui/nll/issue-58053.rs b/tests/ui/nll/issue-58053.rs
index d5a2fa1a3..d5a2fa1a3 100644
--- a/src/test/ui/nll/issue-58053.rs
+++ b/tests/ui/nll/issue-58053.rs
diff --git a/src/test/ui/nll/issue-58053.stderr b/tests/ui/nll/issue-58053.stderr
index bf7416e1a..bf7416e1a 100644
--- a/src/test/ui/nll/issue-58053.stderr
+++ b/tests/ui/nll/issue-58053.stderr
diff --git a/src/test/ui/nll/issue-58299.rs b/tests/ui/nll/issue-58299.rs
index 0587fe8b4..0587fe8b4 100644
--- a/src/test/ui/nll/issue-58299.rs
+++ b/tests/ui/nll/issue-58299.rs
diff --git a/src/test/ui/nll/issue-58299.stderr b/tests/ui/nll/issue-58299.stderr
index 509ba67bd..509ba67bd 100644
--- a/src/test/ui/nll/issue-58299.stderr
+++ b/tests/ui/nll/issue-58299.stderr
diff --git a/src/test/ui/nll/issue-61311-normalize.rs b/tests/ui/nll/issue-61311-normalize.rs
index 77d67b07a..77d67b07a 100644
--- a/src/test/ui/nll/issue-61311-normalize.rs
+++ b/tests/ui/nll/issue-61311-normalize.rs
diff --git a/src/test/ui/nll/issue-61320-normalize.rs b/tests/ui/nll/issue-61320-normalize.rs
index 095bef03f..095bef03f 100644
--- a/src/test/ui/nll/issue-61320-normalize.rs
+++ b/tests/ui/nll/issue-61320-normalize.rs
diff --git a/src/test/ui/nll/issue-61424.fixed b/tests/ui/nll/issue-61424.fixed
index 63e00c172..63e00c172 100644
--- a/src/test/ui/nll/issue-61424.fixed
+++ b/tests/ui/nll/issue-61424.fixed
diff --git a/src/test/ui/nll/issue-61424.rs b/tests/ui/nll/issue-61424.rs
index 3b64996c2..3b64996c2 100644
--- a/src/test/ui/nll/issue-61424.rs
+++ b/tests/ui/nll/issue-61424.rs
diff --git a/src/test/ui/nll/issue-61424.stderr b/tests/ui/nll/issue-61424.stderr
index 6de6b7f3a..6de6b7f3a 100644
--- a/src/test/ui/nll/issue-61424.stderr
+++ b/tests/ui/nll/issue-61424.stderr
diff --git a/src/test/ui/nll/issue-62007-assign-const-index.rs b/tests/ui/nll/issue-62007-assign-const-index.rs
index 3ea5d3a7a..3ea5d3a7a 100644
--- a/src/test/ui/nll/issue-62007-assign-const-index.rs
+++ b/tests/ui/nll/issue-62007-assign-const-index.rs
diff --git a/src/test/ui/nll/issue-62007-assign-const-index.stderr b/tests/ui/nll/issue-62007-assign-const-index.stderr
index 12e28aa3f..12e28aa3f 100644
--- a/src/test/ui/nll/issue-62007-assign-const-index.stderr
+++ b/tests/ui/nll/issue-62007-assign-const-index.stderr
diff --git a/src/test/ui/nll/issue-62007-assign-differing-fields.rs b/tests/ui/nll/issue-62007-assign-differing-fields.rs
index 29d92b7b8..29d92b7b8 100644
--- a/src/test/ui/nll/issue-62007-assign-differing-fields.rs
+++ b/tests/ui/nll/issue-62007-assign-differing-fields.rs
diff --git a/src/test/ui/nll/issue-62007-assign-differing-fields.stderr b/tests/ui/nll/issue-62007-assign-differing-fields.stderr
index 4488431fc..4488431fc 100644
--- a/src/test/ui/nll/issue-62007-assign-differing-fields.stderr
+++ b/tests/ui/nll/issue-62007-assign-differing-fields.stderr
diff --git a/src/test/ui/nll/issue-63154-normalize.rs b/tests/ui/nll/issue-63154-normalize.rs
index 484c12879..484c12879 100644
--- a/src/test/ui/nll/issue-63154-normalize.rs
+++ b/tests/ui/nll/issue-63154-normalize.rs
diff --git a/src/test/ui/nll/issue-67007-escaping-data.rs b/tests/ui/nll/issue-67007-escaping-data.rs
index 49ea2e596..49ea2e596 100644
--- a/src/test/ui/nll/issue-67007-escaping-data.rs
+++ b/tests/ui/nll/issue-67007-escaping-data.rs
diff --git a/src/test/ui/nll/issue-67007-escaping-data.stderr b/tests/ui/nll/issue-67007-escaping-data.stderr
index ac9c59bf7..ac9c59bf7 100644
--- a/src/test/ui/nll/issue-67007-escaping-data.stderr
+++ b/tests/ui/nll/issue-67007-escaping-data.stderr
diff --git a/src/test/ui/nll/issue-68550.rs b/tests/ui/nll/issue-68550.rs
index 6bfd18de1..6bfd18de1 100644
--- a/src/test/ui/nll/issue-68550.rs
+++ b/tests/ui/nll/issue-68550.rs
diff --git a/src/test/ui/nll/issue-68550.stderr b/tests/ui/nll/issue-68550.stderr
index e234ebb04..e234ebb04 100644
--- a/src/test/ui/nll/issue-68550.stderr
+++ b/tests/ui/nll/issue-68550.stderr
diff --git a/src/test/ui/nll/issue-69114-static-mut-ty.rs b/tests/ui/nll/issue-69114-static-mut-ty.rs
index ce37da053..ce37da053 100644
--- a/src/test/ui/nll/issue-69114-static-mut-ty.rs
+++ b/tests/ui/nll/issue-69114-static-mut-ty.rs
diff --git a/src/test/ui/nll/issue-69114-static-mut-ty.stderr b/tests/ui/nll/issue-69114-static-mut-ty.stderr
index 5e55cb502..5e55cb502 100644
--- a/src/test/ui/nll/issue-69114-static-mut-ty.stderr
+++ b/tests/ui/nll/issue-69114-static-mut-ty.stderr
diff --git a/src/test/ui/nll/issue-69114-static-ty.rs b/tests/ui/nll/issue-69114-static-ty.rs
index 3318433a1..3318433a1 100644
--- a/src/test/ui/nll/issue-69114-static-ty.rs
+++ b/tests/ui/nll/issue-69114-static-ty.rs
diff --git a/src/test/ui/nll/issue-69114-static-ty.stderr b/tests/ui/nll/issue-69114-static-ty.stderr
index 0815e74b5..0815e74b5 100644
--- a/src/test/ui/nll/issue-69114-static-ty.stderr
+++ b/tests/ui/nll/issue-69114-static-ty.stderr
diff --git a/src/test/ui/nll/issue-73159-rpit-static.rs b/tests/ui/nll/issue-73159-rpit-static.rs
index 3002408b0..3002408b0 100644
--- a/src/test/ui/nll/issue-73159-rpit-static.rs
+++ b/tests/ui/nll/issue-73159-rpit-static.rs
diff --git a/src/test/ui/nll/issue-73159-rpit-static.stderr b/tests/ui/nll/issue-73159-rpit-static.stderr
index 260b9b597..260b9b597 100644
--- a/src/test/ui/nll/issue-73159-rpit-static.stderr
+++ b/tests/ui/nll/issue-73159-rpit-static.stderr
diff --git a/src/test/ui/nll/issue-78561.rs b/tests/ui/nll/issue-78561.rs
index 55147fcd1..55147fcd1 100644
--- a/src/test/ui/nll/issue-78561.rs
+++ b/tests/ui/nll/issue-78561.rs
diff --git a/src/test/ui/nll/issue-95272.rs b/tests/ui/nll/issue-95272.rs
index 958cbde37..958cbde37 100644
--- a/src/test/ui/nll/issue-95272.rs
+++ b/tests/ui/nll/issue-95272.rs
diff --git a/src/test/ui/nll/issue-95272.stderr b/tests/ui/nll/issue-95272.stderr
index 03edbc3a6..03edbc3a6 100644
--- a/src/test/ui/nll/issue-95272.stderr
+++ b/tests/ui/nll/issue-95272.stderr
diff --git a/src/test/ui/nll/issue-97997.rs b/tests/ui/nll/issue-97997.rs
index c64e720b1..c64e720b1 100644
--- a/src/test/ui/nll/issue-97997.rs
+++ b/tests/ui/nll/issue-97997.rs
diff --git a/src/test/ui/nll/issue-97997.stderr b/tests/ui/nll/issue-97997.stderr
index 46440c021..46440c021 100644
--- a/src/test/ui/nll/issue-97997.stderr
+++ b/tests/ui/nll/issue-97997.stderr
diff --git a/src/test/ui/nll/issue-98170.rs b/tests/ui/nll/issue-98170.rs
index 6bb12f52d..6bb12f52d 100644
--- a/src/test/ui/nll/issue-98170.rs
+++ b/tests/ui/nll/issue-98170.rs
diff --git a/src/test/ui/nll/issue-98170.stderr b/tests/ui/nll/issue-98170.stderr
index 0d17365e7..0d17365e7 100644
--- a/src/test/ui/nll/issue-98170.stderr
+++ b/tests/ui/nll/issue-98170.stderr
diff --git a/src/test/ui/nll/issue-98589-closures-relate-named-regions.rs b/tests/ui/nll/issue-98589-closures-relate-named-regions.rs
index 6cc4340bb..6cc4340bb 100644
--- a/src/test/ui/nll/issue-98589-closures-relate-named-regions.rs
+++ b/tests/ui/nll/issue-98589-closures-relate-named-regions.rs
diff --git a/src/test/ui/nll/issue-98589-closures-relate-named-regions.stderr b/tests/ui/nll/issue-98589-closures-relate-named-regions.stderr
index d8b26f0b0..d8b26f0b0 100644
--- a/src/test/ui/nll/issue-98589-closures-relate-named-regions.stderr
+++ b/tests/ui/nll/issue-98589-closures-relate-named-regions.stderr
diff --git a/src/test/ui/nll/issue-98693.rs b/tests/ui/nll/issue-98693.rs
index 7a325e2e9..7a325e2e9 100644
--- a/src/test/ui/nll/issue-98693.rs
+++ b/tests/ui/nll/issue-98693.rs
diff --git a/src/test/ui/nll/issue-98693.stderr b/tests/ui/nll/issue-98693.stderr
index 15ca38aa2..15ca38aa2 100644
--- a/src/test/ui/nll/issue-98693.stderr
+++ b/tests/ui/nll/issue-98693.stderr
diff --git a/src/test/ui/nll/lint-no-err.rs b/tests/ui/nll/lint-no-err.rs
index 2d1d5cb26..2d1d5cb26 100644
--- a/src/test/ui/nll/lint-no-err.rs
+++ b/tests/ui/nll/lint-no-err.rs
diff --git a/src/test/ui/nll/loan_ends_mid_block_pair.rs b/tests/ui/nll/loan_ends_mid_block_pair.rs
index acd6ec706..acd6ec706 100644
--- a/src/test/ui/nll/loan_ends_mid_block_pair.rs
+++ b/tests/ui/nll/loan_ends_mid_block_pair.rs
diff --git a/src/test/ui/nll/loan_ends_mid_block_pair.stderr b/tests/ui/nll/loan_ends_mid_block_pair.stderr
index eb8442b31..eb8442b31 100644
--- a/src/test/ui/nll/loan_ends_mid_block_pair.stderr
+++ b/tests/ui/nll/loan_ends_mid_block_pair.stderr
diff --git a/src/test/ui/nll/loan_ends_mid_block_vec.rs b/tests/ui/nll/loan_ends_mid_block_vec.rs
index 2edcdef0a..2edcdef0a 100644
--- a/src/test/ui/nll/loan_ends_mid_block_vec.rs
+++ b/tests/ui/nll/loan_ends_mid_block_vec.rs
diff --git a/src/test/ui/nll/loan_ends_mid_block_vec.stderr b/tests/ui/nll/loan_ends_mid_block_vec.stderr
index 22c72af61..22c72af61 100644
--- a/src/test/ui/nll/loan_ends_mid_block_vec.stderr
+++ b/tests/ui/nll/loan_ends_mid_block_vec.stderr
diff --git a/src/test/ui/nll/local-outlives-static-via-hrtb.rs b/tests/ui/nll/local-outlives-static-via-hrtb.rs
index 5f1f9b3a7..5f1f9b3a7 100644
--- a/src/test/ui/nll/local-outlives-static-via-hrtb.rs
+++ b/tests/ui/nll/local-outlives-static-via-hrtb.rs
diff --git a/src/test/ui/nll/local-outlives-static-via-hrtb.stderr b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
index f5c10f3dd..f5c10f3dd 100644
--- a/src/test/ui/nll/local-outlives-static-via-hrtb.stderr
+++ b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
diff --git a/src/test/ui/nll/lub-if.rs b/tests/ui/nll/lub-if.rs
index 50225a783..50225a783 100644
--- a/src/test/ui/nll/lub-if.rs
+++ b/tests/ui/nll/lub-if.rs
diff --git a/src/test/ui/nll/lub-if.stderr b/tests/ui/nll/lub-if.stderr
index 03f7f9204..03f7f9204 100644
--- a/src/test/ui/nll/lub-if.stderr
+++ b/tests/ui/nll/lub-if.stderr
diff --git a/src/test/ui/nll/lub-match.rs b/tests/ui/nll/lub-match.rs
index 454dd1fc6..454dd1fc6 100644
--- a/src/test/ui/nll/lub-match.rs
+++ b/tests/ui/nll/lub-match.rs
diff --git a/src/test/ui/nll/lub-match.stderr b/tests/ui/nll/lub-match.stderr
index 208ec07a1..208ec07a1 100644
--- a/src/test/ui/nll/lub-match.stderr
+++ b/tests/ui/nll/lub-match.stderr
diff --git a/tests/ui/nll/match-cfg-fake-edges.rs b/tests/ui/nll/match-cfg-fake-edges.rs
new file mode 100644
index 000000000..1afc7931a
--- /dev/null
+++ b/tests/ui/nll/match-cfg-fake-edges.rs
@@ -0,0 +1,70 @@
+// Test that we have enough false edges to avoid exposing the exact matching
+// algorithm in borrow checking.
+
+#![feature(if_let_guard)]
+
+fn guard_always_precedes_arm(y: i32) {
+ let mut x;
+ // x should always be initialized, as the only way to reach the arm is
+ // through the guard.
+ match y {
+ 0 | 2 if { x = 2; true } => x,
+ _ => 2,
+ };
+
+ let mut x;
+ match y {
+ 0 | 2 if let Some(()) = { x = 2; Some(()) } => x,
+ _ => 2,
+ };
+}
+
+fn guard_may_be_skipped(y: i32) {
+ let x;
+ // Even though x *is* always initialized, we don't want to have borrowck
+ // results be based on whether patterns are exhaustive.
+ match y {
+ _ if { x = 2; true } => 1,
+ _ if {
+ x; //~ ERROR E0381
+ false
+ } => 2,
+ _ => 3,
+ };
+
+ let x;
+ match y {
+ _ if let Some(()) = { x = 2; Some(()) } => 1,
+ _ if let Some(()) = {
+ x; //~ ERROR E0381
+ None
+ } => 2,
+ _ => 3,
+ };
+}
+
+fn guard_may_be_taken(y: bool) {
+ let x = String::new();
+ // Even though x *is* never moved before the use, we don't want to have
+ // borrowck results be based on whether patterns are disjoint.
+ match y {
+ false if { drop(x); true } => 1,
+ true => {
+ x; //~ ERROR use of moved value: `x`
+ 2
+ }
+ false => 3,
+ };
+
+ let x = String::new();
+ match y {
+ false if let Some(()) = { drop(x); Some(()) } => 1,
+ true => {
+ x; //~ ERROR use of moved value: `x`
+ 2
+ }
+ false => 3,
+ };
+}
+
+fn main() {}
diff --git a/tests/ui/nll/match-cfg-fake-edges.stderr b/tests/ui/nll/match-cfg-fake-edges.stderr
new file mode 100644
index 000000000..a6261345c
--- /dev/null
+++ b/tests/ui/nll/match-cfg-fake-edges.stderr
@@ -0,0 +1,72 @@
+error[E0381]: used binding `x` isn't initialized
+ --> $DIR/match-cfg-fake-edges.rs:29:13
+ |
+LL | let x;
+ | - binding declared here but left uninitialized
+...
+LL | _ if { x = 2; true } => 1,
+ | ----- binding initialized here in some conditions
+LL | _ if {
+LL | x;
+ | ^ `x` used here but it isn't initialized
+ |
+help: consider assigning a value
+ |
+LL | let x = 0;
+ | +++
+
+error[E0381]: used binding `x` isn't initialized
+ --> $DIR/match-cfg-fake-edges.rs:39:13
+ |
+LL | let x;
+ | - binding declared here but left uninitialized
+LL | match y {
+LL | _ if let Some(()) = { x = 2; Some(()) } => 1,
+ | ----- binding initialized here in some conditions
+LL | _ if let Some(()) = {
+LL | x;
+ | ^ `x` used here but it isn't initialized
+ |
+help: consider assigning a value
+ |
+LL | let x = 0;
+ | +++
+
+error[E0382]: use of moved value: `x`
+ --> $DIR/match-cfg-fake-edges.rs:53:13
+ |
+LL | let x = String::new();
+ | - move occurs because `x` has type `String`, which does not implement the `Copy` trait
+...
+LL | false if { drop(x); true } => 1,
+ | - value moved here
+LL | true => {
+LL | x;
+ | ^ value used here after move
+ |
+help: consider cloning the value if the performance cost is acceptable
+ |
+LL | false if { drop(x.clone()); true } => 1,
+ | ++++++++
+
+error[E0382]: use of moved value: `x`
+ --> $DIR/match-cfg-fake-edges.rs:63:13
+ |
+LL | let x = String::new();
+ | - move occurs because `x` has type `String`, which does not implement the `Copy` trait
+LL | match y {
+LL | false if let Some(()) = { drop(x); Some(()) } => 1,
+ | - value moved here
+LL | true => {
+LL | x;
+ | ^ value used here after move
+ |
+help: consider cloning the value if the performance cost is acceptable
+ |
+LL | false if let Some(()) = { drop(x.clone()); Some(()) } => 1,
+ | ++++++++
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0381, E0382.
+For more information about an error, try `rustc --explain E0381`.
diff --git a/src/test/ui/nll/match-cfg-fake-edges2.rs b/tests/ui/nll/match-cfg-fake-edges2.rs
index 48f95e03b..48f95e03b 100644
--- a/src/test/ui/nll/match-cfg-fake-edges2.rs
+++ b/tests/ui/nll/match-cfg-fake-edges2.rs
diff --git a/src/test/ui/nll/match-cfg-fake-edges2.stderr b/tests/ui/nll/match-cfg-fake-edges2.stderr
index c6d15a936..c6d15a936 100644
--- a/src/test/ui/nll/match-cfg-fake-edges2.stderr
+++ b/tests/ui/nll/match-cfg-fake-edges2.stderr
diff --git a/tests/ui/nll/match-guards-always-borrow.rs b/tests/ui/nll/match-guards-always-borrow.rs
new file mode 100644
index 000000000..ff63cc092
--- /dev/null
+++ b/tests/ui/nll/match-guards-always-borrow.rs
@@ -0,0 +1,64 @@
+#![feature(if_let_guard)]
+
+// Here is arielb1's basic example from rust-lang/rust#27282
+// that AST borrowck is flummoxed by:
+
+fn should_reject_destructive_mutate_in_guard() {
+ match Some(&4) {
+ None => {},
+ ref mut foo if {
+ (|| { let bar = foo; bar.take() })();
+ //~^ ERROR cannot move out of `foo` in pattern guard [E0507]
+ false } => { },
+ Some(s) => std::process::exit(*s),
+ }
+
+ match Some(&4) {
+ None => {},
+ ref mut foo if let Some(()) = {
+ (|| { let bar = foo; bar.take() })();
+ //~^ ERROR cannot move out of `foo` in pattern guard [E0507]
+ None } => { },
+ Some(s) => std::process::exit(*s),
+ }
+}
+
+// Here below is a case that needs to keep working: we only use the
+// binding via immutable-borrow in the guard, and we mutate in the arm
+// body.
+fn allow_mutate_in_arm_body() {
+ match Some(&4) {
+ None => {},
+ ref mut foo if foo.is_some() => { foo.take(); () }
+ Some(s) => std::process::exit(*s),
+ }
+
+ match Some(&4) {
+ None => {},
+ ref mut foo if let Some(_) = foo => { foo.take(); () }
+ Some(s) => std::process::exit(*s),
+ }
+}
+
+// Here below is a case that needs to keep working: we only use the
+// binding via immutable-borrow in the guard, and we move into the arm
+// body.
+fn allow_move_into_arm_body() {
+ match Some(&4) {
+ None => {},
+ mut foo if foo.is_some() => { foo.unwrap(); () }
+ Some(s) => std::process::exit(*s),
+ }
+
+ match Some(&4) {
+ None => {},
+ mut foo if let Some(_) = foo => { foo.unwrap(); () }
+ Some(s) => std::process::exit(*s),
+ }
+}
+
+fn main() {
+ should_reject_destructive_mutate_in_guard();
+ allow_mutate_in_arm_body();
+ allow_move_into_arm_body();
+}
diff --git a/tests/ui/nll/match-guards-always-borrow.stderr b/tests/ui/nll/match-guards-always-borrow.stderr
new file mode 100644
index 000000000..fa01d3a6f
--- /dev/null
+++ b/tests/ui/nll/match-guards-always-borrow.stderr
@@ -0,0 +1,23 @@
+error[E0507]: cannot move out of `foo` in pattern guard
+ --> $DIR/match-guards-always-borrow.rs:10:14
+ |
+LL | (|| { let bar = foo; bar.take() })();
+ | ^^ --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
+ | |
+ | move out of `foo` occurs here
+ |
+ = note: variables bound in patterns cannot be moved from until after the end of the pattern guard
+
+error[E0507]: cannot move out of `foo` in pattern guard
+ --> $DIR/match-guards-always-borrow.rs:19:14
+ |
+LL | (|| { let bar = foo; bar.take() })();
+ | ^^ --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
+ | |
+ | move out of `foo` occurs here
+ |
+ = note: variables bound in patterns cannot be moved from until after the end of the pattern guard
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/nll/match-guards-partially-borrow.rs b/tests/ui/nll/match-guards-partially-borrow.rs
new file mode 100644
index 000000000..3a9e1654b
--- /dev/null
+++ b/tests/ui/nll/match-guards-partially-borrow.rs
@@ -0,0 +1,332 @@
+// Test that a (partially) mutably borrowed place can be matched on, so long as
+// we don't have to read any values that are mutably borrowed to determine
+// which arm to take.
+//
+// Test that we don't allow mutating the value being matched on in a way that
+// changes which patterns it matches, until we have chosen an arm.
+
+#![feature(if_let_guard)]
+
+fn ok_mutation_in_if_guard(mut q: i32) {
+ match q {
+ // OK, mutation doesn't change which patterns g matches
+ _ if { q = 1; false } => (),
+ _ => (),
+ }
+}
+
+fn ok_mutation_in_if_let_guard(mut q: i32) {
+ match q {
+ // OK, mutation doesn't change which patterns g matches
+ _ if let Some(()) = { q = 1; None } => (),
+ _ => (),
+ }
+}
+
+fn ok_mutation_in_if_guard2(mut u: bool) {
+ // OK value of u is unused before modification
+ match u {
+ _ => (),
+ _ if {
+ u = true;
+ false
+ } => (),
+ x => (),
+ }
+}
+
+fn ok_mutation_in_if_let_guard2(mut u: bool) {
+ // OK value of u is unused before modification
+ match u {
+ _ => (),
+ _ if let Some(()) = {
+ u = true;
+ None
+ } => (),
+ x => (),
+ }
+}
+
+fn ok_mutation_in_if_guard4(mut w: (&mut bool,)) {
+ // OK value of u is unused before modification
+ match w {
+ _ => (),
+ _ if {
+ *w.0 = true;
+ false
+ } => (),
+ x => (),
+ }
+}
+
+fn ok_mutation_in_if_let_guard4(mut w: (&mut bool,)) {
+ // OK value of u is unused before modification
+ match w {
+ _ => (),
+ _ if let Some(()) = {
+ *w.0 = true;
+ None
+ } => (),
+ x => (),
+ }
+}
+
+fn ok_indirect_mutation_in_if_guard(mut p: &bool) {
+ match *p {
+ // OK, mutation doesn't change which patterns s matches
+ _ if {
+ p = &true;
+ false
+ } => (),
+ _ => (),
+ }
+}
+
+fn ok_indirect_mutation_in_if_let_guard(mut p: &bool) {
+ match *p {
+ // OK, mutation doesn't change which patterns s matches
+ _ if let Some(()) = {
+ p = &true;
+ None
+ } => (),
+ _ => (),
+ }
+}
+
+fn mutation_invalidates_pattern_in_if_guard(mut q: bool) {
+ match q {
+ // q doesn't match the pattern with the guard by the end of the guard.
+ false if {
+ q = true; //~ ERROR
+ true
+ } => (),
+ _ => (),
+ }
+}
+
+fn mutation_invalidates_pattern_in_if_let_guard(mut q: bool) {
+ match q {
+ // q doesn't match the pattern with the guard by the end of the guard.
+ false if let Some(()) = {
+ q = true; //~ ERROR
+ Some(())
+ } => (),
+ _ => (),
+ }
+}
+
+fn mutation_invalidates_previous_pattern_in_if_guard(mut r: bool) {
+ match r {
+ // r matches a previous pattern by the end of the guard.
+ true => (),
+ _ if {
+ r = true; //~ ERROR
+ true
+ } => (),
+ _ => (),
+ }
+}
+
+fn mutation_invalidates_previous_pattern_in_if_let_guard(mut r: bool) {
+ match r {
+ // r matches a previous pattern by the end of the guard.
+ true => (),
+ _ if let Some(()) = {
+ r = true; //~ ERROR
+ Some(())
+ } => (),
+ _ => (),
+ }
+}
+
+fn match_on_borrowed_early_end_if_guard(mut s: bool) {
+ let h = &mut s;
+ // OK value of s is unused before modification.
+ match s {
+ _ if {
+ *h = !*h;
+ false
+ } => (),
+ true => (),
+ false => (),
+ }
+}
+
+fn match_on_borrowed_early_end_if_let_guard(mut s: bool) {
+ let h = &mut s;
+ // OK value of s is unused before modification.
+ match s {
+ _ if let Some(()) = {
+ *h = !*h;
+ None
+ } => (),
+ true => (),
+ false => (),
+ }
+}
+
+fn bad_mutation_in_if_guard(mut t: bool) {
+ match t {
+ true => (),
+ false if {
+ t = true; //~ ERROR
+ false
+ } => (),
+ false => (),
+ }
+}
+
+fn bad_mutation_in_if_let_guard(mut t: bool) {
+ match t {
+ true => (),
+ false if let Some(()) = {
+ t = true; //~ ERROR
+ None
+ } => (),
+ false => (),
+ }
+}
+
+fn bad_mutation_in_if_guard2(mut x: Option<Option<&i32>>) {
+ // Check that nested patterns are checked.
+ match x {
+ None => (),
+ Some(None) => (),
+ _ if {
+ match x {
+ Some(ref mut r) => *r = None, //~ ERROR
+ _ => return,
+ };
+ false
+ } => (),
+ Some(Some(r)) => println!("{}", r),
+ }
+}
+
+fn bad_mutation_in_if_let_guard2(mut x: Option<Option<&i32>>) {
+ // Check that nested patterns are checked.
+ match x {
+ None => (),
+ Some(None) => (),
+ _ if let Some(()) = {
+ match x {
+ Some(ref mut r) => *r = None, //~ ERROR
+ _ => return,
+ };
+ None
+ } => (),
+ Some(Some(r)) => println!("{}", r),
+ }
+}
+
+fn bad_mutation_in_if_guard3(mut t: bool) {
+ match t {
+ s if {
+ t = !t; //~ ERROR
+ false
+ } => (), // What value should `s` have in the arm?
+ _ => (),
+ }
+}
+
+fn bad_mutation_in_if_let_guard3(mut t: bool) {
+ match t {
+ s if let Some(()) = {
+ t = !t; //~ ERROR
+ None
+ } => (), // What value should `s` have in the arm?
+ _ => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_guard(mut y: &bool) {
+ match *y {
+ true => (),
+ false if {
+ y = &true; //~ ERROR
+ false
+ } => (),
+ false => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_let_guard(mut y: &bool) {
+ match *y {
+ true => (),
+ false if let Some(()) = {
+ y = &true; //~ ERROR
+ None
+ } => (),
+ false => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_guard2(mut z: &bool) {
+ match z {
+ &true => (),
+ &false if {
+ z = &true; //~ ERROR
+ false
+ } => (),
+ &false => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_let_guard2(mut z: &bool) {
+ match z {
+ &true => (),
+ &false if let Some(()) = {
+ z = &true; //~ ERROR
+ None
+ } => (),
+ &false => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_guard3(mut a: &bool) {
+ // Same as bad_indirect_mutation_in_if_guard2, but using match ergonomics
+ match a {
+ true => (),
+ false if {
+ a = &true; //~ ERROR
+ false
+ } => (),
+ false => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_let_guard3(mut a: &bool) {
+ // Same as bad_indirect_mutation_in_if_guard2, but using match ergonomics
+ match a {
+ true => (),
+ false if let Some(()) = {
+ a = &true; //~ ERROR
+ None
+ } => (),
+ false => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_guard4(mut b: &bool) {
+ match b {
+ &_ => (),
+ &_ if {
+ b = &true; //~ ERROR
+ false
+ } => (),
+ &b => (),
+ }
+}
+
+fn bad_indirect_mutation_in_if_let_guard4(mut b: &bool) {
+ match b {
+ &_ => (),
+ &_ if let Some(()) = {
+ b = &true; //~ ERROR
+ None
+ } => (),
+ &b => (),
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/nll/match-guards-partially-borrow.stderr b/tests/ui/nll/match-guards-partially-borrow.stderr
new file mode 100644
index 000000000..60b8dee71
--- /dev/null
+++ b/tests/ui/nll/match-guards-partially-borrow.stderr
@@ -0,0 +1,170 @@
+error[E0510]: cannot assign `q` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:100:13
+ |
+LL | match q {
+ | - value is immutable in match guard
+...
+LL | q = true;
+ | ^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `q` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:111:13
+ |
+LL | match q {
+ | - value is immutable in match guard
+...
+LL | q = true;
+ | ^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `r` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:123:13
+ |
+LL | match r {
+ | - value is immutable in match guard
+...
+LL | r = true;
+ | ^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `r` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:135:13
+ |
+LL | match r {
+ | - value is immutable in match guard
+...
+LL | r = true;
+ | ^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `t` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:172:13
+ |
+LL | match t {
+ | - value is immutable in match guard
+...
+LL | t = true;
+ | ^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `t` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:183:13
+ |
+LL | match t {
+ | - value is immutable in match guard
+...
+LL | t = true;
+ | ^^^^^^^^ cannot assign
+
+error[E0510]: cannot mutably borrow `x.0` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:197:22
+ |
+LL | match x {
+ | - value is immutable in match guard
+...
+LL | Some(ref mut r) => *r = None,
+ | ^^^^^^^^^ cannot mutably borrow
+
+error[E0510]: cannot mutably borrow `x.0` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:213:22
+ |
+LL | match x {
+ | - value is immutable in match guard
+...
+LL | Some(ref mut r) => *r = None,
+ | ^^^^^^^^^ cannot mutably borrow
+
+error[E0506]: cannot assign to `t` because it is borrowed
+ --> $DIR/match-guards-partially-borrow.rs:225:13
+ |
+LL | s if {
+ | - borrow of `t` occurs here
+LL | t = !t;
+ | ^^^^^^ assignment to borrowed `t` occurs here
+LL | false
+LL | } => (), // What value should `s` have in the arm?
+ | - borrow later used here
+
+error[E0506]: cannot assign to `t` because it is borrowed
+ --> $DIR/match-guards-partially-borrow.rs:235:13
+ |
+LL | s if let Some(()) = {
+ | - borrow of `t` occurs here
+LL | t = !t;
+ | ^^^^^^ assignment to borrowed `t` occurs here
+LL | None
+LL | } => (), // What value should `s` have in the arm?
+ | - borrow later used here
+
+error[E0510]: cannot assign `y` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:246:13
+ |
+LL | match *y {
+ | -- value is immutable in match guard
+...
+LL | y = &true;
+ | ^^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `y` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:257:13
+ |
+LL | match *y {
+ | -- value is immutable in match guard
+...
+LL | y = &true;
+ | ^^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `z` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:268:13
+ |
+LL | match z {
+ | - value is immutable in match guard
+...
+LL | z = &true;
+ | ^^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `z` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:279:13
+ |
+LL | match z {
+ | - value is immutable in match guard
+...
+LL | z = &true;
+ | ^^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `a` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:291:13
+ |
+LL | match a {
+ | - value is immutable in match guard
+...
+LL | a = &true;
+ | ^^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `a` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:303:13
+ |
+LL | match a {
+ | - value is immutable in match guard
+...
+LL | a = &true;
+ | ^^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `b` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:314:13
+ |
+LL | match b {
+ | - value is immutable in match guard
+...
+LL | b = &true;
+ | ^^^^^^^^^ cannot assign
+
+error[E0510]: cannot assign `b` in match guard
+ --> $DIR/match-guards-partially-borrow.rs:325:13
+ |
+LL | match b {
+ | - value is immutable in match guard
+...
+LL | b = &true;
+ | ^^^^^^^^^ cannot assign
+
+error: aborting due to 18 previous errors
+
+Some errors have detailed explanations: E0506, E0510.
+For more information about an error, try `rustc --explain E0506`.
diff --git a/src/test/ui/nll/match-on-borrowed.rs b/tests/ui/nll/match-on-borrowed.rs
index 447dabeb4..447dabeb4 100644
--- a/src/test/ui/nll/match-on-borrowed.rs
+++ b/tests/ui/nll/match-on-borrowed.rs
diff --git a/src/test/ui/nll/match-on-borrowed.stderr b/tests/ui/nll/match-on-borrowed.stderr
index 32666529f..32666529f 100644
--- a/src/test/ui/nll/match-on-borrowed.stderr
+++ b/tests/ui/nll/match-on-borrowed.stderr
diff --git a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs b/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs
index 1de32ddf5..1de32ddf5 100644
--- a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs
+++ b/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs
diff --git a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr b/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr
index 80e297807..80e297807 100644
--- a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr
+++ b/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr
diff --git a/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs b/tests/ui/nll/maybe-initialized-drop-uninitialized.rs
index 32e07cd14..32e07cd14 100644
--- a/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs
+++ b/tests/ui/nll/maybe-initialized-drop-uninitialized.rs
diff --git a/src/test/ui/nll/maybe-initialized-drop-with-fragment.rs b/tests/ui/nll/maybe-initialized-drop-with-fragment.rs
index 778212918..778212918 100644
--- a/src/test/ui/nll/maybe-initialized-drop-with-fragment.rs
+++ b/tests/ui/nll/maybe-initialized-drop-with-fragment.rs
diff --git a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr b/tests/ui/nll/maybe-initialized-drop-with-fragment.stderr
index 14074472e..14074472e 100644
--- a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr
+++ b/tests/ui/nll/maybe-initialized-drop-with-fragment.stderr
diff --git a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.rs b/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.rs
index b0d6e27a3..b0d6e27a3 100644
--- a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.rs
+++ b/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.rs
diff --git a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr b/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr
index 91c0afc1d..91c0afc1d 100644
--- a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr
+++ b/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr
diff --git a/src/test/ui/nll/maybe-initialized-drop.rs b/tests/ui/nll/maybe-initialized-drop.rs
index 44a7ede78..44a7ede78 100644
--- a/src/test/ui/nll/maybe-initialized-drop.rs
+++ b/tests/ui/nll/maybe-initialized-drop.rs
diff --git a/src/test/ui/nll/maybe-initialized-drop.stderr b/tests/ui/nll/maybe-initialized-drop.stderr
index 9825ba461..9825ba461 100644
--- a/src/test/ui/nll/maybe-initialized-drop.stderr
+++ b/tests/ui/nll/maybe-initialized-drop.stderr
diff --git a/src/test/ui/nll/mir_check_cast_closure.rs b/tests/ui/nll/mir_check_cast_closure.rs
index 4aebcfdb4..4aebcfdb4 100644
--- a/src/test/ui/nll/mir_check_cast_closure.rs
+++ b/tests/ui/nll/mir_check_cast_closure.rs
diff --git a/src/test/ui/nll/mir_check_cast_closure.stderr b/tests/ui/nll/mir_check_cast_closure.stderr
index 72d99aad9..72d99aad9 100644
--- a/src/test/ui/nll/mir_check_cast_closure.stderr
+++ b/tests/ui/nll/mir_check_cast_closure.stderr
diff --git a/src/test/ui/nll/mir_check_cast_reify.rs b/tests/ui/nll/mir_check_cast_reify.rs
index 951459911..951459911 100644
--- a/src/test/ui/nll/mir_check_cast_reify.rs
+++ b/tests/ui/nll/mir_check_cast_reify.rs
diff --git a/src/test/ui/nll/mir_check_cast_reify.stderr b/tests/ui/nll/mir_check_cast_reify.stderr
index 9be2670fe..9be2670fe 100644
--- a/src/test/ui/nll/mir_check_cast_reify.stderr
+++ b/tests/ui/nll/mir_check_cast_reify.stderr
diff --git a/src/test/ui/nll/mir_check_cast_unsafe_fn.rs b/tests/ui/nll/mir_check_cast_unsafe_fn.rs
index 8f55bedfb..8f55bedfb 100644
--- a/src/test/ui/nll/mir_check_cast_unsafe_fn.rs
+++ b/tests/ui/nll/mir_check_cast_unsafe_fn.rs
diff --git a/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr b/tests/ui/nll/mir_check_cast_unsafe_fn.stderr
index 321d17ba6..321d17ba6 100644
--- a/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr
+++ b/tests/ui/nll/mir_check_cast_unsafe_fn.stderr
diff --git a/src/test/ui/nll/mir_check_cast_unsize.rs b/tests/ui/nll/mir_check_cast_unsize.rs
index f6c100ab6..f6c100ab6 100644
--- a/src/test/ui/nll/mir_check_cast_unsize.rs
+++ b/tests/ui/nll/mir_check_cast_unsize.rs
diff --git a/src/test/ui/nll/mir_check_cast_unsize.stderr b/tests/ui/nll/mir_check_cast_unsize.stderr
index 1cd2579e4..1cd2579e4 100644
--- a/src/test/ui/nll/mir_check_cast_unsize.stderr
+++ b/tests/ui/nll/mir_check_cast_unsize.stderr
diff --git a/src/test/ui/nll/move-errors.rs b/tests/ui/nll/move-errors.rs
index e0fcd6250..e0fcd6250 100644
--- a/src/test/ui/nll/move-errors.rs
+++ b/tests/ui/nll/move-errors.rs
diff --git a/tests/ui/nll/move-errors.stderr b/tests/ui/nll/move-errors.stderr
new file mode 100644
index 000000000..58b8aa31d
--- /dev/null
+++ b/tests/ui/nll/move-errors.stderr
@@ -0,0 +1,210 @@
+error[E0507]: cannot move out of `*a` which is behind a shared reference
+ --> $DIR/move-errors.rs:6:13
+ |
+LL | let b = *a;
+ | ^^ move occurs because `*a` has type `A`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let b = *a;
+LL + let b = a;
+ |
+
+error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
+ --> $DIR/move-errors.rs:12:13
+ |
+LL | let b = a[0];
+ | ^^^^
+ | |
+ | cannot move out of here
+ | move occurs because `a[_]` has type `A`, which does not implement the `Copy` trait
+ |
+help: consider borrowing here
+ |
+LL | let b = &a[0];
+ | +
+
+error[E0507]: cannot move out of `**r` which is behind a shared reference
+ --> $DIR/move-errors.rs:19:13
+ |
+LL | let s = **r;
+ | ^^^ move occurs because `**r` has type `A`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let s = **r;
+LL + let s = *r;
+ |
+
+error[E0507]: cannot move out of an `Rc`
+ --> $DIR/move-errors.rs:27:13
+ |
+LL | let s = *r;
+ | ^^ move occurs because value has type `A`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let s = *r;
+LL + let s = r;
+ |
+
+error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
+ --> $DIR/move-errors.rs:32:13
+ |
+LL | let a = [A("".to_string())][0];
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ | |
+ | cannot move out of here
+ | move occurs because value has type `A`, which does not implement the `Copy` trait
+ |
+help: consider borrowing here
+ |
+LL | let a = &[A("".to_string())][0];
+ | +
+
+error[E0507]: cannot move out of `a` which is behind a shared reference
+ --> $DIR/move-errors.rs:38:16
+ |
+LL | let A(s) = *a;
+ | - ^^
+ | |
+ | data moved here
+ | move occurs because `s` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - let A(s) = *a;
+LL + let A(s) = a;
+ |
+
+error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
+ --> $DIR/move-errors.rs:44:19
+ |
+LL | let C(D(s)) = c;
+ | - ^ cannot move out of here
+ | |
+ | data moved here
+ | move occurs because `s` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing the pattern binding
+ |
+LL | let C(D(ref s)) = c;
+ | +++
+
+error[E0507]: cannot move out of `*a` which is behind a shared reference
+ --> $DIR/move-errors.rs:51:9
+ |
+LL | b = *a;
+ | ^^ move occurs because `*a` has type `A`, which does not implement the `Copy` trait
+
+error[E0508]: cannot move out of type `[B; 1]`, a non-copy array
+ --> $DIR/move-errors.rs:74:11
+ |
+LL | match x[0] {
+ | ^^^^ cannot move out of here
+LL |
+LL | B::U(d) => (),
+ | - data moved here
+LL | B::V(s) => (),
+ | - ...and here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider borrowing here
+ |
+LL | match &x[0] {
+ | +
+
+error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
+ --> $DIR/move-errors.rs:83:11
+ |
+LL | match x {
+ | ^ cannot move out of here
+...
+LL | B::U(D(s)) => (),
+ | -
+ | |
+ | data moved here
+ | move occurs because `s` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing the pattern binding
+ |
+LL | B::U(D(ref s)) => (),
+ | +++
+
+error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
+ --> $DIR/move-errors.rs:92:11
+ |
+LL | match x {
+ | ^ cannot move out of here
+...
+LL | (D(s), &t) => (),
+ | -
+ | |
+ | data moved here
+ | move occurs because `s` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing the pattern binding
+ |
+LL | (D(ref s), &t) => (),
+ | +++
+
+error[E0507]: cannot move out of `*x.1` which is behind a shared reference
+ --> $DIR/move-errors.rs:92:11
+ |
+LL | match x {
+ | ^
+...
+LL | (D(s), &t) => (),
+ | -
+ | |
+ | data moved here
+ | move occurs because `t` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing the pattern binding
+ |
+LL | (D(s), &ref t) => (),
+ | +++
+
+error[E0509]: cannot move out of type `F`, which implements the `Drop` trait
+ --> $DIR/move-errors.rs:102:11
+ |
+LL | match x {
+ | ^ cannot move out of here
+LL |
+LL | F(s, mut t) => (),
+ | - ----- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider borrowing the pattern binding
+ |
+LL | F(ref s, mut t) => (),
+ | +++
+help: consider borrowing the pattern binding
+ |
+LL | F(s, ref mut t) => (),
+ | +++
+
+error[E0507]: cannot move out of `x` as enum variant `Err` which is behind a shared reference
+ --> $DIR/move-errors.rs:110:11
+ |
+LL | match *x {
+ | ^^
+LL |
+LL | Ok(s) | Err(s) => (),
+ | -
+ | |
+ | data moved here
+ | move occurs because `s` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider removing the dereference here
+ |
+LL - match *x {
+LL + match x {
+ |
+
+error: aborting due to 14 previous errors
+
+Some errors have detailed explanations: E0507, E0508, E0509.
+For more information about an error, try `rustc --explain E0507`.
diff --git a/src/test/ui/nll/move-subpaths-moves-root.rs b/tests/ui/nll/move-subpaths-moves-root.rs
index d266c6bb6..d266c6bb6 100644
--- a/src/test/ui/nll/move-subpaths-moves-root.rs
+++ b/tests/ui/nll/move-subpaths-moves-root.rs
diff --git a/src/test/ui/nll/move-subpaths-moves-root.stderr b/tests/ui/nll/move-subpaths-moves-root.stderr
index ae9287f92..ae9287f92 100644
--- a/src/test/ui/nll/move-subpaths-moves-root.stderr
+++ b/tests/ui/nll/move-subpaths-moves-root.stderr
diff --git a/src/test/ui/nll/mutating_references.rs b/tests/ui/nll/mutating_references.rs
index eb46b30b6..eb46b30b6 100644
--- a/src/test/ui/nll/mutating_references.rs
+++ b/tests/ui/nll/mutating_references.rs
diff --git a/src/test/ui/nll/normalization-bounds-error.rs b/tests/ui/nll/normalization-bounds-error.rs
index b6cfcd987..b6cfcd987 100644
--- a/src/test/ui/nll/normalization-bounds-error.rs
+++ b/tests/ui/nll/normalization-bounds-error.rs
diff --git a/src/test/ui/nll/normalization-bounds-error.stderr b/tests/ui/nll/normalization-bounds-error.stderr
index 6abe53127..0fc3670d6 100644
--- a/src/test/ui/nll/normalization-bounds-error.stderr
+++ b/tests/ui/nll/normalization-bounds-error.stderr
@@ -1,8 +1,8 @@
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'d` due to conflicting requirements
- --> $DIR/normalization-bounds-error.rs:12:1
+ --> $DIR/normalization-bounds-error.rs:12:31
|
LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime `'d` as defined here...
--> $DIR/normalization-bounds-error.rs:12:14
@@ -15,10 +15,10 @@ note: ...but the lifetime must also be valid for the lifetime `'a` as defined he
LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
| ^^
note: ...so that the types are compatible
- --> $DIR/normalization-bounds-error.rs:12:1
+ --> $DIR/normalization-bounds-error.rs:12:31
|
LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: expected `Visitor<'d>`
found `Visitor<'_>`
diff --git a/src/test/ui/nll/normalization-bounds.rs b/tests/ui/nll/normalization-bounds.rs
index bb6d981e0..bb6d981e0 100644
--- a/src/test/ui/nll/normalization-bounds.rs
+++ b/tests/ui/nll/normalization-bounds.rs
diff --git a/src/test/ui/nll/outlives-suggestion-more.rs b/tests/ui/nll/outlives-suggestion-more.rs
index 2e1359fe5..2e1359fe5 100644
--- a/src/test/ui/nll/outlives-suggestion-more.rs
+++ b/tests/ui/nll/outlives-suggestion-more.rs
diff --git a/src/test/ui/nll/outlives-suggestion-more.stderr b/tests/ui/nll/outlives-suggestion-more.stderr
index c8c604b5b..c8c604b5b 100644
--- a/src/test/ui/nll/outlives-suggestion-more.stderr
+++ b/tests/ui/nll/outlives-suggestion-more.stderr
diff --git a/src/test/ui/nll/outlives-suggestion-simple.polonius.stderr b/tests/ui/nll/outlives-suggestion-simple.polonius.stderr
index c00288f2e..c00288f2e 100644
--- a/src/test/ui/nll/outlives-suggestion-simple.polonius.stderr
+++ b/tests/ui/nll/outlives-suggestion-simple.polonius.stderr
diff --git a/src/test/ui/nll/outlives-suggestion-simple.rs b/tests/ui/nll/outlives-suggestion-simple.rs
index 2a5c31e3a..2a5c31e3a 100644
--- a/src/test/ui/nll/outlives-suggestion-simple.rs
+++ b/tests/ui/nll/outlives-suggestion-simple.rs
diff --git a/src/test/ui/nll/outlives-suggestion-simple.stderr b/tests/ui/nll/outlives-suggestion-simple.stderr
index a8368c494..a8368c494 100644
--- a/src/test/ui/nll/outlives-suggestion-simple.stderr
+++ b/tests/ui/nll/outlives-suggestion-simple.stderr
diff --git a/src/test/ui/nll/polonius/assignment-kills-loans.rs b/tests/ui/nll/polonius/assignment-kills-loans.rs
index 696bf61ce..696bf61ce 100644
--- a/src/test/ui/nll/polonius/assignment-kills-loans.rs
+++ b/tests/ui/nll/polonius/assignment-kills-loans.rs
diff --git a/src/test/ui/nll/polonius/assignment-to-differing-field.rs b/tests/ui/nll/polonius/assignment-to-differing-field.rs
index 7ec3b9049..7ec3b9049 100644
--- a/src/test/ui/nll/polonius/assignment-to-differing-field.rs
+++ b/tests/ui/nll/polonius/assignment-to-differing-field.rs
diff --git a/src/test/ui/nll/polonius/assignment-to-differing-field.stderr b/tests/ui/nll/polonius/assignment-to-differing-field.stderr
index afa1b9344..afa1b9344 100644
--- a/src/test/ui/nll/polonius/assignment-to-differing-field.stderr
+++ b/tests/ui/nll/polonius/assignment-to-differing-field.stderr
diff --git a/src/test/ui/nll/polonius/call-kills-loans.rs b/tests/ui/nll/polonius/call-kills-loans.rs
index f430e9211..f430e9211 100644
--- a/src/test/ui/nll/polonius/call-kills-loans.rs
+++ b/tests/ui/nll/polonius/call-kills-loans.rs
diff --git a/src/test/ui/nll/polonius/issue-46589.rs b/tests/ui/nll/polonius/issue-46589.rs
index 648280a1d..648280a1d 100644
--- a/src/test/ui/nll/polonius/issue-46589.rs
+++ b/tests/ui/nll/polonius/issue-46589.rs
diff --git a/src/test/ui/nll/polonius/polonius-smoke-test.rs b/tests/ui/nll/polonius/polonius-smoke-test.rs
index c4344af71..c4344af71 100644
--- a/src/test/ui/nll/polonius/polonius-smoke-test.rs
+++ b/tests/ui/nll/polonius/polonius-smoke-test.rs
diff --git a/src/test/ui/nll/polonius/polonius-smoke-test.stderr b/tests/ui/nll/polonius/polonius-smoke-test.stderr
index fa1a6a9c9..fa1a6a9c9 100644
--- a/src/test/ui/nll/polonius/polonius-smoke-test.stderr
+++ b/tests/ui/nll/polonius/polonius-smoke-test.stderr
diff --git a/src/test/ui/nll/polonius/storagedead-kills-loans.rs b/tests/ui/nll/polonius/storagedead-kills-loans.rs
index 669e077de..669e077de 100644
--- a/src/test/ui/nll/polonius/storagedead-kills-loans.rs
+++ b/tests/ui/nll/polonius/storagedead-kills-loans.rs
diff --git a/src/test/ui/nll/polonius/subset-relations.rs b/tests/ui/nll/polonius/subset-relations.rs
index f223ab177..f223ab177 100644
--- a/src/test/ui/nll/polonius/subset-relations.rs
+++ b/tests/ui/nll/polonius/subset-relations.rs
diff --git a/src/test/ui/nll/polonius/subset-relations.stderr b/tests/ui/nll/polonius/subset-relations.stderr
index 6df5563ea..6df5563ea 100644
--- a/src/test/ui/nll/polonius/subset-relations.stderr
+++ b/tests/ui/nll/polonius/subset-relations.stderr
diff --git a/src/test/ui/nll/process_or_insert_default.rs b/tests/ui/nll/process_or_insert_default.rs
index 84ac9bbd0..84ac9bbd0 100644
--- a/src/test/ui/nll/process_or_insert_default.rs
+++ b/tests/ui/nll/process_or_insert_default.rs
diff --git a/src/test/ui/nll/projection-return.rs b/tests/ui/nll/projection-return.rs
index be141339a..be141339a 100644
--- a/src/test/ui/nll/projection-return.rs
+++ b/tests/ui/nll/projection-return.rs
diff --git a/src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs b/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs
index 3b06b0db3..3b06b0db3 100644
--- a/src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs
+++ b/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs
diff --git a/src/test/ui/nll/promoted-bounds.rs b/tests/ui/nll/promoted-bounds.rs
index 5f95ae13c..5f95ae13c 100644
--- a/src/test/ui/nll/promoted-bounds.rs
+++ b/tests/ui/nll/promoted-bounds.rs
diff --git a/src/test/ui/nll/promoted-bounds.stderr b/tests/ui/nll/promoted-bounds.stderr
index df347f4e7..df347f4e7 100644
--- a/src/test/ui/nll/promoted-bounds.stderr
+++ b/tests/ui/nll/promoted-bounds.stderr
diff --git a/src/test/ui/nll/promoted-closure-pair.rs b/tests/ui/nll/promoted-closure-pair.rs
index cc9f17fd4..cc9f17fd4 100644
--- a/src/test/ui/nll/promoted-closure-pair.rs
+++ b/tests/ui/nll/promoted-closure-pair.rs
diff --git a/src/test/ui/nll/promoted-closure-pair.stderr b/tests/ui/nll/promoted-closure-pair.stderr
index 000bdf858..000bdf858 100644
--- a/src/test/ui/nll/promoted-closure-pair.stderr
+++ b/tests/ui/nll/promoted-closure-pair.stderr
diff --git a/src/test/ui/nll/promoted-liveness.rs b/tests/ui/nll/promoted-liveness.rs
index e5a8e1e5c..e5a8e1e5c 100644
--- a/src/test/ui/nll/promoted-liveness.rs
+++ b/tests/ui/nll/promoted-liveness.rs
diff --git a/src/test/ui/nll/rc-loop.rs b/tests/ui/nll/rc-loop.rs
index e59303d1f..e59303d1f 100644
--- a/src/test/ui/nll/rc-loop.rs
+++ b/tests/ui/nll/rc-loop.rs
diff --git a/src/test/ui/nll/ref-suggestion.rs b/tests/ui/nll/ref-suggestion.rs
index 346d118f0..346d118f0 100644
--- a/src/test/ui/nll/ref-suggestion.rs
+++ b/tests/ui/nll/ref-suggestion.rs
diff --git a/src/test/ui/nll/ref-suggestion.stderr b/tests/ui/nll/ref-suggestion.stderr
index b1f5117cb..b1f5117cb 100644
--- a/src/test/ui/nll/ref-suggestion.stderr
+++ b/tests/ui/nll/ref-suggestion.stderr
diff --git a/src/test/ui/nll/reference-carried-through-struct-field.rs b/tests/ui/nll/reference-carried-through-struct-field.rs
index effd61084..effd61084 100644
--- a/src/test/ui/nll/reference-carried-through-struct-field.rs
+++ b/tests/ui/nll/reference-carried-through-struct-field.rs
diff --git a/src/test/ui/nll/reference-carried-through-struct-field.stderr b/tests/ui/nll/reference-carried-through-struct-field.stderr
index 56d878e43..56d878e43 100644
--- a/src/test/ui/nll/reference-carried-through-struct-field.stderr
+++ b/tests/ui/nll/reference-carried-through-struct-field.stderr
diff --git a/src/test/ui/nll/region-ends-after-if-condition.rs b/tests/ui/nll/region-ends-after-if-condition.rs
index f67de03ca..f67de03ca 100644
--- a/src/test/ui/nll/region-ends-after-if-condition.rs
+++ b/tests/ui/nll/region-ends-after-if-condition.rs
diff --git a/src/test/ui/nll/region-ends-after-if-condition.stderr b/tests/ui/nll/region-ends-after-if-condition.stderr
index c03e38579..c03e38579 100644
--- a/src/test/ui/nll/region-ends-after-if-condition.stderr
+++ b/tests/ui/nll/region-ends-after-if-condition.stderr
diff --git a/src/test/ui/nll/relate_tys/fn-subtype.rs b/tests/ui/nll/relate_tys/fn-subtype.rs
index ba89fa19c..ba89fa19c 100644
--- a/src/test/ui/nll/relate_tys/fn-subtype.rs
+++ b/tests/ui/nll/relate_tys/fn-subtype.rs
diff --git a/src/test/ui/nll/relate_tys/fn-subtype.stderr b/tests/ui/nll/relate_tys/fn-subtype.stderr
index 21073647e..21073647e 100644
--- a/src/test/ui/nll/relate_tys/fn-subtype.stderr
+++ b/tests/ui/nll/relate_tys/fn-subtype.stderr
diff --git a/src/test/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs
index 7891bab09..7891bab09 100644
--- a/src/test/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs
+++ b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs
diff --git a/src/test/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr
index 7d76c916d..7d76c916d 100644
--- a/src/test/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr
+++ b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr
diff --git a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs b/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs
index 92730341c..92730341c 100644
--- a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs
+++ b/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs
diff --git a/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs
index 7cc0acf45..7cc0acf45 100644
--- a/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs
+++ b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs
diff --git a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs
index 05e2ea047..05e2ea047 100644
--- a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs
+++ b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs
diff --git a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr
index b945ffedd..b945ffedd 100644
--- a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr
+++ b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr
diff --git a/src/test/ui/nll/relate_tys/issue-48071.rs b/tests/ui/nll/relate_tys/issue-48071.rs
index 73361a0d3..73361a0d3 100644
--- a/src/test/ui/nll/relate_tys/issue-48071.rs
+++ b/tests/ui/nll/relate_tys/issue-48071.rs
diff --git a/src/test/ui/nll/relate_tys/opaque-hrtb.rs b/tests/ui/nll/relate_tys/opaque-hrtb.rs
index 261372523..261372523 100644
--- a/src/test/ui/nll/relate_tys/opaque-hrtb.rs
+++ b/tests/ui/nll/relate_tys/opaque-hrtb.rs
diff --git a/src/test/ui/nll/relate_tys/opaque-hrtb.stderr b/tests/ui/nll/relate_tys/opaque-hrtb.stderr
index d75ec2b57..d75ec2b57 100644
--- a/src/test/ui/nll/relate_tys/opaque-hrtb.stderr
+++ b/tests/ui/nll/relate_tys/opaque-hrtb.stderr
diff --git a/src/test/ui/nll/relate_tys/trait-hrtb.rs b/tests/ui/nll/relate_tys/trait-hrtb.rs
index 7f40e93cd..7f40e93cd 100644
--- a/src/test/ui/nll/relate_tys/trait-hrtb.rs
+++ b/tests/ui/nll/relate_tys/trait-hrtb.rs
diff --git a/src/test/ui/nll/relate_tys/trait-hrtb.stderr b/tests/ui/nll/relate_tys/trait-hrtb.stderr
index aa1927711..aa1927711 100644
--- a/src/test/ui/nll/relate_tys/trait-hrtb.stderr
+++ b/tests/ui/nll/relate_tys/trait-hrtb.stderr
diff --git a/src/test/ui/nll/relate_tys/universe-violation.rs b/tests/ui/nll/relate_tys/universe-violation.rs
index c5f9d4406..c5f9d4406 100644
--- a/src/test/ui/nll/relate_tys/universe-violation.rs
+++ b/tests/ui/nll/relate_tys/universe-violation.rs
diff --git a/src/test/ui/nll/relate_tys/universe-violation.stderr b/tests/ui/nll/relate_tys/universe-violation.stderr
index fe801b42c..fe801b42c 100644
--- a/src/test/ui/nll/relate_tys/universe-violation.stderr
+++ b/tests/ui/nll/relate_tys/universe-violation.stderr
diff --git a/src/test/ui/nll/relate_tys/var-appears-twice.rs b/tests/ui/nll/relate_tys/var-appears-twice.rs
index 77129f446..77129f446 100644
--- a/src/test/ui/nll/relate_tys/var-appears-twice.rs
+++ b/tests/ui/nll/relate_tys/var-appears-twice.rs
diff --git a/src/test/ui/nll/relate_tys/var-appears-twice.stderr b/tests/ui/nll/relate_tys/var-appears-twice.stderr
index d032ce6f2..d032ce6f2 100644
--- a/src/test/ui/nll/relate_tys/var-appears-twice.stderr
+++ b/tests/ui/nll/relate_tys/var-appears-twice.stderr
diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.rs b/tests/ui/nll/return-ref-mut-issue-46557.rs
index dca61d39d..dca61d39d 100644
--- a/src/test/ui/nll/return-ref-mut-issue-46557.rs
+++ b/tests/ui/nll/return-ref-mut-issue-46557.rs
diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.stderr b/tests/ui/nll/return-ref-mut-issue-46557.stderr
index 720440a0a..720440a0a 100644
--- a/src/test/ui/nll/return-ref-mut-issue-46557.stderr
+++ b/tests/ui/nll/return-ref-mut-issue-46557.stderr
diff --git a/src/test/ui/nll/return_from_loop.rs b/tests/ui/nll/return_from_loop.rs
index 495410894..495410894 100644
--- a/src/test/ui/nll/return_from_loop.rs
+++ b/tests/ui/nll/return_from_loop.rs
diff --git a/src/test/ui/nll/return_from_loop.stderr b/tests/ui/nll/return_from_loop.stderr
index bd2b8b158..bd2b8b158 100644
--- a/src/test/ui/nll/return_from_loop.stderr
+++ b/tests/ui/nll/return_from_loop.stderr
diff --git a/src/test/ui/nll/self-assign-ref-mut.rs b/tests/ui/nll/self-assign-ref-mut.rs
index 1ca4cf3a7..1ca4cf3a7 100644
--- a/src/test/ui/nll/self-assign-ref-mut.rs
+++ b/tests/ui/nll/self-assign-ref-mut.rs
diff --git a/src/test/ui/nll/snocat-regression.rs b/tests/ui/nll/snocat-regression.rs
index b2e5995aa..b2e5995aa 100644
--- a/src/test/ui/nll/snocat-regression.rs
+++ b/tests/ui/nll/snocat-regression.rs
diff --git a/src/test/ui/nll/snocat-regression.stderr b/tests/ui/nll/snocat-regression.stderr
index 086898473..086898473 100644
--- a/src/test/ui/nll/snocat-regression.stderr
+++ b/tests/ui/nll/snocat-regression.stderr
diff --git a/src/test/ui/nll/trait-associated-constant.rs b/tests/ui/nll/trait-associated-constant.rs
index e13ae80f9..e13ae80f9 100644
--- a/src/test/ui/nll/trait-associated-constant.rs
+++ b/tests/ui/nll/trait-associated-constant.rs
diff --git a/src/test/ui/nll/trait-associated-constant.stderr b/tests/ui/nll/trait-associated-constant.stderr
index cf1c52ba7..cf1c52ba7 100644
--- a/src/test/ui/nll/trait-associated-constant.stderr
+++ b/tests/ui/nll/trait-associated-constant.stderr
diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.rs b/tests/ui/nll/ty-outlives/impl-trait-captures.rs
index 67b31b8bc..67b31b8bc 100644
--- a/src/test/ui/nll/ty-outlives/impl-trait-captures.rs
+++ b/tests/ui/nll/ty-outlives/impl-trait-captures.rs
diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr b/tests/ui/nll/ty-outlives/impl-trait-captures.stderr
index 7b9ed171d..7b9ed171d 100644
--- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
+++ b/tests/ui/nll/ty-outlives/impl-trait-captures.stderr
diff --git a/src/test/ui/nll/ty-outlives/impl-trait-outlives.rs b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs
index 68ccb51fc..68ccb51fc 100644
--- a/src/test/ui/nll/ty-outlives/impl-trait-outlives.rs
+++ b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs
diff --git a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr b/tests/ui/nll/ty-outlives/impl-trait-outlives.stderr
index 64b08a9b3..64b08a9b3 100644
--- a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr
+++ b/tests/ui/nll/ty-outlives/impl-trait-outlives.stderr
diff --git a/src/test/ui/nll/ty-outlives/issue-53789-1.rs b/tests/ui/nll/ty-outlives/issue-53789-1.rs
index a5201d4bb..a5201d4bb 100644
--- a/src/test/ui/nll/ty-outlives/issue-53789-1.rs
+++ b/tests/ui/nll/ty-outlives/issue-53789-1.rs
diff --git a/src/test/ui/nll/ty-outlives/issue-53789-2.rs b/tests/ui/nll/ty-outlives/issue-53789-2.rs
index 5109a0e4a..5109a0e4a 100644
--- a/src/test/ui/nll/ty-outlives/issue-53789-2.rs
+++ b/tests/ui/nll/ty-outlives/issue-53789-2.rs
diff --git a/src/test/ui/nll/ty-outlives/issue-55756.rs b/tests/ui/nll/ty-outlives/issue-55756.rs
index e1a3bc3c4..e1a3bc3c4 100644
--- a/src/test/ui/nll/ty-outlives/issue-55756.rs
+++ b/tests/ui/nll/ty-outlives/issue-55756.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-body.rs b/tests/ui/nll/ty-outlives/projection-body.rs
index b03a539eb..b03a539eb 100644
--- a/src/test/ui/nll/ty-outlives/projection-body.rs
+++ b/tests/ui/nll/ty-outlives/projection-body.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-implied-bounds.rs b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs
index e1dac0824..e1dac0824 100644
--- a/src/test/ui/nll/ty-outlives/projection-implied-bounds.rs
+++ b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr b/tests/ui/nll/ty-outlives/projection-implied-bounds.stderr
index d949e29b2..d949e29b2 100644
--- a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr
+++ b/tests/ui/nll/ty-outlives/projection-implied-bounds.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs
index 2d9c008c7..2d9c008c7 100644
--- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs
+++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
index 4933b9348..4933b9348 100644
--- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs b/tests/ui/nll/ty-outlives/projection-no-regions-fn.rs
index a10a0366a..a10a0366a 100644
--- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs
+++ b/tests/ui/nll/ty-outlives/projection-no-regions-fn.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr b/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr
index e0ff544fe..e0ff544fe 100644
--- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr
+++ b/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs b/tests/ui/nll/ty-outlives/projection-one-region-closure.rs
index af361e990..af361e990 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs
+++ b/tests/ui/nll/ty-outlives/projection-one-region-closure.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/tests/ui/nll/ty-outlives/projection-one-region-closure.stderr
index dbda04c42..dbda04c42 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-one-region-closure.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs
index 6f8513491..6f8513491 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs
+++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
index 250c796e2..250c796e2 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs
index 7c0a3bc72..7c0a3bc72 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs
+++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
index b27186b05..b27186b05 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs
index 7b4a3c03a..7b4a3c03a 100644
--- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs
+++ b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
index 90f049142..90f049142 100644
--- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs
index dce88b88c..dce88b88c 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
index b4435fe06..b4435fe06 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
index 987148dce..987148dce 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
index ddeaf3c1f..ddeaf3c1f 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs b/tests/ui/nll/ty-outlives/projection-where-clause-env.rs
index a41116232..a41116232 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-none.rs b/tests/ui/nll/ty-outlives/projection-where-clause-none.rs
index bb201e5c0..bb201e5c0 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-none.rs
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-none.rs
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-none.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-none.stderr
index 0df44644d..0df44644d 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-none.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-none.stderr
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs b/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs
index 1a40d3b4c..1a40d3b4c 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs
index 4d8380599..4d8380599 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
index a442cf12d..a442cf12d 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs
index 4343c3aee..4343c3aee 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
index 35979c8bf..35979c8bf 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs
index b80287610..b80287610 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
index 4c97db58c..4c97db58c 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs b/tests/ui/nll/ty-outlives/ty-param-fn-body.rs
index 98239f416..98239f416 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs
+++ b/tests/ui/nll/ty-outlives/ty-param-fn-body.rs
diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr b/tests/ui/nll/ty-outlives/ty-param-fn-body.stderr
index 5fb69255d..5fb69255d 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-fn-body.stderr
diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.rs b/tests/ui/nll/ty-outlives/ty-param-fn.rs
index 4393a3b41..4393a3b41 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-fn.rs
+++ b/tests/ui/nll/ty-outlives/ty-param-fn.rs
diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr b/tests/ui/nll/ty-outlives/ty-param-fn.stderr
index 825b26d2f..825b26d2f 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-fn.stderr
diff --git a/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs
index 9042844e8..9042844e8 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs
+++ b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs
diff --git a/src/test/ui/nll/ty-outlives/wf-unreachable.rs b/tests/ui/nll/ty-outlives/wf-unreachable.rs
index c6f4c4afa..c6f4c4afa 100644
--- a/src/test/ui/nll/ty-outlives/wf-unreachable.rs
+++ b/tests/ui/nll/ty-outlives/wf-unreachable.rs
diff --git a/tests/ui/nll/ty-outlives/wf-unreachable.stderr b/tests/ui/nll/ty-outlives/wf-unreachable.stderr
new file mode 100644
index 000000000..da3bc2083
--- /dev/null
+++ b/tests/ui/nll/ty-outlives/wf-unreachable.stderr
@@ -0,0 +1,73 @@
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:6:12
+ |
+LL | fn uninit<'a>() {
+ | -- lifetime `'a` defined here
+LL | return;
+LL | let x: &'static &'a ();
+ | ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:11:12
+ |
+LL | fn var_type<'a>() {
+ | -- lifetime `'a` defined here
+LL | return;
+LL | let x: &'static &'a () = &&();
+ | ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:15:12
+ |
+LL | fn uninit_infer<'a>() {
+ | -- lifetime `'a` defined here
+LL | let x: &'static &'a _;
+ | ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:21:12
+ |
+LL | fn infer<'a>() {
+ | -- lifetime `'a` defined here
+LL | return;
+LL | let x: &'static &'a _ = &&();
+ | ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:26:12
+ |
+LL | fn uninit_no_var<'a>() {
+ | -- lifetime `'a` defined here
+LL | return;
+LL | let _: &'static &'a ();
+ | ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:31:12
+ |
+LL | fn no_var<'a>() {
+ | -- lifetime `'a` defined here
+LL | return;
+LL | let _: &'static &'a () = &&();
+ | ^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:36:12
+ |
+LL | fn infer_no_var<'a>() {
+ | -- lifetime `'a` defined here
+LL | return;
+LL | let _: &'static &'a _ = &&();
+ | ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/wf-unreachable.rs:49:12
+ |
+LL | fn required_substs<'a>() {
+ | -- lifetime `'a` defined here
+LL | return;
+LL | let _: C<'static, 'a, _> = C((), &(), &());
+ | ^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: aborting due to 8 previous errors
+
diff --git a/src/test/ui/nll/type-alias-free-regions.rs b/tests/ui/nll/type-alias-free-regions.rs
index fd5566f35..fd5566f35 100644
--- a/src/test/ui/nll/type-alias-free-regions.rs
+++ b/tests/ui/nll/type-alias-free-regions.rs
diff --git a/src/test/ui/nll/type-alias-free-regions.stderr b/tests/ui/nll/type-alias-free-regions.stderr
index 45fd5a2f1..45fd5a2f1 100644
--- a/src/test/ui/nll/type-alias-free-regions.stderr
+++ b/tests/ui/nll/type-alias-free-regions.stderr
diff --git a/src/test/ui/nll/type-check-pointer-coercions.rs b/tests/ui/nll/type-check-pointer-coercions.rs
index 66da57248..66da57248 100644
--- a/src/test/ui/nll/type-check-pointer-coercions.rs
+++ b/tests/ui/nll/type-check-pointer-coercions.rs
diff --git a/src/test/ui/nll/type-check-pointer-coercions.stderr b/tests/ui/nll/type-check-pointer-coercions.stderr
index ef2d92878..ef2d92878 100644
--- a/src/test/ui/nll/type-check-pointer-coercions.stderr
+++ b/tests/ui/nll/type-check-pointer-coercions.stderr
diff --git a/src/test/ui/nll/type-check-pointer-comparisons.rs b/tests/ui/nll/type-check-pointer-comparisons.rs
index 7b0ffeaef..7b0ffeaef 100644
--- a/src/test/ui/nll/type-check-pointer-comparisons.rs
+++ b/tests/ui/nll/type-check-pointer-comparisons.rs
diff --git a/src/test/ui/nll/type-check-pointer-comparisons.stderr b/tests/ui/nll/type-check-pointer-comparisons.stderr
index 0d8480a42..0d8480a42 100644
--- a/src/test/ui/nll/type-check-pointer-comparisons.stderr
+++ b/tests/ui/nll/type-check-pointer-comparisons.stderr
diff --git a/src/test/ui/nll/type-test-universe.rs b/tests/ui/nll/type-test-universe.rs
index f9801c07d..f9801c07d 100644
--- a/src/test/ui/nll/type-test-universe.rs
+++ b/tests/ui/nll/type-test-universe.rs
diff --git a/src/test/ui/nll/type-test-universe.stderr b/tests/ui/nll/type-test-universe.stderr
index 31e17d64b..31e17d64b 100644
--- a/src/test/ui/nll/type-test-universe.stderr
+++ b/tests/ui/nll/type-test-universe.stderr
diff --git a/src/test/ui/nll/unused-mut-issue-50343.fixed b/tests/ui/nll/unused-mut-issue-50343.fixed
index 5632de1cd..5632de1cd 100644
--- a/src/test/ui/nll/unused-mut-issue-50343.fixed
+++ b/tests/ui/nll/unused-mut-issue-50343.fixed
diff --git a/src/test/ui/nll/unused-mut-issue-50343.rs b/tests/ui/nll/unused-mut-issue-50343.rs
index c849ac8c7..c849ac8c7 100644
--- a/src/test/ui/nll/unused-mut-issue-50343.rs
+++ b/tests/ui/nll/unused-mut-issue-50343.rs
diff --git a/src/test/ui/nll/unused-mut-issue-50343.stderr b/tests/ui/nll/unused-mut-issue-50343.stderr
index cb02d7620..cb02d7620 100644
--- a/src/test/ui/nll/unused-mut-issue-50343.stderr
+++ b/tests/ui/nll/unused-mut-issue-50343.stderr
diff --git a/src/test/ui/nll/user-annotations/adt-brace-enums.rs b/tests/ui/nll/user-annotations/adt-brace-enums.rs
index 0d9828342..0d9828342 100644
--- a/src/test/ui/nll/user-annotations/adt-brace-enums.rs
+++ b/tests/ui/nll/user-annotations/adt-brace-enums.rs
diff --git a/src/test/ui/nll/user-annotations/adt-brace-enums.stderr b/tests/ui/nll/user-annotations/adt-brace-enums.stderr
index 253e38251..253e38251 100644
--- a/src/test/ui/nll/user-annotations/adt-brace-enums.stderr
+++ b/tests/ui/nll/user-annotations/adt-brace-enums.stderr
diff --git a/src/test/ui/nll/user-annotations/adt-brace-structs.rs b/tests/ui/nll/user-annotations/adt-brace-structs.rs
index bdbfd87d5..bdbfd87d5 100644
--- a/src/test/ui/nll/user-annotations/adt-brace-structs.rs
+++ b/tests/ui/nll/user-annotations/adt-brace-structs.rs
diff --git a/src/test/ui/nll/user-annotations/adt-brace-structs.stderr b/tests/ui/nll/user-annotations/adt-brace-structs.stderr
index 8b9d1705d..8b9d1705d 100644
--- a/src/test/ui/nll/user-annotations/adt-brace-structs.stderr
+++ b/tests/ui/nll/user-annotations/adt-brace-structs.stderr
diff --git a/src/test/ui/nll/user-annotations/adt-nullary-enums.rs b/tests/ui/nll/user-annotations/adt-nullary-enums.rs
index 53853668d..53853668d 100644
--- a/src/test/ui/nll/user-annotations/adt-nullary-enums.rs
+++ b/tests/ui/nll/user-annotations/adt-nullary-enums.rs
diff --git a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr b/tests/ui/nll/user-annotations/adt-nullary-enums.stderr
index 3326fa521..3326fa521 100644
--- a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr
+++ b/tests/ui/nll/user-annotations/adt-nullary-enums.stderr
diff --git a/src/test/ui/nll/user-annotations/adt-tuple-enums.rs b/tests/ui/nll/user-annotations/adt-tuple-enums.rs
index efe8dfda1..efe8dfda1 100644
--- a/src/test/ui/nll/user-annotations/adt-tuple-enums.rs
+++ b/tests/ui/nll/user-annotations/adt-tuple-enums.rs
diff --git a/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr b/tests/ui/nll/user-annotations/adt-tuple-enums.stderr
index 2fa704263..2fa704263 100644
--- a/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr
+++ b/tests/ui/nll/user-annotations/adt-tuple-enums.stderr
diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.rs b/tests/ui/nll/user-annotations/adt-tuple-struct-calls.rs
index 116583223..116583223 100644
--- a/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.rs
+++ b/tests/ui/nll/user-annotations/adt-tuple-struct-calls.rs
diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr b/tests/ui/nll/user-annotations/adt-tuple-struct-calls.stderr
index 9664fb9f5..9664fb9f5 100644
--- a/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr
+++ b/tests/ui/nll/user-annotations/adt-tuple-struct-calls.stderr
diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct.rs b/tests/ui/nll/user-annotations/adt-tuple-struct.rs
index 37284e1fd..37284e1fd 100644
--- a/src/test/ui/nll/user-annotations/adt-tuple-struct.rs
+++ b/tests/ui/nll/user-annotations/adt-tuple-struct.rs
diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr b/tests/ui/nll/user-annotations/adt-tuple-struct.stderr
index 76b525225..76b525225 100644
--- a/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr
+++ b/tests/ui/nll/user-annotations/adt-tuple-struct.stderr
diff --git a/tests/ui/nll/user-annotations/ascribed-type-wf.rs b/tests/ui/nll/user-annotations/ascribed-type-wf.rs
new file mode 100644
index 000000000..5db02c46e
--- /dev/null
+++ b/tests/ui/nll/user-annotations/ascribed-type-wf.rs
@@ -0,0 +1,17 @@
+// Regression test for #101350.
+// check-fail
+
+trait Trait {
+ type Ty;
+}
+
+impl Trait for &'static () {
+ type Ty = ();
+}
+
+fn extend<'a>() {
+ None::<<&'a () as Trait>::Ty>;
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn main() {}
diff --git a/tests/ui/nll/user-annotations/ascribed-type-wf.stderr b/tests/ui/nll/user-annotations/ascribed-type-wf.stderr
new file mode 100644
index 000000000..91e7c6b8e
--- /dev/null
+++ b/tests/ui/nll/user-annotations/ascribed-type-wf.stderr
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+ --> $DIR/ascribed-type-wf.rs:13:5
+ |
+LL | fn extend<'a>() {
+ | -- lifetime `'a` defined here
+LL | None::<<&'a () as Trait>::Ty>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/nll/user-annotations/cast_static_lifetime.rs b/tests/ui/nll/user-annotations/cast_static_lifetime.rs
index bb6129dac..bb6129dac 100644
--- a/src/test/ui/nll/user-annotations/cast_static_lifetime.rs
+++ b/tests/ui/nll/user-annotations/cast_static_lifetime.rs
diff --git a/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr b/tests/ui/nll/user-annotations/cast_static_lifetime.stderr
index 4599d04e7..4599d04e7 100644
--- a/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr
+++ b/tests/ui/nll/user-annotations/cast_static_lifetime.stderr
diff --git a/tests/ui/nll/user-annotations/closure-sig.rs b/tests/ui/nll/user-annotations/closure-sig.rs
new file mode 100644
index 000000000..4dbd3fd8d
--- /dev/null
+++ b/tests/ui/nll/user-annotations/closure-sig.rs
@@ -0,0 +1,15 @@
+// This test fails if #104478 is fixed before #104477.
+
+// check-pass
+
+struct Printer<'a, 'b>(&'a (), &'b ());
+
+impl Printer<'_, '_> {
+ fn test(self) {
+ let clo = |_: &'_ Self| {};
+ clo(&self);
+ clo(&self);
+ }
+}
+
+fn main() {}
diff --git a/src/test/ui/nll/user-annotations/closure-substs.polonius.stderr b/tests/ui/nll/user-annotations/closure-substs.polonius.stderr
index af159a6cd..af159a6cd 100644
--- a/src/test/ui/nll/user-annotations/closure-substs.polonius.stderr
+++ b/tests/ui/nll/user-annotations/closure-substs.polonius.stderr
diff --git a/src/test/ui/nll/user-annotations/closure-substs.rs b/tests/ui/nll/user-annotations/closure-substs.rs
index f7af54e8d..f7af54e8d 100644
--- a/src/test/ui/nll/user-annotations/closure-substs.rs
+++ b/tests/ui/nll/user-annotations/closure-substs.rs
diff --git a/src/test/ui/nll/user-annotations/closure-substs.stderr b/tests/ui/nll/user-annotations/closure-substs.stderr
index 1e8de4ba9..1e8de4ba9 100644
--- a/src/test/ui/nll/user-annotations/closure-substs.stderr
+++ b/tests/ui/nll/user-annotations/closure-substs.stderr
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs b/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.rs
index e3a8a5f58..e3a8a5f58 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs
+++ b/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.rs
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr b/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
index c39301588..c39301588 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs b/tests/ui/nll/user-annotations/constant-in-expr-inherent-2.rs
index 90696d4b1..90696d4b1 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs
+++ b/tests/ui/nll/user-annotations/constant-in-expr-inherent-2.rs
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr b/tests/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr
index 12065a85a..12065a85a 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs b/tests/ui/nll/user-annotations/constant-in-expr-normalize.rs
index b7095430d..b7095430d 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs
+++ b/tests/ui/nll/user-annotations/constant-in-expr-normalize.rs
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr b/tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr
index 541a2cfaf..541a2cfaf 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs
index e0400b2cc..e0400b2cc 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
index ea0fcb6d6..ea0fcb6d6 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs
index 73c4e577b..73c4e577b 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr
index ff549f1d8..ff549f1d8 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs
index 567e31ef9..567e31ef9 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr
index 7f160d8e3..7f160d8e3 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr
diff --git a/src/test/ui/nll/user-annotations/downcast-infer.rs b/tests/ui/nll/user-annotations/downcast-infer.rs
index b27429f4d..b27429f4d 100644
--- a/src/test/ui/nll/user-annotations/downcast-infer.rs
+++ b/tests/ui/nll/user-annotations/downcast-infer.rs
diff --git a/src/test/ui/nll/user-annotations/dump-adt-brace-struct.rs b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs
index ccda9129d..ccda9129d 100644
--- a/src/test/ui/nll/user-annotations/dump-adt-brace-struct.rs
+++ b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs
diff --git a/src/test/ui/nll/user-annotations/dump-adt-brace-struct.stderr b/tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr
index 586062190..586062190 100644
--- a/src/test/ui/nll/user-annotations/dump-adt-brace-struct.stderr
+++ b/tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr
diff --git a/src/test/ui/nll/user-annotations/dump-fn-method.rs b/tests/ui/nll/user-annotations/dump-fn-method.rs
index 148d63d84..148d63d84 100644
--- a/src/test/ui/nll/user-annotations/dump-fn-method.rs
+++ b/tests/ui/nll/user-annotations/dump-fn-method.rs
diff --git a/src/test/ui/nll/user-annotations/dump-fn-method.stderr b/tests/ui/nll/user-annotations/dump-fn-method.stderr
index d139efa88..d139efa88 100644
--- a/src/test/ui/nll/user-annotations/dump-fn-method.stderr
+++ b/tests/ui/nll/user-annotations/dump-fn-method.stderr
diff --git a/src/test/ui/nll/user-annotations/fns.rs b/tests/ui/nll/user-annotations/fns.rs
index 38db6d1c4..38db6d1c4 100644
--- a/src/test/ui/nll/user-annotations/fns.rs
+++ b/tests/ui/nll/user-annotations/fns.rs
diff --git a/src/test/ui/nll/user-annotations/fns.stderr b/tests/ui/nll/user-annotations/fns.stderr
index e0640da39..e0640da39 100644
--- a/src/test/ui/nll/user-annotations/fns.stderr
+++ b/tests/ui/nll/user-annotations/fns.stderr
diff --git a/src/test/ui/nll/user-annotations/inherent-associated-constants.rs b/tests/ui/nll/user-annotations/inherent-associated-constants.rs
index fe2641fd6..fe2641fd6 100644
--- a/src/test/ui/nll/user-annotations/inherent-associated-constants.rs
+++ b/tests/ui/nll/user-annotations/inherent-associated-constants.rs
diff --git a/src/test/ui/nll/user-annotations/inherent-associated-constants.stderr b/tests/ui/nll/user-annotations/inherent-associated-constants.stderr
index ffbfc40f5..ffbfc40f5 100644
--- a/src/test/ui/nll/user-annotations/inherent-associated-constants.stderr
+++ b/tests/ui/nll/user-annotations/inherent-associated-constants.stderr
diff --git a/src/test/ui/nll/user-annotations/issue-54124.rs b/tests/ui/nll/user-annotations/issue-54124.rs
index 5ae03c894..5ae03c894 100644
--- a/src/test/ui/nll/user-annotations/issue-54124.rs
+++ b/tests/ui/nll/user-annotations/issue-54124.rs
diff --git a/src/test/ui/nll/user-annotations/issue-54124.stderr b/tests/ui/nll/user-annotations/issue-54124.stderr
index 2556af2dd..2556af2dd 100644
--- a/src/test/ui/nll/user-annotations/issue-54124.stderr
+++ b/tests/ui/nll/user-annotations/issue-54124.stderr
diff --git a/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs b/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs
index ff5b2244e..ff5b2244e 100644
--- a/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs
+++ b/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs
diff --git a/src/test/ui/nll/user-annotations/issue-55219.rs b/tests/ui/nll/user-annotations/issue-55219.rs
index 147413663..147413663 100644
--- a/src/test/ui/nll/user-annotations/issue-55219.rs
+++ b/tests/ui/nll/user-annotations/issue-55219.rs
diff --git a/src/test/ui/nll/user-annotations/issue-55241.rs b/tests/ui/nll/user-annotations/issue-55241.rs
index 29969c7b4..29969c7b4 100644
--- a/src/test/ui/nll/user-annotations/issue-55241.rs
+++ b/tests/ui/nll/user-annotations/issue-55241.rs
diff --git a/src/test/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs b/tests/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs
index c71937a50..c71937a50 100644
--- a/src/test/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs
+++ b/tests/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs
diff --git a/src/test/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.stderr b/tests/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.stderr
index 8399ef04e..8399ef04e 100644
--- a/src/test/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.stderr
+++ b/tests/ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.stderr
diff --git a/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs b/tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs
index 95c655654..95c655654 100644
--- a/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs
+++ b/tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs
diff --git a/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr b/tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr
index 8601691e8..8601691e8 100644
--- a/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr
+++ b/tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr
diff --git a/src/test/ui/nll/user-annotations/method-call.rs b/tests/ui/nll/user-annotations/method-call.rs
index beafc597a..beafc597a 100644
--- a/src/test/ui/nll/user-annotations/method-call.rs
+++ b/tests/ui/nll/user-annotations/method-call.rs
diff --git a/src/test/ui/nll/user-annotations/method-call.stderr b/tests/ui/nll/user-annotations/method-call.stderr
index 10447e45a..10447e45a 100644
--- a/src/test/ui/nll/user-annotations/method-call.stderr
+++ b/tests/ui/nll/user-annotations/method-call.stderr
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-1.rs b/tests/ui/nll/user-annotations/method-ufcs-1.rs
index 950771f35..950771f35 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-1.rs
+++ b/tests/ui/nll/user-annotations/method-ufcs-1.rs
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-1.stderr b/tests/ui/nll/user-annotations/method-ufcs-1.stderr
index 962ddfd2b..962ddfd2b 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-1.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-1.stderr
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-2.rs b/tests/ui/nll/user-annotations/method-ufcs-2.rs
index 7dc0f0c12..7dc0f0c12 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-2.rs
+++ b/tests/ui/nll/user-annotations/method-ufcs-2.rs
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-2.stderr b/tests/ui/nll/user-annotations/method-ufcs-2.stderr
index 63d59905e..63d59905e 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-2.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-2.stderr
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-3.rs b/tests/ui/nll/user-annotations/method-ufcs-3.rs
index 59d2009d1..59d2009d1 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-3.rs
+++ b/tests/ui/nll/user-annotations/method-ufcs-3.rs
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr b/tests/ui/nll/user-annotations/method-ufcs-3.stderr
index e7851833e..e7851833e 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-3.stderr
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.rs b/tests/ui/nll/user-annotations/method-ufcs-inherent-1.rs
index 7bfed61d4..7bfed61d4 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.rs
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-1.rs
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr b/tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr
index 94861babd..94861babd 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs b/tests/ui/nll/user-annotations/method-ufcs-inherent-2.rs
index cfbc0bcf6..cfbc0bcf6 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-2.rs
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr b/tests/ui/nll/user-annotations/method-ufcs-inherent-2.stderr
index 06f20d9b2..06f20d9b2 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-2.stderr
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.rs b/tests/ui/nll/user-annotations/method-ufcs-inherent-3.rs
index 7ddb13360..7ddb13360 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.rs
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-3.rs
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr b/tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr
index 4ad61dc81..4ad61dc81 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs b/tests/ui/nll/user-annotations/method-ufcs-inherent-4.rs
index 85e759739..85e759739 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-4.rs
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr b/tests/ui/nll/user-annotations/method-ufcs-inherent-4.stderr
index 0f83e99cd..0f83e99cd 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-4.stderr
diff --git a/tests/ui/nll/user-annotations/normalization-2.rs b/tests/ui/nll/user-annotations/normalization-2.rs
new file mode 100644
index 000000000..be23c3b74
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-2.rs
@@ -0,0 +1,152 @@
+// Make sure we honor region constraints when normalizing type annotations.
+
+// check-fail
+
+#![feature(more_qualified_paths)]
+
+trait Trait {
+ type Assoc;
+}
+
+impl<T> Trait for T
+where
+ T: 'static,
+{
+ type Assoc = MyTy<()>;
+}
+
+enum MyTy<T> {
+ Unit,
+ Tuple(),
+ Struct {},
+ Dumb(T),
+}
+
+impl<T> MyTy<T> {
+ const CONST: () = ();
+ fn method<X>() {}
+ fn method2<X>(&self) {}
+}
+
+trait TraitAssoc {
+ const TRAIT_CONST: ();
+ fn trait_method<X>(&self);
+}
+impl<T> TraitAssoc for T {
+ const TRAIT_CONST: () = ();
+ fn trait_method<X>(&self) {}
+}
+
+type Ty<'a> = <&'a () as Trait>::Assoc;
+
+fn test_local<'a>() {
+ let _: Ty<'a> = MyTy::Unit;
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn test_closure_sig<'a, 'b>() {
+ |_: Ty<'a>| {};
+ //~^ ERROR lifetime may not live long enough
+ || -> Option<Ty<'b>> { None };
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ <Ty<'a>>::method::<Ty<'static>>;
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'static>>::method::<Ty<'b>>;
+ //~^ ERROR lifetime may not live long enough
+
+ <Ty<'c>>::trait_method::<Ty<'static>>;
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'static>>::trait_method::<Ty<'d>>;
+ //~^ ERROR lifetime may not live long enough
+
+ <Ty<'e>>::CONST;
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'f>>::TRAIT_CONST;
+ //~^ ERROR lifetime may not live long enough
+
+ <Ty<'static>>::method::<Ty<'static>>;
+ <Ty<'static>>::trait_method::<Ty<'static>>;
+ <Ty<'static>>::CONST;
+ <Ty<'static>>::TRAIT_CONST;
+
+ MyTy::Unit::<Ty<'g>>;
+ //~^ ERROR lifetime may not live long enough
+ MyTy::<Ty<'h>>::Unit;
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn test_call<'a, 'b, 'c>() {
+ <Ty<'a>>::method::<Ty<'static>>();
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'static>>::method::<Ty<'b>>();
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn test_variants<'a, 'b, 'c>() {
+ <Ty<'a>>::Struct {};
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'b>>::Tuple();
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'c>>::Unit;
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn test_method_call<'a, 'b>(x: MyTy<()>) {
+ x.method2::<Ty<'a>>();
+ //~^ ERROR lifetime may not live long enough
+ x.trait_method::<Ty<'b>>();
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn test_struct_path<'a, 'b, 'c, 'd>() {
+ struct Struct<T> { x: Option<T>, }
+
+ trait Project {
+ type Struct;
+ type Enum;
+ }
+ impl<T> Project for T {
+ type Struct = Struct<()>;
+ type Enum = MyTy<()>;
+ }
+
+ // Resolves to enum variant
+ MyTy::<Ty<'a>>::Struct {}; // without SelfTy
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'b> as Project>::Enum::Struct {}; // with SelfTy
+ //~^ ERROR lifetime may not live long enough
+
+ // Resolves to struct and associated type respectively
+ Struct::<Ty<'c>> { x: None, }; // without SelfTy
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'d> as Project>::Struct { x: None, }; // with SelfTy
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn test_pattern<'a, 'b, 'c, 'd, 'e, 'f>() {
+ use MyTy::*;
+ match MyTy::Unit {
+ Struct::<Ty<'a>> {..} => {},
+ //~^ ERROR lifetime may not live long enough
+ Tuple::<Ty<'b>> (..) => {},
+ //~^ ERROR lifetime may not live long enough
+ Unit::<Ty<'c>> => {},
+ //~^ ERROR lifetime may not live long enough
+ Dumb(_) => {},
+ };
+ match MyTy::Unit {
+ <Ty<'d>>::Struct {..} => {},
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'e>>::Tuple (..) => {},
+ //~^ ERROR lifetime may not live long enough
+ <Ty<'f>>::Unit => {},
+ //~^ ERROR lifetime may not live long enough
+ Dumb(_) => {},
+ };
+}
+
+
+fn main() {}
diff --git a/tests/ui/nll/user-annotations/normalization-2.stderr b/tests/ui/nll/user-annotations/normalization-2.stderr
new file mode 100644
index 000000000..5299282ea
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-2.stderr
@@ -0,0 +1,296 @@
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:43:12
+ |
+LL | fn test_local<'a>() {
+ | -- lifetime `'a` defined here
+LL | let _: Ty<'a> = MyTy::Unit;
+ | ^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:48:6
+ |
+LL | fn test_closure_sig<'a, 'b>() {
+ | -- lifetime `'a` defined here
+LL | |_: Ty<'a>| {};
+ | ^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:50:11
+ |
+LL | fn test_closure_sig<'a, 'b>() {
+ | -- lifetime `'b` defined here
+...
+LL | || -> Option<Ty<'b>> { None };
+ | ^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: replace `'a` with `'static`
+ = help: replace `'b` with `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:55:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'a` defined here
+LL | <Ty<'a>>::method::<Ty<'static>>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:57:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'b` defined here
+...
+LL | <Ty<'static>>::method::<Ty<'b>>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:60:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'c` defined here
+...
+LL | <Ty<'c>>::trait_method::<Ty<'static>>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'c` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:62:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'d` defined here
+...
+LL | <Ty<'static>>::trait_method::<Ty<'d>>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'d` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:65:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'e` defined here
+...
+LL | <Ty<'e>>::CONST;
+ | ^^^^^^^^^^^^^^^ requires that `'e` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:67:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'f` defined here
+...
+LL | <Ty<'f>>::TRAIT_CONST;
+ | ^^^^^^^^^^^^^^^^^^^^^ requires that `'f` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:75:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'g` defined here
+...
+LL | MyTy::Unit::<Ty<'g>>;
+ | ^^^^^^^^^^^^^^^^^^^^ requires that `'g` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:77:5
+ |
+LL | fn test_path<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>() {
+ | -- lifetime `'h` defined here
+...
+LL | MyTy::<Ty<'h>>::Unit;
+ | ^^^^^^^^^^^^^^^^^^^^ requires that `'h` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: replace `'a` with `'static`
+ = help: replace `'b` with `'static`
+ = help: replace `'c` with `'static`
+ = help: replace `'d` with `'static`
+ = help: replace `'e` with `'static`
+ = help: replace `'f` with `'static`
+ = help: replace `'g` with `'static`
+ = help: replace `'h` with `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:82:5
+ |
+LL | fn test_call<'a, 'b, 'c>() {
+ | -- lifetime `'a` defined here
+LL | <Ty<'a>>::method::<Ty<'static>>();
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:84:5
+ |
+LL | fn test_call<'a, 'b, 'c>() {
+ | -- lifetime `'b` defined here
+...
+LL | <Ty<'static>>::method::<Ty<'b>>();
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: replace `'a` with `'static`
+ = help: replace `'b` with `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:89:5
+ |
+LL | fn test_variants<'a, 'b, 'c>() {
+ | -- lifetime `'a` defined here
+LL | <Ty<'a>>::Struct {};
+ | ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:91:5
+ |
+LL | fn test_variants<'a, 'b, 'c>() {
+ | -- lifetime `'b` defined here
+...
+LL | <Ty<'b>>::Tuple();
+ | ^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:93:5
+ |
+LL | fn test_variants<'a, 'b, 'c>() {
+ | -- lifetime `'c` defined here
+...
+LL | <Ty<'c>>::Unit;
+ | ^^^^^^^^^^^^^^ requires that `'c` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: replace `'a` with `'static`
+ = help: replace `'b` with `'static`
+ = help: replace `'c` with `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:98:7
+ |
+LL | fn test_method_call<'a, 'b>(x: MyTy<()>) {
+ | -- lifetime `'a` defined here
+LL | x.method2::<Ty<'a>>();
+ | ^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:100:7
+ |
+LL | fn test_method_call<'a, 'b>(x: MyTy<()>) {
+ | -- lifetime `'b` defined here
+...
+LL | x.trait_method::<Ty<'b>>();
+ | ^^^^^^^^^^^^ requires that `'b` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: replace `'a` with `'static`
+ = help: replace `'b` with `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:117:5
+ |
+LL | fn test_struct_path<'a, 'b, 'c, 'd>() {
+ | -- lifetime `'a` defined here
+...
+LL | MyTy::<Ty<'a>>::Struct {}; // without SelfTy
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:119:5
+ |
+LL | fn test_struct_path<'a, 'b, 'c, 'd>() {
+ | -- lifetime `'b` defined here
+...
+LL | <Ty<'b> as Project>::Enum::Struct {}; // with SelfTy
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:123:5
+ |
+LL | fn test_struct_path<'a, 'b, 'c, 'd>() {
+ | -- lifetime `'c` defined here
+...
+LL | Struct::<Ty<'c>> { x: None, }; // without SelfTy
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'c` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:125:5
+ |
+LL | fn test_struct_path<'a, 'b, 'c, 'd>() {
+ | -- lifetime `'d` defined here
+...
+LL | <Ty<'d> as Project>::Struct { x: None, }; // with SelfTy
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'d` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: replace `'a` with `'static`
+ = help: replace `'b` with `'static`
+ = help: replace `'c` with `'static`
+ = help: replace `'d` with `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:132:9
+ |
+LL | fn test_pattern<'a, 'b, 'c, 'd, 'e, 'f>() {
+ | -- lifetime `'a` defined here
+...
+LL | Struct::<Ty<'a>> {..} => {},
+ | ^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:134:9
+ |
+LL | fn test_pattern<'a, 'b, 'c, 'd, 'e, 'f>() {
+ | -- lifetime `'b` defined here
+...
+LL | Tuple::<Ty<'b>> (..) => {},
+ | ^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:136:9
+ |
+LL | fn test_pattern<'a, 'b, 'c, 'd, 'e, 'f>() {
+ | -- lifetime `'c` defined here
+...
+LL | Unit::<Ty<'c>> => {},
+ | ^^^^^^^^^^^^^^ requires that `'c` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:141:9
+ |
+LL | fn test_pattern<'a, 'b, 'c, 'd, 'e, 'f>() {
+ | -- lifetime `'d` defined here
+...
+LL | <Ty<'d>>::Struct {..} => {},
+ | ^^^^^^^^^^^^^^^^^^^^^ requires that `'d` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:143:9
+ |
+LL | fn test_pattern<'a, 'b, 'c, 'd, 'e, 'f>() {
+ | -- lifetime `'e` defined here
+...
+LL | <Ty<'e>>::Tuple (..) => {},
+ | ^^^^^^^^^^^^^^^^^^^^ requires that `'e` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-2.rs:145:9
+ |
+LL | fn test_pattern<'a, 'b, 'c, 'd, 'e, 'f>() {
+ | -- lifetime `'f` defined here
+...
+LL | <Ty<'f>>::Unit => {},
+ | ^^^^^^^^^^^^^^ requires that `'f` must outlive `'static`
+
+help: the following changes may resolve your lifetime errors
+ |
+ = help: replace `'a` with `'static`
+ = help: replace `'b` with `'static`
+ = help: replace `'c` with `'static`
+ = help: replace `'d` with `'static`
+ = help: replace `'e` with `'static`
+ = help: replace `'f` with `'static`
+
+error: aborting due to 28 previous errors
+
diff --git a/tests/ui/nll/user-annotations/normalization-default.rs b/tests/ui/nll/user-annotations/normalization-default.rs
new file mode 100644
index 000000000..fa52e6d85
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-default.rs
@@ -0,0 +1,22 @@
+// check-fail
+
+trait Trait { type Assoc; }
+impl<'a> Trait for &'a () { type Assoc = &'a (); }
+
+struct MyTuple<T, U = <&'static () as Trait>::Assoc>(T, U);
+fn test_tuple(x: &(), y: &()) {
+ MyTuple::<_>((), x);
+ //~^ ERROR
+ let _: MyTuple::<_> = MyTuple((), y);
+ //~^ ERROR
+}
+
+struct MyStruct<T, U = <&'static () as Trait>::Assoc> { val: (T, U), }
+fn test_struct(x: &(), y: &()) {
+ MyStruct::<_> { val: ((), x) };
+ //~^ ERROR
+ let _: MyStruct::<_> = MyStruct { val: ((), y) };
+ //~^ ERROR
+}
+
+fn main() {}
diff --git a/tests/ui/nll/user-annotations/normalization-default.stderr b/tests/ui/nll/user-annotations/normalization-default.stderr
new file mode 100644
index 000000000..6c73ac692
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-default.stderr
@@ -0,0 +1,36 @@
+error: lifetime may not live long enough
+ --> $DIR/normalization-default.rs:8:22
+ |
+LL | fn test_tuple(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'1`
+LL | MyTuple::<_>((), x);
+ | ^ this usage requires that `'1` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-default.rs:10:12
+ |
+LL | fn test_tuple(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'2`
+...
+LL | let _: MyTuple::<_> = MyTuple((), y);
+ | ^^^^^^^^^^^^ type annotation requires that `'2` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-default.rs:16:26
+ |
+LL | fn test_struct(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'1`
+LL | MyStruct::<_> { val: ((), x) };
+ | ^^^^^^^ this usage requires that `'1` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-default.rs:18:12
+ |
+LL | fn test_struct(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'2`
+...
+LL | let _: MyStruct::<_> = MyStruct { val: ((), y) };
+ | ^^^^^^^^^^^^^ type annotation requires that `'2` must outlive `'static`
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/nll/user-annotations/normalization-infer.rs b/tests/ui/nll/user-annotations/normalization-infer.rs
new file mode 100644
index 000000000..8bfc272d4
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-infer.rs
@@ -0,0 +1,40 @@
+// Annnotations may contain projection types with inference variables as input.
+// Make sure we don't get ambiguities when normalizing them.
+
+// check-fail
+
+// Single impl.
+fn test1<A, B, C, D>(a: A, b: B, c: C) {
+ trait Tr { type Ty; }
+ impl<T: 'static> Tr for (T,) { type Ty = T; }
+
+ let _: <(_,) as Tr>::Ty = a; //~ ERROR type `A`
+ Some::<<(_,) as Tr>::Ty>(b); //~ ERROR type `B`
+ || -> <(_,) as Tr>::Ty { c }; //~ ERROR type `C`
+ |d: <(_,) as Tr>::Ty| -> D { d }; //~ ERROR type `D`
+}
+
+
+// Two impls. The selected impl depends on the actual type.
+fn test2<A, B, C>(a: A, b: B, c: C) {
+ trait Tr { type Ty; }
+ impl<T: 'static> Tr for (u8, T) { type Ty = T; }
+ impl<T> Tr for (i8, T) { type Ty = T; }
+ type Alias<X, Y> = (<(X, Y) as Tr>::Ty, X);
+
+ fn temp() -> String { todo!() }
+
+ // `u8` impl, requires static.
+ let _: Alias<_, _> = (a, 0u8); //~ ERROR type `A`
+ Some::<Alias<_, _>>((b, 0u8)); //~ ERROR type `B`
+ || -> Alias<_, _> { (c, 0u8) }; //~ ERROR type `C`
+
+ let _: Alias<_, _> = (&temp(), 0u8); //~ ERROR temporary value
+ Some::<Alias<_, _>>((&temp(), 0u8)); //~ ERROR temporary value
+
+ // `i8` impl, no region constraints.
+ let _: Alias<_, _> = (&temp(), 0i8);
+ Some::<Alias<_, _>>((&temp(), 0i8));
+}
+
+fn main() {}
diff --git a/tests/ui/nll/user-annotations/normalization-infer.stderr b/tests/ui/nll/user-annotations/normalization-infer.stderr
new file mode 100644
index 000000000..12854ab68
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-infer.stderr
@@ -0,0 +1,101 @@
+error[E0310]: the parameter type `A` may not live long enough
+ --> $DIR/normalization-infer.rs:11:12
+ |
+LL | let _: <(_,) as Tr>::Ty = a;
+ | ^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound...
+ |
+LL | fn test1<A: 'static, B, C, D>(a: A, b: B, c: C) {
+ | +++++++++
+
+error[E0310]: the parameter type `B` may not live long enough
+ --> $DIR/normalization-infer.rs:12:5
+ |
+LL | Some::<<(_,) as Tr>::Ty>(b);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `B` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound...
+ |
+LL | fn test1<A, B: 'static, C, D>(a: A, b: B, c: C) {
+ | +++++++++
+
+error[E0310]: the parameter type `C` may not live long enough
+ --> $DIR/normalization-infer.rs:13:11
+ |
+LL | || -> <(_,) as Tr>::Ty { c };
+ | ^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound...
+ |
+LL | fn test1<A, B, C: 'static, D>(a: A, b: B, c: C) {
+ | +++++++++
+
+error[E0310]: the parameter type `D` may not live long enough
+ --> $DIR/normalization-infer.rs:14:6
+ |
+LL | |d: <(_,) as Tr>::Ty| -> D { d };
+ | ^ ...so that the type `D` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound...
+ |
+LL | fn test1<A, B, C, D: 'static>(a: A, b: B, c: C) {
+ | +++++++++
+
+error[E0310]: the parameter type `A` may not live long enough
+ --> $DIR/normalization-infer.rs:28:12
+ |
+LL | let _: Alias<_, _> = (a, 0u8);
+ | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound...
+ |
+LL | fn test2<A: 'static, B, C>(a: A, b: B, c: C) {
+ | +++++++++
+
+error[E0310]: the parameter type `B` may not live long enough
+ --> $DIR/normalization-infer.rs:29:5
+ |
+LL | Some::<Alias<_, _>>((b, 0u8));
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `B` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound...
+ |
+LL | fn test2<A, B: 'static, C>(a: A, b: B, c: C) {
+ | +++++++++
+
+error[E0310]: the parameter type `C` may not live long enough
+ --> $DIR/normalization-infer.rs:30:11
+ |
+LL | || -> Alias<_, _> { (c, 0u8) };
+ | ^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound...
+ |
+LL | fn test2<A, B, C: 'static>(a: A, b: B, c: C) {
+ | +++++++++
+
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/normalization-infer.rs:32:28
+ |
+LL | let _: Alias<_, _> = (&temp(), 0u8);
+ | ----------- ^^^^^^ creates a temporary value which is freed while still in use
+ | |
+ | type annotation requires that borrow lasts for `'static`
+...
+LL | }
+ | - temporary value is freed at the end of this statement
+
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/normalization-infer.rs:33:27
+ |
+LL | Some::<Alias<_, _>>((&temp(), 0u8));
+ | --^^^^^^------ - temporary value is freed at the end of this statement
+ | | |
+ | | creates a temporary value which is freed while still in use
+ | this usage requires that borrow lasts for `'static`
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0310, E0716.
+For more information about an error, try `rustc --explain E0310`.
diff --git a/tests/ui/nll/user-annotations/normalization-self.rs b/tests/ui/nll/user-annotations/normalization-self.rs
new file mode 100644
index 000000000..c18760b53
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-self.rs
@@ -0,0 +1,26 @@
+// check-fail
+
+trait Trait { type Assoc; }
+impl<'a> Trait for &'a () { type Assoc = &'a (); }
+
+struct MyTuple<T>(T);
+impl MyTuple<<&'static () as Trait>::Assoc> {
+ fn test(x: &(), y: &()) {
+ Self(x);
+ //~^ ERROR
+ let _: Self = MyTuple(y);
+ //~^ ERROR
+ }
+}
+
+struct MyStruct<T> { val: T, }
+impl MyStruct<<&'static () as Trait>::Assoc> {
+ fn test(x: &(), y: &()) {
+ Self { val: x };
+ //~^ ERROR
+ let _: Self = MyStruct { val: y };
+ //~^ ERROR
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/nll/user-annotations/normalization-self.stderr b/tests/ui/nll/user-annotations/normalization-self.stderr
new file mode 100644
index 000000000..e231ed03c
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization-self.stderr
@@ -0,0 +1,36 @@
+error: lifetime may not live long enough
+ --> $DIR/normalization-self.rs:9:14
+ |
+LL | fn test(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'1`
+LL | Self(x);
+ | ^ this usage requires that `'1` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-self.rs:11:16
+ |
+LL | fn test(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'2`
+...
+LL | let _: Self = MyTuple(y);
+ | ^^^^ type annotation requires that `'2` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-self.rs:19:21
+ |
+LL | fn test(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'1`
+LL | Self { val: x };
+ | ^ this usage requires that `'1` must outlive `'static`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-self.rs:21:16
+ |
+LL | fn test(x: &(), y: &()) {
+ | - let's call the lifetime of this reference `'2`
+...
+LL | let _: Self = MyStruct { val: y };
+ | ^^^^ type annotation requires that `'2` must outlive `'static`
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/nll/user-annotations/normalization.rs b/tests/ui/nll/user-annotations/normalization.rs
new file mode 100644
index 000000000..c2e892f57
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization.rs
@@ -0,0 +1,17 @@
+// Test that we enforce a `&'static` requirement that is only visible
+// after normalization.
+
+trait Foo { type Out; }
+impl Foo for () { type Out = &'static u32; }
+impl<'a> Foo for &'a () { type Out = &'a u32; }
+
+fn main() {
+ let a = 22;
+ let _: <() as Foo>::Out = &a; //~ ERROR
+
+ let a = 22;
+ let _: <&'static () as Foo>::Out = &a; //~ ERROR
+
+ let a = 22;
+ let _: <&'_ () as Foo>::Out = &a;
+}
diff --git a/tests/ui/nll/user-annotations/normalization.stderr b/tests/ui/nll/user-annotations/normalization.stderr
new file mode 100644
index 000000000..975cb4b66
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalization.stderr
@@ -0,0 +1,25 @@
+error[E0597]: `a` does not live long enough
+ --> $DIR/normalization.rs:10:31
+ |
+LL | let _: <() as Foo>::Out = &a;
+ | ---------------- ^^ borrowed value does not live long enough
+ | |
+ | type annotation requires that `a` is borrowed for `'static`
+...
+LL | }
+ | - `a` dropped here while still borrowed
+
+error[E0597]: `a` does not live long enough
+ --> $DIR/normalization.rs:13:40
+ |
+LL | let _: <&'static () as Foo>::Out = &a;
+ | ------------------------- ^^ borrowed value does not live long enough
+ | |
+ | type annotation requires that `a` is borrowed for `'static`
+...
+LL | }
+ | - `a` dropped here while still borrowed
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/nll/user-annotations/normalize-self-ty.rs b/tests/ui/nll/user-annotations/normalize-self-ty.rs
index df905c878..df905c878 100644
--- a/src/test/ui/nll/user-annotations/normalize-self-ty.rs
+++ b/tests/ui/nll/user-annotations/normalize-self-ty.rs
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs b/tests/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs
index 59cd69c0c..59cd69c0c 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr b/tests/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr
index a97e7a9fd..a97e7a9fd 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs b/tests/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs
index 1586c4ea3..1586c4ea3 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr b/tests/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr
index 408d7c2a5..408d7c2a5 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs
index 6fa59fdd8..6fa59fdd8 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr
index 920c906f6..920c906f6 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs
index 7486aab0e..7486aab0e 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs
diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr
index 3f01638d8..3f01638d8 100644
--- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr
+++ b/tests/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr
diff --git a/src/test/ui/nll/user-annotations/patterns.rs b/tests/ui/nll/user-annotations/patterns.rs
index 1f635d7f5..1f635d7f5 100644
--- a/src/test/ui/nll/user-annotations/patterns.rs
+++ b/tests/ui/nll/user-annotations/patterns.rs
diff --git a/src/test/ui/nll/user-annotations/patterns.stderr b/tests/ui/nll/user-annotations/patterns.stderr
index de6f8f80f..de6f8f80f 100644
--- a/src/test/ui/nll/user-annotations/patterns.stderr
+++ b/tests/ui/nll/user-annotations/patterns.stderr
diff --git a/src/test/ui/nll/user-annotations/promoted-annotation.rs b/tests/ui/nll/user-annotations/promoted-annotation.rs
index b92f8bfd2..b92f8bfd2 100644
--- a/src/test/ui/nll/user-annotations/promoted-annotation.rs
+++ b/tests/ui/nll/user-annotations/promoted-annotation.rs
diff --git a/src/test/ui/nll/user-annotations/promoted-annotation.stderr b/tests/ui/nll/user-annotations/promoted-annotation.stderr
index cb99a6a36..cb99a6a36 100644
--- a/src/test/ui/nll/user-annotations/promoted-annotation.stderr
+++ b/tests/ui/nll/user-annotations/promoted-annotation.stderr
diff --git a/src/test/ui/nll/user-annotations/type-annotation-with-hrtb.rs b/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs
index 1f7c06038..1f7c06038 100644
--- a/src/test/ui/nll/user-annotations/type-annotation-with-hrtb.rs
+++ b/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs
diff --git a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.rs
index 88d646dee..88d646dee 100644
--- a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs
+++ b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.rs
diff --git a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr
index ccbf3c1d9..ccbf3c1d9 100644
--- a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr
+++ b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr
diff --git a/src/test/ui/nll/user-annotations/wf-self-type.rs b/tests/ui/nll/user-annotations/wf-self-type.rs
index 539226aab..539226aab 100644
--- a/src/test/ui/nll/user-annotations/wf-self-type.rs
+++ b/tests/ui/nll/user-annotations/wf-self-type.rs
diff --git a/src/test/ui/nll/user-annotations/wf-self-type.stderr b/tests/ui/nll/user-annotations/wf-self-type.stderr
index 1d3ae7cfb..1d3ae7cfb 100644
--- a/src/test/ui/nll/user-annotations/wf-self-type.stderr
+++ b/tests/ui/nll/user-annotations/wf-self-type.stderr
diff --git a/src/test/ui/nll/vimwiki-core-regression.rs b/tests/ui/nll/vimwiki-core-regression.rs
index 0a4ed7e0a..0a4ed7e0a 100644
--- a/src/test/ui/nll/vimwiki-core-regression.rs
+++ b/tests/ui/nll/vimwiki-core-regression.rs
diff --git a/src/test/ui/nll/where_clauses_in_functions.rs b/tests/ui/nll/where_clauses_in_functions.rs
index 826065d02..826065d02 100644
--- a/src/test/ui/nll/where_clauses_in_functions.rs
+++ b/tests/ui/nll/where_clauses_in_functions.rs
diff --git a/src/test/ui/nll/where_clauses_in_functions.stderr b/tests/ui/nll/where_clauses_in_functions.stderr
index afb25e3bc..afb25e3bc 100644
--- a/src/test/ui/nll/where_clauses_in_functions.stderr
+++ b/tests/ui/nll/where_clauses_in_functions.stderr
diff --git a/src/test/ui/nll/where_clauses_in_structs.rs b/tests/ui/nll/where_clauses_in_structs.rs
index fae5d3811..fae5d3811 100644
--- a/src/test/ui/nll/where_clauses_in_structs.rs
+++ b/tests/ui/nll/where_clauses_in_structs.rs
diff --git a/src/test/ui/nll/where_clauses_in_structs.stderr b/tests/ui/nll/where_clauses_in_structs.stderr
index c46cfcb41..c46cfcb41 100644
--- a/src/test/ui/nll/where_clauses_in_structs.stderr
+++ b/tests/ui/nll/where_clauses_in_structs.stderr