summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/typeck
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/typeck')
-rw-r--r--src/test/ui/typeck/assign-non-lval-derefmut.fixed15
-rw-r--r--src/test/ui/typeck/assign-non-lval-derefmut.rs15
-rw-r--r--src/test/ui/typeck/assign-non-lval-derefmut.stderr58
-rw-r--r--src/test/ui/typeck/assign-non-lval-mut-ref.fixed15
-rw-r--r--src/test/ui/typeck/assign-non-lval-mut-ref.rs15
-rw-r--r--src/test/ui/typeck/assign-non-lval-mut-ref.stderr56
-rw-r--r--src/test/ui/typeck/assign-non-lval-needs-deref.rs19
-rw-r--r--src/test/ui/typeck/assign-non-lval-needs-deref.stderr16
-rw-r--r--src/test/ui/typeck/autoderef-with-param-env-error.rs9
-rw-r--r--src/test/ui/typeck/autoderef-with-param-env-error.stderr12
-rw-r--r--src/test/ui/typeck/auxiliary/issue-36708.rs5
-rw-r--r--src/test/ui/typeck/auxiliary/issue-81943-lib.rs7
-rw-r--r--src/test/ui/typeck/auxiliary/tdticc_coherence_lib.rs6
-rw-r--r--src/test/ui/typeck/auxiliary/xcrate-issue-43189-a.rs7
-rw-r--r--src/test/ui/typeck/auxiliary/xcrate-issue-43189-b.rs3
-rw-r--r--src/test/ui/typeck/auxiliary/xcrate-issue-46112-rexport-core.rs3
-rw-r--r--src/test/ui/typeck/auxiliary/xcrate-issue-61711-b.rs5
-rw-r--r--src/test/ui/typeck/call-block.rs3
-rw-r--r--src/test/ui/typeck/call-block.stderr11
-rw-r--r--src/test/ui/typeck/conversion-methods.rs13
-rw-r--r--src/test/ui/typeck/conversion-methods.stderr45
-rw-r--r--src/test/ui/typeck/deref-multi.rs26
-rw-r--r--src/test/ui/typeck/deref-multi.stderr72
-rw-r--r--src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs21
-rw-r--r--src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.stderr51
-rw-r--r--src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.rs8
-rw-r--r--src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.stderr20
-rw-r--r--src/test/ui/typeck/explain_clone_autoref.rs13
-rw-r--r--src/test/ui/typeck/explain_clone_autoref.stderr18
-rw-r--r--src/test/ui/typeck/issue-100164.fixed9
-rw-r--r--src/test/ui/typeck/issue-100164.rs9
-rw-r--r--src/test/ui/typeck/issue-100164.stderr14
-rw-r--r--src/test/ui/typeck/issue-100246.rs30
-rw-r--r--src/test/ui/typeck/issue-100246.stderr13
-rw-r--r--src/test/ui/typeck/issue-100285.rs22
-rw-r--r--src/test/ui/typeck/issue-100285.stderr34
-rw-r--r--src/test/ui/typeck/issue-103899.rs30
-rw-r--r--src/test/ui/typeck/issue-10401.rs5
-rw-r--r--src/test/ui/typeck/issue-10401.stderr11
-rw-r--r--src/test/ui/typeck/issue-104510-ice.rs16
-rw-r--r--src/test/ui/typeck/issue-104510-ice.stderr9
-rw-r--r--src/test/ui/typeck/issue-104513-ice.rs6
-rw-r--r--src/test/ui/typeck/issue-104513-ice.stderr18
-rw-r--r--src/test/ui/typeck/issue-10969.rs7
-rw-r--r--src/test/ui/typeck/issue-10969.stderr23
-rw-r--r--src/test/ui/typeck/issue-13853-2.rs6
-rw-r--r--src/test/ui/typeck/issue-13853-2.stderr14
-rw-r--r--src/test/ui/typeck/issue-13853-5.rs13
-rw-r--r--src/test/ui/typeck/issue-13853-5.stderr9
-rw-r--r--src/test/ui/typeck/issue-13853.rs38
-rw-r--r--src/test/ui/typeck/issue-13853.stderr40
-rw-r--r--src/test/ui/typeck/issue-29124.rs19
-rw-r--r--src/test/ui/typeck/issue-29124.stderr15
-rw-r--r--src/test/ui/typeck/issue-36708.rs12
-rw-r--r--src/test/ui/typeck/issue-36708.stderr9
-rw-r--r--src/test/ui/typeck/issue-43189.rs12
-rw-r--r--src/test/ui/typeck/issue-43189.stderr20
-rw-r--r--src/test/ui/typeck/issue-46112.rs10
-rw-r--r--src/test/ui/typeck/issue-46112.stderr23
-rw-r--r--src/test/ui/typeck/issue-50687-ice-on-borrow.rs41
-rw-r--r--src/test/ui/typeck/issue-50687-ice-on-borrow.stderr18
-rw-r--r--src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs54
-rw-r--r--src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr75
-rw-r--r--src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs23
-rw-r--r--src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.rs7
-rw-r--r--src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr14
-rw-r--r--src/test/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs11
-rw-r--r--src/test/ui/typeck/issue-65611.rs63
-rw-r--r--src/test/ui/typeck/issue-65611.stderr16
-rw-r--r--src/test/ui/typeck/issue-67971.rs9
-rw-r--r--src/test/ui/typeck/issue-67971.stderr18
-rw-r--r--src/test/ui/typeck/issue-68590-reborrow-through-derefmut.rs25
-rw-r--r--src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.rs9
-rw-r--r--src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr10
-rw-r--r--src/test/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs21
-rw-r--r--src/test/ui/typeck/issue-73592-borrow_mut-through-deref.fixed59
-rw-r--r--src/test/ui/typeck/issue-73592-borrow_mut-through-deref.rs59
-rw-r--r--src/test/ui/typeck/issue-73592-borrow_mut-through-deref.stderr24
-rw-r--r--src/test/ui/typeck/issue-74086.rs5
-rw-r--r--src/test/ui/typeck/issue-74086.stderr15
-rw-r--r--src/test/ui/typeck/issue-74933.rs38
-rw-r--r--src/test/ui/typeck/issue-75883.rs22
-rw-r--r--src/test/ui/typeck/issue-75883.stderr52
-rw-r--r--src/test/ui/typeck/issue-75889.rs6
-rw-r--r--src/test/ui/typeck/issue-75889.stderr15
-rw-r--r--src/test/ui/typeck/issue-79040.rs5
-rw-r--r--src/test/ui/typeck/issue-79040.stderr17
-rw-r--r--src/test/ui/typeck/issue-80207-unsized-return.rs20
-rw-r--r--src/test/ui/typeck/issue-80779.rs13
-rw-r--r--src/test/ui/typeck/issue-80779.stderr21
-rw-r--r--src/test/ui/typeck/issue-81293.rs9
-rw-r--r--src/test/ui/typeck/issue-81293.stderr32
-rw-r--r--src/test/ui/typeck/issue-81885.rs9
-rw-r--r--src/test/ui/typeck/issue-81885.stderr27
-rw-r--r--src/test/ui/typeck/issue-81943.rs13
-rw-r--r--src/test/ui/typeck/issue-81943.stderr51
-rw-r--r--src/test/ui/typeck/issue-82772.rs13
-rw-r--r--src/test/ui/typeck/issue-82772.stderr21
-rw-r--r--src/test/ui/typeck/issue-83621-placeholder-static-in-extern.rs7
-rw-r--r--src/test/ui/typeck/issue-83621-placeholder-static-in-extern.stderr9
-rw-r--r--src/test/ui/typeck/issue-83693.rs19
-rw-r--r--src/test/ui/typeck/issue-83693.stderr39
-rw-r--r--src/test/ui/typeck/issue-84160.rs9
-rw-r--r--src/test/ui/typeck/issue-84160.stderr15
-rw-r--r--src/test/ui/typeck/issue-84768.rs10
-rw-r--r--src/test/ui/typeck/issue-84768.stderr26
-rw-r--r--src/test/ui/typeck/issue-84831.rs9
-rw-r--r--src/test/ui/typeck/issue-84831.stderr26
-rw-r--r--src/test/ui/typeck/issue-86721-return-expr-ice.rev1.stderr9
-rw-r--r--src/test/ui/typeck/issue-86721-return-expr-ice.rev2.stderr9
-rw-r--r--src/test/ui/typeck/issue-86721-return-expr-ice.rs17
-rw-r--r--src/test/ui/typeck/issue-87181/empty-tuple-method.rs14
-rw-r--r--src/test/ui/typeck/issue-87181/empty-tuple-method.stderr14
-rw-r--r--src/test/ui/typeck/issue-87181/enum-variant.rs16
-rw-r--r--src/test/ui/typeck/issue-87181/enum-variant.stderr14
-rw-r--r--src/test/ui/typeck/issue-87181/tuple-field.rs14
-rw-r--r--src/test/ui/typeck/issue-87181/tuple-field.stderr14
-rw-r--r--src/test/ui/typeck/issue-87181/tuple-method.rs14
-rw-r--r--src/test/ui/typeck/issue-87181/tuple-method.stderr9
-rw-r--r--src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.rs4
-rw-r--r--src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr11
-rw-r--r--src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs11
-rw-r--r--src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr10
-rw-r--r--src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs11
-rw-r--r--src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr18
-rw-r--r--src/test/ui/typeck/issue-87935-unsized-box-expr.rs10
-rw-r--r--src/test/ui/typeck/issue-87935-unsized-box-expr.stderr12
-rw-r--r--src/test/ui/typeck/issue-88609.rs19
-rw-r--r--src/test/ui/typeck/issue-88643.rs19
-rw-r--r--src/test/ui/typeck/issue-88643.stderr21
-rw-r--r--src/test/ui/typeck/issue-88803-call-expr-method.fixed9
-rw-r--r--src/test/ui/typeck/issue-88803-call-expr-method.rs9
-rw-r--r--src/test/ui/typeck/issue-88803-call-expr-method.stderr15
-rw-r--r--src/test/ui/typeck/issue-88844.rs14
-rw-r--r--src/test/ui/typeck/issue-88844.stderr12
-rw-r--r--src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed9
-rw-r--r--src/test/ui/typeck/issue-89044-wrapped-expr-method.rs9
-rw-r--r--src/test/ui/typeck/issue-89044-wrapped-expr-method.stderr14
-rw-r--r--src/test/ui/typeck/issue-89275.rs29
-rw-r--r--src/test/ui/typeck/issue-89275.stderr14
-rw-r--r--src/test/ui/typeck/issue-89806.rs3
-rw-r--r--src/test/ui/typeck/issue-89806.stderr9
-rw-r--r--src/test/ui/typeck/issue-89856.rs8
-rw-r--r--src/test/ui/typeck/issue-89856.stderr23
-rw-r--r--src/test/ui/typeck/issue-89935.rs18
-rw-r--r--src/test/ui/typeck/issue-90101.rs8
-rw-r--r--src/test/ui/typeck/issue-90101.stderr24
-rw-r--r--src/test/ui/typeck/issue-90164.rs9
-rw-r--r--src/test/ui/typeck/issue-90164.stderr22
-rw-r--r--src/test/ui/typeck/issue-90319.rs17
-rw-r--r--src/test/ui/typeck/issue-90319.stderr9
-rw-r--r--src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.rs14
-rw-r--r--src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr14
-rw-r--r--src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.rs11
-rw-r--r--src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr17
-rw-r--r--src/test/ui/typeck/issue-91210-ptr-method.fixed15
-rw-r--r--src/test/ui/typeck/issue-91210-ptr-method.rs15
-rw-r--r--src/test/ui/typeck/issue-91210-ptr-method.stderr14
-rw-r--r--src/test/ui/typeck/issue-91267.rs8
-rw-r--r--src/test/ui/typeck/issue-91267.stderr24
-rw-r--r--src/test/ui/typeck/issue-91328.fixed47
-rw-r--r--src/test/ui/typeck/issue-91328.rs47
-rw-r--r--src/test/ui/typeck/issue-91328.stderr39
-rw-r--r--src/test/ui/typeck/issue-91334.rs10
-rw-r--r--src/test/ui/typeck/issue-91334.stderr50
-rw-r--r--src/test/ui/typeck/issue-91450-inner-ty-error.rs7
-rw-r--r--src/test/ui/typeck/issue-91450-inner-ty-error.stderr21
-rw-r--r--src/test/ui/typeck/issue-91633.rs8
-rw-r--r--src/test/ui/typeck/issue-93486.rs6
-rw-r--r--src/test/ui/typeck/issue-93486.stderr16
-rw-r--r--src/test/ui/typeck/issue-96738.rs4
-rw-r--r--src/test/ui/typeck/issue-96738.stderr16
-rw-r--r--src/test/ui/typeck/issue-98260.rs9
-rw-r--r--src/test/ui/typeck/issue-98260.stderr12
-rw-r--r--src/test/ui/typeck/issue-98982.rs9
-rw-r--r--src/test/ui/typeck/issue-98982.stderr24
-rw-r--r--src/test/ui/typeck/missing-private-fields-in-struct-literal.rs18
-rw-r--r--src/test/ui/typeck/missing-private-fields-in-struct-literal.stderr15
-rw-r--r--src/test/ui/typeck/no-type-for-node-ice.rs5
-rw-r--r--src/test/ui/typeck/no-type-for-node-ice.stderr9
-rw-r--r--src/test/ui/typeck/path-to-method-sugg-unresolved-expr.rs4
-rw-r--r--src/test/ui/typeck/path-to-method-sugg-unresolved-expr.stderr9
-rw-r--r--src/test/ui/typeck/point-at-type-param-in-path-expr.rs6
-rw-r--r--src/test/ui/typeck/point-at-type-param-in-path-expr.stderr17
-rw-r--r--src/test/ui/typeck/point-at-type-parameter-definition.rs17
-rw-r--r--src/test/ui/typeck/point-at-type-parameter-definition.stderr12
-rw-r--r--src/test/ui/typeck/prim-with-args.fixed28
-rw-r--r--src/test/ui/typeck/prim-with-args.rs28
-rw-r--r--src/test/ui/typeck/prim-with-args.stderr311
-rw-r--r--src/test/ui/typeck/project-cache-issue-37154.rs21
-rw-r--r--src/test/ui/typeck/remove-extra-argument.fixed9
-rw-r--r--src/test/ui/typeck/remove-extra-argument.rs9
-rw-r--r--src/test/ui/typeck/remove-extra-argument.stderr19
-rw-r--r--src/test/ui/typeck/return_type_containing_closure.rs10
-rw-r--r--src/test/ui/typeck/return_type_containing_closure.stderr20
-rw-r--r--src/test/ui/typeck/slow-lhs-suggestion.rs26
-rw-r--r--src/test/ui/typeck/slow-lhs-suggestion.stderr187
-rw-r--r--src/test/ui/typeck/struct-enum-wrong-args.rs14
-rw-r--r--src/test/ui/typeck/struct-enum-wrong-args.stderr133
-rw-r--r--src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed11
-rw-r--r--src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs11
-rw-r--r--src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.stderr80
-rw-r--r--src/test/ui/typeck/type-placeholder-fn-in-const.rs14
-rw-r--r--src/test/ui/typeck/type-placeholder-fn-in-const.stderr21
-rw-r--r--src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs17
-rw-r--r--src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr87
-rw-r--r--src/test/ui/typeck/typeck-cast-pointer-to-float.rs5
-rw-r--r--src/test/ui/typeck/typeck-cast-pointer-to-float.stderr9
-rw-r--r--src/test/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs9
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed17
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-assoc-type.rs17
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr20
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs25
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr43
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-negation-send.rs21
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr16
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs41
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr52
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-send-param.rs11
-rw-r--r--src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr19
-rw-r--r--src/test/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs12
-rw-r--r--src/test/ui/typeck/typeck-unsafe-always-share.rs32
-rw-r--r--src/test/ui/typeck/typeck-unsafe-always-share.stderr68
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_1.rs32
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_item.rs222
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_item.stderr642
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_item_help.rs33
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_item_help.stderr60
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_lifetime_1.rs11
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_lifetime_1.stderr17
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_lifetime_2.rs11
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_lifetime_2.stderr17
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_mismatch.rs27
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr25
-rw-r--r--src/test/ui/typeck/ufcs-type-params.rs15
-rw-r--r--src/test/ui/typeck/unify-return-ty.rs16
-rw-r--r--src/test/ui/typeck/while-loop-block-cond.rs4
-rw-r--r--src/test/ui/typeck/while-loop-block-cond.stderr9
238 files changed, 0 insertions, 5949 deletions
diff --git a/src/test/ui/typeck/assign-non-lval-derefmut.fixed b/src/test/ui/typeck/assign-non-lval-derefmut.fixed
deleted file mode 100644
index 0c23199af..000000000
--- a/src/test/ui/typeck/assign-non-lval-derefmut.fixed
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-rustfix
-
-fn main() {
- let x = std::sync::Mutex::new(1usize);
- *x.lock().unwrap() = 2;
- //~^ ERROR invalid left-hand side of assignment
- *x.lock().unwrap() += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
-
- let mut y = x.lock().unwrap();
- *y = 2;
- //~^ ERROR mismatched types
- *y += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
-}
diff --git a/src/test/ui/typeck/assign-non-lval-derefmut.rs b/src/test/ui/typeck/assign-non-lval-derefmut.rs
deleted file mode 100644
index ec1882f52..000000000
--- a/src/test/ui/typeck/assign-non-lval-derefmut.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-rustfix
-
-fn main() {
- let x = std::sync::Mutex::new(1usize);
- x.lock().unwrap() = 2;
- //~^ ERROR invalid left-hand side of assignment
- x.lock().unwrap() += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
-
- let mut y = x.lock().unwrap();
- y = 2;
- //~^ ERROR mismatched types
- y += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
-}
diff --git a/src/test/ui/typeck/assign-non-lval-derefmut.stderr b/src/test/ui/typeck/assign-non-lval-derefmut.stderr
deleted file mode 100644
index e394cf820..000000000
--- a/src/test/ui/typeck/assign-non-lval-derefmut.stderr
+++ /dev/null
@@ -1,58 +0,0 @@
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/assign-non-lval-derefmut.rs:5:23
- |
-LL | x.lock().unwrap() = 2;
- | ----------------- ^
- | |
- | cannot assign to this expression
- |
-help: consider dereferencing here to assign to the mutably borrowed value
- |
-LL | *x.lock().unwrap() = 2;
- | +
-
-error[E0368]: binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
- --> $DIR/assign-non-lval-derefmut.rs:7:5
- |
-LL | x.lock().unwrap() += 1;
- | -----------------^^^^^
- | |
- | cannot use `+=` on type `MutexGuard<'_, usize>`
- |
-help: `+=` can be used on `usize` if you dereference the left-hand side
- |
-LL | *x.lock().unwrap() += 1;
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assign-non-lval-derefmut.rs:11:9
- |
-LL | let mut y = x.lock().unwrap();
- | ----------------- expected due to this value
-LL | y = 2;
- | ^ expected struct `MutexGuard`, found integer
- |
- = note: expected struct `MutexGuard<'_, usize>`
- found type `{integer}`
-help: consider dereferencing here to assign to the mutably borrowed value
- |
-LL | *y = 2;
- | +
-
-error[E0368]: binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
- --> $DIR/assign-non-lval-derefmut.rs:13:5
- |
-LL | y += 1;
- | -^^^^^
- | |
- | cannot use `+=` on type `MutexGuard<'_, usize>`
- |
-help: `+=` can be used on `usize` if you dereference the left-hand side
- |
-LL | *y += 1;
- | +
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0070, E0308, E0368.
-For more information about an error, try `rustc --explain E0070`.
diff --git a/src/test/ui/typeck/assign-non-lval-mut-ref.fixed b/src/test/ui/typeck/assign-non-lval-mut-ref.fixed
deleted file mode 100644
index 10c7b9dbf..000000000
--- a/src/test/ui/typeck/assign-non-lval-mut-ref.fixed
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-rustfix
-
-fn main() {
- let mut x = vec![1usize];
- *x.last_mut().unwrap() = 2;
- //~^ ERROR invalid left-hand side of assignment
- *x.last_mut().unwrap() += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `&mut usize`
-
- let y = x.last_mut().unwrap();
- *y = 2;
- //~^ ERROR mismatched types
- *y += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `&mut usize`
-}
diff --git a/src/test/ui/typeck/assign-non-lval-mut-ref.rs b/src/test/ui/typeck/assign-non-lval-mut-ref.rs
deleted file mode 100644
index bceff0ef0..000000000
--- a/src/test/ui/typeck/assign-non-lval-mut-ref.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-rustfix
-
-fn main() {
- let mut x = vec![1usize];
- x.last_mut().unwrap() = 2;
- //~^ ERROR invalid left-hand side of assignment
- x.last_mut().unwrap() += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `&mut usize`
-
- let y = x.last_mut().unwrap();
- y = 2;
- //~^ ERROR mismatched types
- y += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `&mut usize`
-}
diff --git a/src/test/ui/typeck/assign-non-lval-mut-ref.stderr b/src/test/ui/typeck/assign-non-lval-mut-ref.stderr
deleted file mode 100644
index cbdc960ba..000000000
--- a/src/test/ui/typeck/assign-non-lval-mut-ref.stderr
+++ /dev/null
@@ -1,56 +0,0 @@
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/assign-non-lval-mut-ref.rs:5:27
- |
-LL | x.last_mut().unwrap() = 2;
- | --------------------- ^
- | |
- | cannot assign to this expression
- |
-help: consider dereferencing here to assign to the mutably borrowed value
- |
-LL | *x.last_mut().unwrap() = 2;
- | +
-
-error[E0368]: binary assignment operation `+=` cannot be applied to type `&mut usize`
- --> $DIR/assign-non-lval-mut-ref.rs:7:5
- |
-LL | x.last_mut().unwrap() += 1;
- | ---------------------^^^^^
- | |
- | cannot use `+=` on type `&mut usize`
- |
-help: `+=` can be used on `usize` if you dereference the left-hand side
- |
-LL | *x.last_mut().unwrap() += 1;
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assign-non-lval-mut-ref.rs:11:9
- |
-LL | let y = x.last_mut().unwrap();
- | --------------------- expected due to this value
-LL | y = 2;
- | ^ expected `&mut usize`, found integer
- |
-help: consider dereferencing here to assign to the mutably borrowed value
- |
-LL | *y = 2;
- | +
-
-error[E0368]: binary assignment operation `+=` cannot be applied to type `&mut usize`
- --> $DIR/assign-non-lval-mut-ref.rs:13:5
- |
-LL | y += 1;
- | -^^^^^
- | |
- | cannot use `+=` on type `&mut usize`
- |
-help: `+=` can be used on `usize` if you dereference the left-hand side
- |
-LL | *y += 1;
- | +
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0070, E0308, E0368.
-For more information about an error, try `rustc --explain E0070`.
diff --git a/src/test/ui/typeck/assign-non-lval-needs-deref.rs b/src/test/ui/typeck/assign-non-lval-needs-deref.rs
deleted file mode 100644
index c979d76b4..000000000
--- a/src/test/ui/typeck/assign-non-lval-needs-deref.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// issue #101376
-
-use std::ops::AddAssign;
-struct Foo;
-
-impl AddAssign<()> for Foo {
- fn add_assign(&mut self, _: ()) {}
-}
-
-impl AddAssign<()> for &mut Foo {
- fn add_assign(&mut self, _: ()) {}
-}
-
-fn main() {
- (&mut Foo) += ();
- //~^ ERROR invalid left-hand side of assignment
- //~| NOTE cannot assign to this expression
- //~| HELP consider dereferencing the left-hand side of this operation
-}
diff --git a/src/test/ui/typeck/assign-non-lval-needs-deref.stderr b/src/test/ui/typeck/assign-non-lval-needs-deref.stderr
deleted file mode 100644
index ee83b1453..000000000
--- a/src/test/ui/typeck/assign-non-lval-needs-deref.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0067]: invalid left-hand side of assignment
- --> $DIR/assign-non-lval-needs-deref.rs:15:16
- |
-LL | (&mut Foo) += ();
- | ---------- ^^
- | |
- | cannot assign to this expression
- |
-help: consider dereferencing the left-hand side of this operation
- |
-LL | *(&mut Foo) += ();
- | +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0067`.
diff --git a/src/test/ui/typeck/autoderef-with-param-env-error.rs b/src/test/ui/typeck/autoderef-with-param-env-error.rs
deleted file mode 100644
index ec96c61c6..000000000
--- a/src/test/ui/typeck/autoderef-with-param-env-error.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn foo()
-where
- T: Send,
- //~^ cannot find type `T` in this scope
-{
- let s = "abc".to_string();
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/autoderef-with-param-env-error.stderr b/src/test/ui/typeck/autoderef-with-param-env-error.stderr
deleted file mode 100644
index cde800336..000000000
--- a/src/test/ui/typeck/autoderef-with-param-env-error.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0412]: cannot find type `T` in this scope
- --> $DIR/autoderef-with-param-env-error.rs:3:5
- |
-LL | fn foo()
- | - help: you might be missing a type parameter: `<T>`
-LL | where
-LL | T: Send,
- | ^ not found in this scope
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/typeck/auxiliary/issue-36708.rs b/src/test/ui/typeck/auxiliary/issue-36708.rs
deleted file mode 100644
index bd8580f97..000000000
--- a/src/test/ui/typeck/auxiliary/issue-36708.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![crate_type = "lib"]
-
-pub trait Foo {
- fn foo();
-}
diff --git a/src/test/ui/typeck/auxiliary/issue-81943-lib.rs b/src/test/ui/typeck/auxiliary/issue-81943-lib.rs
deleted file mode 100644
index 521c54f89..000000000
--- a/src/test/ui/typeck/auxiliary/issue-81943-lib.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-pub fn g(t: i32) -> i32 { t }
-// This function imitates `dbg!` so that future changes
-// to its macro definition won't make this test a dud.
-#[macro_export]
-macro_rules! d {
- ($e:expr) => { match $e { x => { $crate::g(x) } } }
-}
diff --git a/src/test/ui/typeck/auxiliary/tdticc_coherence_lib.rs b/src/test/ui/typeck/auxiliary/tdticc_coherence_lib.rs
deleted file mode 100644
index ef2cd415f..000000000
--- a/src/test/ui/typeck/auxiliary/tdticc_coherence_lib.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#![feature(auto_traits, core)]
-#![crate_type = "rlib"]
-
-pub auto trait DefaultedTrait { }
-
-pub struct Something<T> { t: T }
diff --git a/src/test/ui/typeck/auxiliary/xcrate-issue-43189-a.rs b/src/test/ui/typeck/auxiliary/xcrate-issue-43189-a.rs
deleted file mode 100644
index 9ab570fd1..000000000
--- a/src/test/ui/typeck/auxiliary/xcrate-issue-43189-a.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![crate_type="lib"]
-
-
-pub trait A {
- fn a(&self) {}
-}
-impl A for () {}
diff --git a/src/test/ui/typeck/auxiliary/xcrate-issue-43189-b.rs b/src/test/ui/typeck/auxiliary/xcrate-issue-43189-b.rs
deleted file mode 100644
index 31dfb050b..000000000
--- a/src/test/ui/typeck/auxiliary/xcrate-issue-43189-b.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-#![crate_type="lib"]
-
-pub extern crate xcrate_issue_43189_a;
diff --git a/src/test/ui/typeck/auxiliary/xcrate-issue-46112-rexport-core.rs b/src/test/ui/typeck/auxiliary/xcrate-issue-46112-rexport-core.rs
deleted file mode 100644
index 2b517b578..000000000
--- a/src/test/ui/typeck/auxiliary/xcrate-issue-46112-rexport-core.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-#![crate_type="lib"]
-
-pub extern crate core;
diff --git a/src/test/ui/typeck/auxiliary/xcrate-issue-61711-b.rs b/src/test/ui/typeck/auxiliary/xcrate-issue-61711-b.rs
deleted file mode 100644
index 88a040529..000000000
--- a/src/test/ui/typeck/auxiliary/xcrate-issue-61711-b.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// edition:2018
-#![crate_type="lib"]
-#![crate_name="xcrate_issue_61711_b"]
-pub struct Struct;
-pub use crate as alias;
diff --git a/src/test/ui/typeck/call-block.rs b/src/test/ui/typeck/call-block.rs
deleted file mode 100644
index 0390d7db0..000000000
--- a/src/test/ui/typeck/call-block.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- let _ = {42}(); //~ ERROR expected function, found `{integer}`
-}
diff --git a/src/test/ui/typeck/call-block.stderr b/src/test/ui/typeck/call-block.stderr
deleted file mode 100644
index 68984bc1c..000000000
--- a/src/test/ui/typeck/call-block.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0618]: expected function, found `{integer}`
- --> $DIR/call-block.rs:2:13
- |
-LL | let _ = {42}();
- | ^^^^--
- | |
- | call expression requires function
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/ui/typeck/conversion-methods.rs b/src/test/ui/typeck/conversion-methods.rs
deleted file mode 100644
index 46c2e511f..000000000
--- a/src/test/ui/typeck/conversion-methods.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-use std::path::{Path, PathBuf};
-
-
-fn main() {
- let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types
- let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise");
- //~^ ERROR mismatched types
-
- let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here
- //~^ ERROR mismatched types
-
- let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3]; //~ ERROR mismatched types
-}
diff --git a/src/test/ui/typeck/conversion-methods.stderr b/src/test/ui/typeck/conversion-methods.stderr
deleted file mode 100644
index 091502bdd..000000000
--- a/src/test/ui/typeck/conversion-methods.stderr
+++ /dev/null
@@ -1,45 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/conversion-methods.rs:5:41
- |
-LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—";
- | ------ ^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
- | | |
- | | expected struct `String`, found `&str`
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/conversion-methods.rs:6:40
- |
-LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise");
- | ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_path_buf()`
- | | |
- | | expected struct `PathBuf`, found `&Path`
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/conversion-methods.rs:9:40
- |
-LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here
- | ------ ^- help: try using a conversion method: `.to_string()`
- | | |
- | | expected struct `String`, found integer
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/conversion-methods.rs:12:47
- |
-LL | let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3];
- | ---------- ^^^^^^^^^^ expected struct `Vec`, found `&[{integer}; 3]`
- | |
- | expected due to this
- |
- = note: expected struct `Vec<usize>`
- found reference `&[{integer}; 3]`
-help: try using a conversion method
- |
-LL | let _prove_piercing_earnest: Vec<usize> = (&[1, 2, 3]).to_vec();
- | + ++++++++++
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/deref-multi.rs b/src/test/ui/typeck/deref-multi.rs
deleted file mode 100644
index 3dc4771fe..000000000
--- a/src/test/ui/typeck/deref-multi.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-fn a(x: &&i32) -> i32 {
- x
- //~^ ERROR mismatched types
-}
-
-fn a2(x: &&&&&i32) -> i32 {
- x
- //~^ ERROR mismatched types
-}
-
-fn b(x: &i32) -> i32 {
- &x
- //~^ ERROR mismatched types
-}
-
-fn c(x: Box<i32>) -> i32 {
- &x
- //~^ ERROR mismatched types
-}
-
-fn d(x: std::sync::Mutex<&i32>) -> i32 {
- x.lock().unwrap()
- //~^ ERROR mismatched types
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/deref-multi.stderr b/src/test/ui/typeck/deref-multi.stderr
deleted file mode 100644
index bd6575c73..000000000
--- a/src/test/ui/typeck/deref-multi.stderr
+++ /dev/null
@@ -1,72 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/deref-multi.rs:2:5
- |
-LL | fn a(x: &&i32) -> i32 {
- | --- expected `i32` because of return type
-LL | x
- | ^ expected `i32`, found `&&i32`
- |
-help: consider dereferencing the borrow
- |
-LL | **x
- | ++
-
-error[E0308]: mismatched types
- --> $DIR/deref-multi.rs:7:5
- |
-LL | fn a2(x: &&&&&i32) -> i32 {
- | --- expected `i32` because of return type
-LL | x
- | ^ expected `i32`, found `&&&&&i32`
- |
-help: consider dereferencing the borrow
- |
-LL | *****x
- | +++++
-
-error[E0308]: mismatched types
- --> $DIR/deref-multi.rs:12:5
- |
-LL | fn b(x: &i32) -> i32 {
- | --- expected `i32` because of return type
-LL | &x
- | ^^ expected `i32`, found `&&i32`
- |
-help: consider removing the `&` and dereferencing the borrow instead
- |
-LL | *x
- | ~
-
-error[E0308]: mismatched types
- --> $DIR/deref-multi.rs:17:5
- |
-LL | fn c(x: Box<i32>) -> i32 {
- | --- expected `i32` because of return type
-LL | &x
- | ^^ expected `i32`, found `&Box<i32>`
- |
- = note: expected type `i32`
- found reference `&Box<i32>`
-help: consider removing the `&` and dereferencing the borrow instead
- |
-LL | *x
- | ~
-
-error[E0308]: mismatched types
- --> $DIR/deref-multi.rs:22:5
- |
-LL | fn d(x: std::sync::Mutex<&i32>) -> i32 {
- | --- expected `i32` because of return type
-LL | x.lock().unwrap()
- | ^^^^^^^^^^^^^^^^^ expected `i32`, found struct `MutexGuard`
- |
- = note: expected type `i32`
- found struct `MutexGuard<'_, &i32>`
-help: consider dereferencing the type
- |
-LL | **x.lock().unwrap()
- | ++
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs b/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs
deleted file mode 100644
index 501f4b6ef..000000000
--- a/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-macro_rules! num { () => { 1 } }
-
-fn main() {
- let x = 1i32;
- x.e10; //~ERROR `i32` is a primitive type and therefore doesn't have fields
-
- let y = 1;
- y.e10; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
-
- 2u32.e10; //~ERROR `u32` is a primitive type and therefore doesn't have fields
-
- num!().e10; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
-
- 2.e10foo; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
-
- 42._;
- //~^ERROR expected identifier, found reserved identifier `_`
- //~|ERROR `{integer}` is a primitive type and therefore doesn't have fields
-
- 42.a; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
-}
diff --git a/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.stderr b/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.stderr
deleted file mode 100644
index 1ef1d4c28..000000000
--- a/src/test/ui/typeck/do-not-suggest-adding-missing-zero-to-floating-point-number.stderr
+++ /dev/null
@@ -1,51 +0,0 @@
-error: expected identifier, found reserved identifier `_`
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:16:8
- |
-LL | 42._;
- | ^ expected identifier, found reserved identifier
-
-error[E0610]: `i32` is a primitive type and therefore doesn't have fields
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:5:7
- |
-LL | x.e10;
- | ^^^
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:8:7
- |
-LL | y.e10;
- | ^^^
-
-error[E0610]: `u32` is a primitive type and therefore doesn't have fields
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:10:10
- |
-LL | 2u32.e10;
- | ^^^
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:12:12
- |
-LL | num!().e10;
- | ^^^
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:14:7
- |
-LL | 2.e10foo;
- | ^^^^^^
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:16:8
- |
-LL | 42._;
- | ^
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/do-not-suggest-adding-missing-zero-to-floating-point-number.rs:20:8
- |
-LL | 42.a;
- | ^
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0610`.
diff --git a/src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.rs b/src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.rs
deleted file mode 100644
index 97e0b213f..000000000
--- a/src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-trait Foo {
- const A; //~ ERROR missing type for `const` item
- static B;
- //~^ ERROR associated `static` items are not allowed
- //~| ERROR missing type for `static` item
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.stderr b/src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.stderr
deleted file mode 100644
index 8982d6285..000000000
--- a/src/test/ui/typeck/do-not-suggest-placeholder-to-const-static-without-type.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: associated `static` items are not allowed
- --> $DIR/do-not-suggest-placeholder-to-const-static-without-type.rs:3:5
- |
-LL | static B;
- | ^^^^^^^^^
-
-error: missing type for `const` item
- --> $DIR/do-not-suggest-placeholder-to-const-static-without-type.rs:2:12
- |
-LL | const A;
- | ^ help: provide a type for the item: `: <type>`
-
-error: missing type for `static` item
- --> $DIR/do-not-suggest-placeholder-to-const-static-without-type.rs:3:13
- |
-LL | static B;
- | ^ help: provide a type for the item: `: <type>`
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/typeck/explain_clone_autoref.rs b/src/test/ui/typeck/explain_clone_autoref.rs
deleted file mode 100644
index 9279e4c39..000000000
--- a/src/test/ui/typeck/explain_clone_autoref.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-struct NotClone;
-
-fn main() {
- clone_thing(&NotClone);
-}
-
-fn clone_thing(nc: &NotClone) -> NotClone {
- //~^ NOTE expected `NotClone` because of return type
- nc.clone()
- //~^ ERROR mismatched type
- //~| NOTE `NotClone` does not implement `Clone`, so `&NotClone` was cloned instead
- //~| NOTE expected struct `NotClone`, found `&NotClone`
-}
diff --git a/src/test/ui/typeck/explain_clone_autoref.stderr b/src/test/ui/typeck/explain_clone_autoref.stderr
deleted file mode 100644
index faac680ea..000000000
--- a/src/test/ui/typeck/explain_clone_autoref.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/explain_clone_autoref.rs:9:5
- |
-LL | fn clone_thing(nc: &NotClone) -> NotClone {
- | -------- expected `NotClone` because of return type
-LL |
-LL | nc.clone()
- | ^^^^^^^^^^ expected struct `NotClone`, found `&NotClone`
- |
-note: `NotClone` does not implement `Clone`, so `&NotClone` was cloned instead
- --> $DIR/explain_clone_autoref.rs:9:5
- |
-LL | nc.clone()
- | ^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-100164.fixed b/src/test/ui/typeck/issue-100164.fixed
deleted file mode 100644
index a5f68beb1..000000000
--- a/src/test/ui/typeck/issue-100164.fixed
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-
-const _A: i32 = 123;
-//~^ ERROR: missing type for `const` item
-
-fn main() {
- const _B: i32 = 123;
- //~^ ERROR: missing type for `const` item
-}
diff --git a/src/test/ui/typeck/issue-100164.rs b/src/test/ui/typeck/issue-100164.rs
deleted file mode 100644
index 7efb9ac62..000000000
--- a/src/test/ui/typeck/issue-100164.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-
-const _A: = 123;
-//~^ ERROR: missing type for `const` item
-
-fn main() {
- const _B: = 123;
- //~^ ERROR: missing type for `const` item
-}
diff --git a/src/test/ui/typeck/issue-100164.stderr b/src/test/ui/typeck/issue-100164.stderr
deleted file mode 100644
index 06a132d65..000000000
--- a/src/test/ui/typeck/issue-100164.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: missing type for `const` item
- --> $DIR/issue-100164.rs:3:10
- |
-LL | const _A: = 123;
- | ^ help: provide a type for the constant: `i32`
-
-error: missing type for `const` item
- --> $DIR/issue-100164.rs:7:14
- |
-LL | const _B: = 123;
- | ^ help: provide a type for the constant: `i32`
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/typeck/issue-100246.rs b/src/test/ui/typeck/issue-100246.rs
deleted file mode 100644
index 8f0b34bab..000000000
--- a/src/test/ui/typeck/issue-100246.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-#![recursion_limit = "5"] // To reduce noise
-
-//expect incompatible type error when ambiguous traits are in scope
-//and not an overflow error on the span in the main function.
-
-struct Ratio<T>(T);
-
-pub trait Pow {
- fn pow(self) -> Self;
-}
-
-impl<'a, T> Pow for &'a Ratio<T>
-where
- &'a T: Pow,
-{
- fn pow(self) -> Self {
- self
- }
-}
-
-fn downcast<'a, W: ?Sized>() -> std::io::Result<&'a W> {
- todo!()
-}
-
-struct Other;
-
-fn main() -> std::io::Result<()> {
- let other: Other = downcast()?;//~ERROR 28:24: 28:35: `?` operator has incompatible types
- Ok(())
-}
diff --git a/src/test/ui/typeck/issue-100246.stderr b/src/test/ui/typeck/issue-100246.stderr
deleted file mode 100644
index 8b77de94e..000000000
--- a/src/test/ui/typeck/issue-100246.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0308]: `?` operator has incompatible types
- --> $DIR/issue-100246.rs:28:24
- |
-LL | let other: Other = downcast()?;
- | ^^^^^^^^^^^ expected struct `Other`, found reference
- |
- = note: `?` operator cannot convert from `&_` to `Other`
- = note: expected struct `Other`
- found reference `&_`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-100285.rs b/src/test/ui/typeck/issue-100285.rs
deleted file mode 100644
index e206469b8..000000000
--- a/src/test/ui/typeck/issue-100285.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-fn foo(n: i32) -> i32 {
- for i in 0..0 {
- //~^ ERROR: mismatched types [E0308]
- if n < 0 {
- return i;
- } else if n < 10 {
- return 1;
- } else if n < 20 {
- return 2;
- } else if n < 30 {
- return 3;
- } else if n < 40 {
- return 4;
- } else {
- return 5;
- }
-
- }
- //~| help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-100285.stderr b/src/test/ui/typeck/issue-100285.stderr
deleted file mode 100644
index 42c64b039..000000000
--- a/src/test/ui/typeck/issue-100285.stderr
+++ /dev/null
@@ -1,34 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-100285.rs:2:5
- |
-LL | fn foo(n: i32) -> i32 {
- | --- expected `i32` because of return type
-LL | / for i in 0..0 {
-LL | |
-LL | | if n < 0 {
-LL | | return i;
-... |
-LL | |
-LL | | }
- | |_____^ expected `i32`, found `()`
- |
-note: the function expects a value to always be returned, but loops might run zero times
- --> $DIR/issue-100285.rs:2:5
- |
-LL | for i in 0..0 {
- | ^^^^^^^^^^^^^ this might have zero elements to iterate on
-...
-LL | return i;
- | -------- if the loop doesn't execute, this value would never get returned
-LL | } else if n < 10 {
-LL | return 1;
- | -------- if the loop doesn't execute, this value would never get returned
-LL | } else if n < 20 {
-LL | return 2;
- | -------- if the loop doesn't execute, this value would never get returned
- = note: if the loop doesn't execute, 3 other values would never get returned
- = help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-103899.rs b/src/test/ui/typeck/issue-103899.rs
deleted file mode 100644
index ac9e4c716..000000000
--- a/src/test/ui/typeck/issue-103899.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// check-fail
-// failure-status: 101
-// dont-check-compiler-stderr
-// known-bug: #103899
-
-trait BaseWithAssoc {
- type Assoc;
-}
-
-trait WrapperWithAssoc {
- type BaseAssoc: BaseWithAssoc;
-}
-
-struct Wrapper<B> {
- inner: B,
-}
-
-struct ProjectToBase<T: BaseWithAssoc> {
- data_type_h: T::Assoc,
-}
-
-struct DoubleProject<L: WrapperWithAssoc> {
- buffer: Wrapper<ProjectToBase<L::BaseAssoc>>,
-}
-
-fn trigger<L: WrapperWithAssoc<BaseAssoc = ()>>() -> DoubleProject<L> {
- loop {}
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-10401.rs b/src/test/ui/typeck/issue-10401.rs
deleted file mode 100644
index d77ff381e..000000000
--- a/src/test/ui/typeck/issue-10401.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-fn main() {
- let mut a = "a";
- a += { "b" };
- //~^ ERROR: binary assignment operation `+=` cannot be applied
-}
diff --git a/src/test/ui/typeck/issue-10401.stderr b/src/test/ui/typeck/issue-10401.stderr
deleted file mode 100644
index 1f68abcfb..000000000
--- a/src/test/ui/typeck/issue-10401.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0368]: binary assignment operation `+=` cannot be applied to type `&str`
- --> $DIR/issue-10401.rs:3:5
- |
-LL | a += { "b" };
- | -^^^^^^^^^^^
- | |
- | cannot use `+=` on type `&str`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0368`.
diff --git a/src/test/ui/typeck/issue-104510-ice.rs b/src/test/ui/typeck/issue-104510-ice.rs
deleted file mode 100644
index 157bdf07e..000000000
--- a/src/test/ui/typeck/issue-104510-ice.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// needs-asm-support
-// only-x86_64
-
-struct W<T: ?Sized>(Oops);
-//~^ ERROR cannot find type `Oops` in this scope
-
-unsafe fn test() {
- let j = W(());
- let pointer = &j as *const _;
- core::arch::asm!(
- "nop",
- in("eax") pointer,
- );
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-104510-ice.stderr b/src/test/ui/typeck/issue-104510-ice.stderr
deleted file mode 100644
index ddb510ef0..000000000
--- a/src/test/ui/typeck/issue-104510-ice.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0412]: cannot find type `Oops` in this scope
- --> $DIR/issue-104510-ice.rs:4:21
- |
-LL | struct W<T: ?Sized>(Oops);
- | ^^^^ not found in this scope
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/typeck/issue-104513-ice.rs b/src/test/ui/typeck/issue-104513-ice.rs
deleted file mode 100644
index bcac0fa1e..000000000
--- a/src/test/ui/typeck/issue-104513-ice.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-struct S;
-fn f() {
- let _: S<impl Oops> = S; //~ ERROR cannot find trait `Oops` in this scope
- //~^ ERROR `impl Trait` only allowed in function and inherent method return types
-}
-fn main() {}
diff --git a/src/test/ui/typeck/issue-104513-ice.stderr b/src/test/ui/typeck/issue-104513-ice.stderr
deleted file mode 100644
index 2b3b1b9ef..000000000
--- a/src/test/ui/typeck/issue-104513-ice.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0405]: cannot find trait `Oops` in this scope
- --> $DIR/issue-104513-ice.rs:3:19
- |
-LL | fn f() {
- | - help: you might be missing a type parameter: `<Oops>`
-LL | let _: S<impl Oops> = S;
- | ^^^^ not found in this scope
-
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in variable binding
- --> $DIR/issue-104513-ice.rs:3:14
- |
-LL | let _: S<impl Oops> = S;
- | ^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0405, E0562.
-For more information about an error, try `rustc --explain E0405`.
diff --git a/src/test/ui/typeck/issue-10969.rs b/src/test/ui/typeck/issue-10969.rs
deleted file mode 100644
index 0b78fc1bb..000000000
--- a/src/test/ui/typeck/issue-10969.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-fn func(i: i32) {
- i(); //~ERROR expected function, found `i32`
-}
-fn main() {
- let i = 0i32;
- i(); //~ERROR expected function, found `i32`
-}
diff --git a/src/test/ui/typeck/issue-10969.stderr b/src/test/ui/typeck/issue-10969.stderr
deleted file mode 100644
index f64b61aae..000000000
--- a/src/test/ui/typeck/issue-10969.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0618]: expected function, found `i32`
- --> $DIR/issue-10969.rs:2:5
- |
-LL | fn func(i: i32) {
- | - `i` has type `i32`
-LL | i();
- | ^--
- | |
- | call expression requires function
-
-error[E0618]: expected function, found `i32`
- --> $DIR/issue-10969.rs:6:5
- |
-LL | let i = 0i32;
- | - `i` has type `i32`
-LL | i();
- | ^--
- | |
- | call expression requires function
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0618`.
diff --git a/src/test/ui/typeck/issue-13853-2.rs b/src/test/ui/typeck/issue-13853-2.rs
deleted file mode 100644
index 27319c98d..000000000
--- a/src/test/ui/typeck/issue-13853-2.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-trait FromStructReader<'a> { }
-trait ResponseHook {
- fn get(&self);
-}
-fn foo(res : Box<dyn ResponseHook>) { res.get } //~ ERROR attempted to take value of method
-fn main() {}
diff --git a/src/test/ui/typeck/issue-13853-2.stderr b/src/test/ui/typeck/issue-13853-2.stderr
deleted file mode 100644
index 92068df6c..000000000
--- a/src/test/ui/typeck/issue-13853-2.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0615]: attempted to take value of method `get` on type `Box<(dyn ResponseHook + 'static)>`
- --> $DIR/issue-13853-2.rs:5:43
- |
-LL | fn foo(res : Box<dyn ResponseHook>) { res.get }
- | ^^^ method, not a field
- |
-help: use parentheses to call the method
- |
-LL | fn foo(res : Box<dyn ResponseHook>) { res.get() }
- | ++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0615`.
diff --git a/src/test/ui/typeck/issue-13853-5.rs b/src/test/ui/typeck/issue-13853-5.rs
deleted file mode 100644
index 2afdf95aa..000000000
--- a/src/test/ui/typeck/issue-13853-5.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-trait Deserializer<'a> { }
-
-trait Deserializable {
- fn deserialize_token<'a, D: Deserializer<'a>>(_: D, _: &'a str) -> Self;
-}
-
-impl<'a, T: Deserializable> Deserializable for &'a str {
- //~^ ERROR type parameter `T` is not constrained
- fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-13853-5.stderr b/src/test/ui/typeck/issue-13853-5.stderr
deleted file mode 100644
index 3d8f824ec..000000000
--- a/src/test/ui/typeck/issue-13853-5.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
- --> $DIR/issue-13853-5.rs:7:10
- |
-LL | impl<'a, T: Deserializable> Deserializable for &'a str {
- | ^ unconstrained type parameter
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0207`.
diff --git a/src/test/ui/typeck/issue-13853.rs b/src/test/ui/typeck/issue-13853.rs
deleted file mode 100644
index ac9886d2e..000000000
--- a/src/test/ui/typeck/issue-13853.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-trait Node {
- fn zomg();
-}
-
-trait Graph<N: Node> {
- fn nodes<'a, I: Iterator<Item=&'a N>>(&'a self) -> I
- where N: 'a;
-}
-
-impl<N: Node> Graph<N> for Vec<N> {
- fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
- where N: 'a
- {
- self.iter() //~ ERROR mismatched types
- }
-}
-
-struct Stuff;
-
-impl Node for Stuff {
- fn zomg() {
- println!("zomg");
- }
-}
-
-fn iterate<N: Node, G: Graph<N>>(graph: &G) {
- for node in graph.iter() { //~ ERROR no method named `iter` found
- node.zomg();
- }
-}
-
-pub fn main() {
- let graph = Vec::new();
-
- graph.push(Stuff);
-
- iterate(graph); //~ ERROR mismatched types
-}
diff --git a/src/test/ui/typeck/issue-13853.stderr b/src/test/ui/typeck/issue-13853.stderr
deleted file mode 100644
index 657bda5f6..000000000
--- a/src/test/ui/typeck/issue-13853.stderr
+++ /dev/null
@@ -1,40 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-13853.rs:14:9
- |
-LL | fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
- | - this type parameter - expected `I` because of return type
-...
-LL | self.iter()
- | ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter`
- |
- = note: expected type parameter `I`
- found struct `std::slice::Iter<'_, N>`
-
-error[E0599]: no method named `iter` found for reference `&G` in the current scope
- --> $DIR/issue-13853.rs:27:23
- |
-LL | for node in graph.iter() {
- | ^^^^ method not found in `&G`
-
-error[E0308]: mismatched types
- --> $DIR/issue-13853.rs:37:13
- |
-LL | iterate(graph);
- | ------- ^^^^^
- | | |
- | | expected reference, found struct `Vec`
- | | help: consider borrowing here: `&graph`
- | arguments to this function are incorrect
- |
- = note: expected reference `&_`
- found struct `Vec<Stuff>`
-note: function defined here
- --> $DIR/issue-13853.rs:26:4
- |
-LL | fn iterate<N: Node, G: Graph<N>>(graph: &G) {
- | ^^^^^^^ ---------
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0308, E0599.
-For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-29124.rs b/src/test/ui/typeck/issue-29124.rs
deleted file mode 100644
index dd2784841..000000000
--- a/src/test/ui/typeck/issue-29124.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-struct Ret;
-struct Obj;
-
-impl Obj {
- fn func() -> Ret {
- Ret
- }
-}
-
-fn func() -> Ret {
- Ret
-}
-
-fn main() {
- Obj::func.x();
- //~^ ERROR no method named `x` found
- func.x();
- //~^ ERROR no method named `x` found
-}
diff --git a/src/test/ui/typeck/issue-29124.stderr b/src/test/ui/typeck/issue-29124.stderr
deleted file mode 100644
index a837a7d2d..000000000
--- a/src/test/ui/typeck/issue-29124.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0599]: no method named `x` found for fn item `fn() -> Ret {Obj::func}` in the current scope
- --> $DIR/issue-29124.rs:15:15
- |
-LL | Obj::func.x();
- | ^ method not found in `fn() -> Ret {Obj::func}`
-
-error[E0599]: no method named `x` found for fn item `fn() -> Ret {func}` in the current scope
- --> $DIR/issue-29124.rs:17:10
- |
-LL | func.x();
- | ^ method not found in `fn() -> Ret {func}`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/issue-36708.rs b/src/test/ui/typeck/issue-36708.rs
deleted file mode 100644
index c9d9f2a6d..000000000
--- a/src/test/ui/typeck/issue-36708.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// aux-build:issue-36708.rs
-
-extern crate issue_36708 as lib;
-
-struct Bar;
-
-impl lib::Foo for Bar {
- fn foo<T>() {}
- //~^ ERROR E0049
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-36708.stderr b/src/test/ui/typeck/issue-36708.stderr
deleted file mode 100644
index 140f19f1f..000000000
--- a/src/test/ui/typeck/issue-36708.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
- --> $DIR/issue-36708.rs:8:12
- |
-LL | fn foo<T>() {}
- | ^ found 1 type parameter, expected 0
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0049`.
diff --git a/src/test/ui/typeck/issue-43189.rs b/src/test/ui/typeck/issue-43189.rs
deleted file mode 100644
index ce667a500..000000000
--- a/src/test/ui/typeck/issue-43189.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Issue 46112: An extern crate pub re-exporting libcore was causing
-// paths rooted from `std` to be misrendered in the diagnostic output.
-
-// ignore-windows
-// aux-build:xcrate-issue-43189-a.rs
-// aux-build:xcrate-issue-43189-b.rs
-
-extern crate xcrate_issue_43189_b;
-fn main() {
- ().a();
- //~^ ERROR no method named `a` found
-}
diff --git a/src/test/ui/typeck/issue-43189.stderr b/src/test/ui/typeck/issue-43189.stderr
deleted file mode 100644
index caf7530b8..000000000
--- a/src/test/ui/typeck/issue-43189.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0599]: no method named `a` found for unit type `()` in the current scope
- --> $DIR/issue-43189.rs:10:8
- |
-LL | ().a();
- | ^ method not found in `()`
- |
- ::: $DIR/auxiliary/xcrate-issue-43189-a.rs:5:8
- |
-LL | fn a(&self) {}
- | - the method is available for `()` here
- |
- = help: items from traits can only be used if the trait is in scope
-help: the following trait is implemented but not in scope; perhaps add a `use` for it:
- |
-LL | use xcrate_issue_43189_b::xcrate_issue_43189_a::A;
- |
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/issue-46112.rs b/src/test/ui/typeck/issue-46112.rs
deleted file mode 100644
index 0cdd2c27f..000000000
--- a/src/test/ui/typeck/issue-46112.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Issue 46112: An extern crate pub re-exporting libcore was causing
-// paths rooted from `std` to be misrendered in the diagnostic output.
-
-// ignore-windows
-// aux-build:xcrate-issue-46112-rexport-core.rs
-
-extern crate xcrate_issue_46112_rexport_core;
-fn test(r: Result<Option<()>, &'static str>) { }
-fn main() { test(Ok(())); }
-//~^ mismatched types
diff --git a/src/test/ui/typeck/issue-46112.stderr b/src/test/ui/typeck/issue-46112.stderr
deleted file mode 100644
index 91381e8ef..000000000
--- a/src/test/ui/typeck/issue-46112.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-46112.rs:9:21
- |
-LL | fn main() { test(Ok(())); }
- | -- ^^ expected enum `Option`, found `()`
- | |
- | arguments to this enum variant are incorrect
- |
- = note: expected enum `Option<()>`
- found unit type `()`
-note: tuple variant defined here
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
-help: try wrapping the expression in `Some`
- |
-LL | fn main() { test(Ok(Some(()))); }
- | +++++ +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-50687-ice-on-borrow.rs b/src/test/ui/typeck/issue-50687-ice-on-borrow.rs
deleted file mode 100644
index 7a8a12c2a..000000000
--- a/src/test/ui/typeck/issue-50687-ice-on-borrow.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// This previously caused an ICE at:
-// librustc/traits/structural_impls.rs:180: impossible case reached
-
-#![no_main]
-
-use std::borrow::Borrow;
-use std::io;
-use std::io::Write;
-
-trait Constraint {}
-
-struct Container<T> {
- t: T,
-}
-
-struct Borrowed;
-struct Owned;
-
-impl<'a, T> Write for &'a Container<T>
-where
- T: Constraint,
- &'a T: Write,
-{
- fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
- Ok(buf.len())
- }
-
- fn flush(&mut self) -> io::Result<()> {
- Ok(())
- }
-}
-
-impl Borrow<Borrowed> for Owned {
- fn borrow(&self) -> &Borrowed {
- &Borrowed
- }
-}
-
-fn func(owned: Owned) {
- let _: () = Borrow::borrow(&owned); //~ ERROR mismatched types
-}
diff --git a/src/test/ui/typeck/issue-50687-ice-on-borrow.stderr b/src/test/ui/typeck/issue-50687-ice-on-borrow.stderr
deleted file mode 100644
index e6a0edac4..000000000
--- a/src/test/ui/typeck/issue-50687-ice-on-borrow.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-50687-ice-on-borrow.rs:40:17
- |
-LL | let _: () = Borrow::borrow(&owned);
- | -- ^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found reference
- | |
- | expected due to this
- |
- = note: expected unit type `()`
- found reference `&_`
-help: consider dereferencing the borrow
- |
-LL | let _: () = *Borrow::borrow(&owned);
- | +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs b/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs
deleted file mode 100644
index 7bf151514..000000000
--- a/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-// Fix issue 52082: Confusing error if accidentally defining a type parameter with the same name as
-// an existing type
-//
-// To this end, make sure that when trying to retrieve a field of a (reference to) type parameter,
-// rustc points to the point where the parameter was defined.
-#[derive(Debug)]
-struct Point
-{
- x: i32,
- y: i32
-}
-
-impl Point
-{
- fn add(a: &Point, b: &Point) -> Point
- {
- Point {x: a.x + b.x, y: a.y + b.y}
- }
-}
-
-trait Eq
-{
- fn equals_ref<T>(a: &T, b: &T) -> bool;
- fn equals_val<T>(a: T, b: T) -> bool;
-}
-
-impl Eq for Point
-{
- fn equals_ref<Point>(a: &Point, b: &Point) -> bool
- {
- a.x == b.x && a.y == b.y //~ ERROR no field `x` on type `&Point` [E0609]
- //~|ERROR no field `x` on type `&Point` [E0609]
- //~|ERROR no field `y` on type `&Point` [E0609]
- //~|ERROR no field `y` on type `&Point` [E0609]
- }
-
- fn equals_val<Point>(a: Point, b: Point) -> bool
- {
- a.x == b.x && a.y == b.y //~ ERROR no field `x` on type `Point` [E0609]
- //~|ERROR no field `x` on type `Point` [E0609]
- //~|ERROR no field `y` on type `Point` [E0609]
- //~|ERROR no field `y` on type `Point` [E0609]
- }
-}
-
-fn main()
-{
- let p1 = Point {x: 0, y: 10};
- let p2 = Point {x: 20, y: 42};
- println!("{:?}", Point::add(&p1, &p2));
- println!("p1: {:?}, p2: {:?}", p1, p2);
- println!("&p1 == &p2: {:?}", Point::equals_ref(&p1, &p2));
- println!("p1 == p2: {:?}", Point::equals_val(p1, p2));
-}
diff --git a/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr b/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr
deleted file mode 100644
index 4be4c91df..000000000
--- a/src/test/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr
+++ /dev/null
@@ -1,75 +0,0 @@
-error[E0609]: no field `x` on type `&Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:31:11
- |
-LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error[E0609]: no field `x` on type `&Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:31:18
- |
-LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error[E0609]: no field `y` on type `&Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:31:25
- |
-LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error[E0609]: no field `y` on type `&Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:31:32
- |
-LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error[E0609]: no field `x` on type `Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:11
- |
-LL | fn equals_val<Point>(a: Point, b: Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error[E0609]: no field `x` on type `Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:18
- |
-LL | fn equals_val<Point>(a: Point, b: Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error[E0609]: no field `y` on type `Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:25
- |
-LL | fn equals_val<Point>(a: Point, b: Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error[E0609]: no field `y` on type `Point`
- --> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:32
- |
-LL | fn equals_val<Point>(a: Point, b: Point) -> bool
- | ----- type parameter 'Point' declared here
-LL | {
-LL | a.x == b.x && a.y == b.y
- | ^
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs b/src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs
deleted file mode 100644
index 23ea0ad61..000000000
--- a/src/test/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// check-pass
-
-// rust-lang/rust#55810: types for a binding in a match arm can be
-// inferred from arms that come later in the match.
-
-struct S;
-
-impl S {
- fn method(&self) -> bool {
- unimplemented!()
- }
-}
-
-fn get<T>() -> T {
- unimplemented!()
-}
-
-fn main() {
- match get() {
- x if x.method() => {}
- &S => {}
- }
-}
diff --git a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.rs b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.rs
deleted file mode 100644
index 0a4e7da2b..000000000
--- a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-//extern crate has_assoc_type;
-
-//fn ice(x: Box<dyn has_assoc_type::Foo<Assoc=()>>) {
-fn ice(x: Box<dyn Iterator<Item=()>>) {
- *x //~ ERROR mismatched types [E0308]
-}
-fn main() {}
diff --git a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
deleted file mode 100644
index b92a6f2ec..000000000
--- a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-57673-ice-on-deref-of-boxed-trait.rs:5:5
- |
-LL | fn ice(x: Box<dyn Iterator<Item=()>>) {
- | - help: try adding a return type: `-> (dyn Iterator<Item = ()> + 'static)`
-LL | *x
- | ^^ expected `()`, found trait object `dyn Iterator`
- |
- = note: expected unit type `()`
- found trait object `(dyn Iterator<Item = ()> + 'static)`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs b/src/test/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs
deleted file mode 100644
index de7d6a0d8..000000000
--- a/src/test/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Issue 61711: A crate pub re-exporting `crate` was causing an
-// infinite loop.
-
-// edition:2018
-// aux-build:xcrate-issue-61711-b.rs
-// compile-flags:--extern xcrate_issue_61711_b
-
-// build-pass
-
-fn f<F: Fn(xcrate_issue_61711_b::Struct)>(_: F) { }
-fn main() { }
diff --git a/src/test/ui/typeck/issue-65611.rs b/src/test/ui/typeck/issue-65611.rs
deleted file mode 100644
index 764531149..000000000
--- a/src/test/ui/typeck/issue-65611.rs
+++ /dev/null
@@ -1,63 +0,0 @@
-use std::mem::MaybeUninit;
-use std::ops::Deref;
-
-pub unsafe trait Array {
- /// The array’s element type
- type Item;
- #[doc(hidden)]
- /// The smallest index type that indexes the array.
- type Index: Index;
- #[doc(hidden)]
- fn as_ptr(&self) -> *const Self::Item;
- #[doc(hidden)]
- fn as_mut_ptr(&mut self) -> *mut Self::Item;
- #[doc(hidden)]
- fn capacity() -> usize;
-}
-
-pub trait Index : PartialEq + Copy {
- fn to_usize(self) -> usize;
- fn from(i: usize) -> Self;
-}
-
-impl Index for usize {
- fn to_usize(self) -> usize { self }
- fn from(val: usize) -> Self {
- val
- }
-}
-
-unsafe impl<T> Array for [T; 1] {
- type Item = T;
- type Index = usize;
- fn as_ptr(&self) -> *const T { self as *const _ as *const _ }
- fn as_mut_ptr(&mut self) -> *mut T { self as *mut _ as *mut _}
- fn capacity() -> usize { 1 }
-}
-
-impl<A: Array> Deref for ArrayVec<A> {
- type Target = [A::Item];
- #[inline]
- fn deref(&self) -> &[A::Item] {
- panic!()
- }
-}
-
-pub struct ArrayVec<A: Array> {
- xs: MaybeUninit<A>,
- len: usize,
-}
-
-impl<A: Array> ArrayVec<A> {
- pub fn new() -> ArrayVec<A> {
- panic!()
- }
-}
-
-fn main() {
- let mut buffer = ArrayVec::new();
- let x = buffer.last().unwrap().0.clone();
- //~^ ERROR type annotations needed
- //~| ERROR no field `0` on type `&_`
- buffer.reverse();
-}
diff --git a/src/test/ui/typeck/issue-65611.stderr b/src/test/ui/typeck/issue-65611.stderr
deleted file mode 100644
index 003c63079..000000000
--- a/src/test/ui/typeck/issue-65611.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0282]: type annotations needed
- --> $DIR/issue-65611.rs:59:13
- |
-LL | let x = buffer.last().unwrap().0.clone();
- | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
-
-error[E0609]: no field `0` on type `&_`
- --> $DIR/issue-65611.rs:59:36
- |
-LL | let x = buffer.last().unwrap().0.clone();
- | ^
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0282, E0609.
-For more information about an error, try `rustc --explain E0282`.
diff --git a/src/test/ui/typeck/issue-67971.rs b/src/test/ui/typeck/issue-67971.rs
deleted file mode 100644
index 8bf725cb5..000000000
--- a/src/test/ui/typeck/issue-67971.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-struct S {}
-
-fn foo(ctx: &mut S) -> String { //~ ERROR mismatched types
- // Don't suggest to remove semicolon as it won't fix anything
- ctx.sleep = 0;
- //~^ ERROR no field `sleep` on type `&mut S`
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-67971.stderr b/src/test/ui/typeck/issue-67971.stderr
deleted file mode 100644
index 5d07f9cc7..000000000
--- a/src/test/ui/typeck/issue-67971.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0609]: no field `sleep` on type `&mut S`
- --> $DIR/issue-67971.rs:5:9
- |
-LL | ctx.sleep = 0;
- | ^^^^^ unknown field
-
-error[E0308]: mismatched types
- --> $DIR/issue-67971.rs:3:24
- |
-LL | fn foo(ctx: &mut S) -> String {
- | --- ^^^^^^ expected struct `String`, found `()`
- | |
- | implicitly returns `()` as its body has no tail or `return` expression
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0308, E0609.
-For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-68590-reborrow-through-derefmut.rs b/src/test/ui/typeck/issue-68590-reborrow-through-derefmut.rs
deleted file mode 100644
index e4436260e..000000000
--- a/src/test/ui/typeck/issue-68590-reborrow-through-derefmut.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// check-pass
-
-// rust-lang/rust#68590: confusing diagnostics when reborrowing through DerefMut.
-
-use std::cell::RefCell;
-
-struct A;
-
-struct S<'a> {
- a: &'a mut A,
-}
-
-fn take_a(_: &mut A) {}
-
-fn test<'a>(s: &RefCell<S<'a>>) {
- let mut guard = s.borrow_mut();
- take_a(guard.a);
- let _s2 = S { a: guard.a };
-}
-
-fn main() {
- let a = &mut A;
- let s = RefCell::new(S { a });
- test(&s);
-}
diff --git a/src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.rs b/src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.rs
deleted file mode 100644
index 571692a53..000000000
--- a/src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Regression test for #69378: no type for node after struct parse recovery
-
-struct Foo { 0: u8 } //~ ERROR expected identifier
-
-fn test(f: Foo) {
- Foo{foo: 4, ..f};
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr b/src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr
deleted file mode 100644
index fc7c23a22..000000000
--- a/src/test/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: expected identifier, found `0`
- --> $DIR/issue-69378-ice-on-invalid-type-node-after-recovery.rs:3:14
- |
-LL | struct Foo { 0: u8 }
- | --- ^ expected identifier
- | |
- | while parsing this struct
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs b/src/test/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs
deleted file mode 100644
index 3ea05389f..000000000
--- a/src/test/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// check-pass
-
-// rust-lang/rust#72225: confusing diagnostics when calling FnMut through DerefMut.
-
-use std::cell::RefCell;
-
-struct S {
- f: Box<dyn FnMut()>
-}
-
-fn test(s: &RefCell<S>) {
- let mut guard = s.borrow_mut();
- (guard.f)();
-}
-
-fn main() {
- let s = RefCell::new(S {
- f: Box::new(|| ())
- });
- test(&s);
-}
diff --git a/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.fixed b/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.fixed
deleted file mode 100644
index 7fdd618c2..000000000
--- a/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.fixed
+++ /dev/null
@@ -1,59 +0,0 @@
-// check-pass
-// run-rustfix
-//
-// rust-lang/rust#73592: borrow_mut through Deref should work.
-//
-// Before #72280, when we see something like `&mut *rcvr.method()`, we
-// incorrectly requires `rcvr` to be type-checked as a mut place. While this
-// requirement is usually correct for smart pointers, it is overly restrictive
-// for types like `Mutex` or `RefCell` which can produce a guard that
-// implements `DerefMut` from `&self`.
-//
-// Making it more confusing, because we use Deref as the fallback when DerefMut
-// is implemented, we won't see an issue when the smart pointer does not
-// implement `DerefMut`. It only causes an issue when `rcvr` is obtained via a
-// type that implements both `Deref` or `DerefMut`.
-//
-// This bug is only discovered in #73592 after it is already fixed as a side-effect
-// of a refactoring made in #72280.
-
-#![warn(unused_mut)]
-
-use std::pin::Pin;
-use std::cell::RefCell;
-
-struct S(RefCell<()>);
-
-fn test_pin(s: Pin<&S>) {
- // This works before #72280.
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn test_pin_mut(s: Pin<&mut S>) {
- // This should compile but didn't before #72280.
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn test_vec(s: &Vec<RefCell<()>>) {
- // This should compile but didn't before #72280.
- let _ = &mut *s[0].borrow_mut();
-}
-
-fn test_mut_pin(s: Pin<&S>) {
- //~^ WARN variable does not need to be mutable
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn test_mut_pin_mut(s: Pin<&mut S>) {
- //~^ WARN variable does not need to be mutable
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn main() {
- let mut s = S(RefCell::new(()));
- test_pin(Pin::new(&s));
- test_pin_mut(Pin::new(&mut s));
- test_mut_pin(Pin::new(&s));
- test_mut_pin_mut(Pin::new(&mut s));
- test_vec(&vec![s.0]);
-}
diff --git a/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.rs b/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.rs
deleted file mode 100644
index 3b399e629..000000000
--- a/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.rs
+++ /dev/null
@@ -1,59 +0,0 @@
-// check-pass
-// run-rustfix
-//
-// rust-lang/rust#73592: borrow_mut through Deref should work.
-//
-// Before #72280, when we see something like `&mut *rcvr.method()`, we
-// incorrectly requires `rcvr` to be type-checked as a mut place. While this
-// requirement is usually correct for smart pointers, it is overly restrictive
-// for types like `Mutex` or `RefCell` which can produce a guard that
-// implements `DerefMut` from `&self`.
-//
-// Making it more confusing, because we use Deref as the fallback when DerefMut
-// is implemented, we won't see an issue when the smart pointer does not
-// implement `DerefMut`. It only causes an issue when `rcvr` is obtained via a
-// type that implements both `Deref` or `DerefMut`.
-//
-// This bug is only discovered in #73592 after it is already fixed as a side-effect
-// of a refactoring made in #72280.
-
-#![warn(unused_mut)]
-
-use std::pin::Pin;
-use std::cell::RefCell;
-
-struct S(RefCell<()>);
-
-fn test_pin(s: Pin<&S>) {
- // This works before #72280.
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn test_pin_mut(s: Pin<&mut S>) {
- // This should compile but didn't before #72280.
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn test_vec(s: &Vec<RefCell<()>>) {
- // This should compile but didn't before #72280.
- let _ = &mut *s[0].borrow_mut();
-}
-
-fn test_mut_pin(mut s: Pin<&S>) {
- //~^ WARN variable does not need to be mutable
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn test_mut_pin_mut(mut s: Pin<&mut S>) {
- //~^ WARN variable does not need to be mutable
- let _ = &mut *s.0.borrow_mut();
-}
-
-fn main() {
- let mut s = S(RefCell::new(()));
- test_pin(Pin::new(&s));
- test_pin_mut(Pin::new(&mut s));
- test_mut_pin(Pin::new(&s));
- test_mut_pin_mut(Pin::new(&mut s));
- test_vec(&vec![s.0]);
-}
diff --git a/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.stderr b/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.stderr
deleted file mode 100644
index 5f5f672c3..000000000
--- a/src/test/ui/typeck/issue-73592-borrow_mut-through-deref.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-warning: variable does not need to be mutable
- --> $DIR/issue-73592-borrow_mut-through-deref.rs:42:17
- |
-LL | fn test_mut_pin(mut s: Pin<&S>) {
- | ----^
- | |
- | help: remove this `mut`
- |
-note: the lint level is defined here
- --> $DIR/issue-73592-borrow_mut-through-deref.rs:20:9
- |
-LL | #![warn(unused_mut)]
- | ^^^^^^^^^^
-
-warning: variable does not need to be mutable
- --> $DIR/issue-73592-borrow_mut-through-deref.rs:47:21
- |
-LL | fn test_mut_pin_mut(mut s: Pin<&mut S>) {
- | ----^
- | |
- | help: remove this `mut`
-
-warning: 2 warnings emitted
-
diff --git a/src/test/ui/typeck/issue-74086.rs b/src/test/ui/typeck/issue-74086.rs
deleted file mode 100644
index 9b7c0d7cc..000000000
--- a/src/test/ui/typeck/issue-74086.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-fn main() {
- static BUG: fn(_) -> u8 = |_| 8;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions [E0121]
- //~| ERROR the placeholder `_` is not allowed within types on item signatures for static items
-}
diff --git a/src/test/ui/typeck/issue-74086.stderr b/src/test/ui/typeck/issue-74086.stderr
deleted file mode 100644
index 95ebf9a90..000000000
--- a/src/test/ui/typeck/issue-74086.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/issue-74086.rs:2:20
- |
-LL | static BUG: fn(_) -> u8 = |_| 8;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static items
- --> $DIR/issue-74086.rs:2:20
- |
-LL | static BUG: fn(_) -> u8 = |_| 8;
- | ^ not allowed in type signatures
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-74933.rs b/src/test/ui/typeck/issue-74933.rs
deleted file mode 100644
index 4b6c173b8..000000000
--- a/src/test/ui/typeck/issue-74933.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// check-pass
-//
-// rust-lang/rust#74933: Lifetime error when indexing with borrowed index
-
-use std::ops::{Index, IndexMut};
-
-struct S(V);
-struct K<'a>(&'a ());
-struct V;
-
-impl<'a> Index<&'a K<'a>> for S {
- type Output = V;
-
- fn index(&self, _: &'a K<'a>) -> &V {
- &self.0
- }
-}
-
-impl<'a> IndexMut<&'a K<'a>> for S {
- fn index_mut(&mut self, _: &'a K<'a>) -> &mut V {
- &mut self.0
- }
-}
-
-impl V {
- fn foo(&mut self) {}
-}
-
-fn test(s: &mut S, k: &K<'_>) {
- s[k] = V;
- s[k].foo();
-}
-
-fn main() {
- let mut s = S(V);
- let k = K(&());
- test(&mut s, &k);
-}
diff --git a/src/test/ui/typeck/issue-75883.rs b/src/test/ui/typeck/issue-75883.rs
deleted file mode 100644
index 885acc482..000000000
--- a/src/test/ui/typeck/issue-75883.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Regression test for #75883.
-
-pub struct UI {}
-
-impl UI {
- pub fn run() -> Result<_> {
- //~^ ERROR: this enum takes 2 generic arguments but 1 generic argument was supplied
- //~| ERROR: the placeholder `_` is not allowed within types on item signatures for return types
- let mut ui = UI {};
- ui.interact();
-
- unimplemented!();
- }
-
- pub fn interact(&mut self) -> Result<_> {
- //~^ ERROR: this enum takes 2 generic arguments but 1 generic argument was supplied
- //~| ERROR: the placeholder `_` is not allowed within types on item signatures for return types
- unimplemented!();
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-75883.stderr b/src/test/ui/typeck/issue-75883.stderr
deleted file mode 100644
index 3861e0507..000000000
--- a/src/test/ui/typeck/issue-75883.stderr
+++ /dev/null
@@ -1,52 +0,0 @@
-error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
- --> $DIR/issue-75883.rs:6:21
- |
-LL | pub fn run() -> Result<_> {
- | ^^^^^^ - supplied 1 generic argument
- | |
- | expected 2 generic arguments
- |
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
-help: add missing generic argument
- |
-LL | pub fn run() -> Result<_, E> {
- | +++
-
-error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
- --> $DIR/issue-75883.rs:15:35
- |
-LL | pub fn interact(&mut self) -> Result<_> {
- | ^^^^^^ - supplied 1 generic argument
- | |
- | expected 2 generic arguments
- |
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
-help: add missing generic argument
- |
-LL | pub fn interact(&mut self) -> Result<_, E> {
- | +++
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/issue-75883.rs:15:42
- |
-LL | pub fn interact(&mut self) -> Result<_> {
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/issue-75883.rs:6:28
- |
-LL | pub fn run() -> Result<_> {
- | ^ not allowed in type signatures
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0107, E0121.
-For more information about an error, try `rustc --explain E0107`.
diff --git a/src/test/ui/typeck/issue-75889.rs b/src/test/ui/typeck/issue-75889.rs
deleted file mode 100644
index 84c067ed0..000000000
--- a/src/test/ui/typeck/issue-75889.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Regression test for #75889.
-
-const FOO: dyn Fn() -> _ = ""; //~ ERROR E0121
-static BOO: dyn Fn() -> _ = ""; //~ ERROR E0121
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-75889.stderr b/src/test/ui/typeck/issue-75889.stderr
deleted file mode 100644
index 1438f481e..000000000
--- a/src/test/ui/typeck/issue-75889.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items
- --> $DIR/issue-75889.rs:3:24
- |
-LL | const FOO: dyn Fn() -> _ = "";
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static items
- --> $DIR/issue-75889.rs:4:25
- |
-LL | static BOO: dyn Fn() -> _ = "";
- | ^ not allowed in type signatures
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-79040.rs b/src/test/ui/typeck/issue-79040.rs
deleted file mode 100644
index 941612542..000000000
--- a/src/test/ui/typeck/issue-79040.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-fn main() {
- const FOO = "hello" + 1; //~ ERROR cannot add `{integer}` to `&str`
- //~^ missing type for `const` item
- println!("{}", FOO);
-}
diff --git a/src/test/ui/typeck/issue-79040.stderr b/src/test/ui/typeck/issue-79040.stderr
deleted file mode 100644
index c820d1e08..000000000
--- a/src/test/ui/typeck/issue-79040.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0369]: cannot add `{integer}` to `&str`
- --> $DIR/issue-79040.rs:2:25
- |
-LL | const FOO = "hello" + 1;
- | ------- ^ - {integer}
- | |
- | &str
-
-error: missing type for `const` item
- --> $DIR/issue-79040.rs:2:14
- |
-LL | const FOO = "hello" + 1;
- | ^ help: provide a type for the item: `: <type>`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0369`.
diff --git a/src/test/ui/typeck/issue-80207-unsized-return.rs b/src/test/ui/typeck/issue-80207-unsized-return.rs
deleted file mode 100644
index 75430da14..000000000
--- a/src/test/ui/typeck/issue-80207-unsized-return.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// check-pass
-
-trait Foo {
- fn do_stuff() -> Self;
-}
-
-trait Bar {
- type Output;
-}
-
-impl<T> Foo for dyn Bar<Output = T>
-where
- Self: Sized,
-{
- fn do_stuff() -> Self {
- todo!()
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-80779.rs b/src/test/ui/typeck/issue-80779.rs
deleted file mode 100644
index 1624f6b77..000000000
--- a/src/test/ui/typeck/issue-80779.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Regression test for #80779.
-
-pub struct T<'a>(&'a str);
-
-pub fn f<'a>(val: T<'a>) -> _ {
- //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for return types
- g(val)
-}
-
-pub fn g(_: T<'static>) -> _ {}
-//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for return types
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-80779.stderr b/src/test/ui/typeck/issue-80779.stderr
deleted file mode 100644
index 2261ba616..000000000
--- a/src/test/ui/typeck/issue-80779.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/issue-80779.rs:10:28
- |
-LL | pub fn g(_: T<'static>) -> _ {}
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct return type: `()`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/issue-80779.rs:5:29
- |
-LL | pub fn f<'a>(val: T<'a>) -> _ {
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct return type: `()`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-81293.rs b/src/test/ui/typeck/issue-81293.rs
deleted file mode 100644
index 076b8c944..000000000
--- a/src/test/ui/typeck/issue-81293.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn main() {
- let a: u16;
- let b: u16 = 42;
- let c: usize = 5;
-
- a = c + b * 5; //~ ERROR: mismatched types [E0308]
- //~| ERROR: mismatched types [E0308]
- //~| ERROR: cannot add `u16` to `usize` [E0277]
-}
diff --git a/src/test/ui/typeck/issue-81293.stderr b/src/test/ui/typeck/issue-81293.stderr
deleted file mode 100644
index 6976be711..000000000
--- a/src/test/ui/typeck/issue-81293.stderr
+++ /dev/null
@@ -1,32 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-81293.rs:6:13
- |
-LL | a = c + b * 5;
- | ^^^^^ expected `usize`, found `u16`
-
-error[E0308]: mismatched types
- --> $DIR/issue-81293.rs:6:9
- |
-LL | let a: u16;
- | --- expected due to this type
-...
-LL | a = c + b * 5;
- | ^^^^^^^^^ expected `u16`, found `usize`
-
-error[E0277]: cannot add `u16` to `usize`
- --> $DIR/issue-81293.rs:6:11
- |
-LL | a = c + b * 5;
- | ^ no implementation for `usize + u16`
- |
- = help: the trait `Add<u16>` is not implemented for `usize`
- = help: the following other types implement trait `Add<Rhs>`:
- <&'a usize as Add<usize>>
- <&usize as Add<&usize>>
- <usize as Add<&usize>>
- <usize as Add>
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0277, E0308.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/issue-81885.rs b/src/test/ui/typeck/issue-81885.rs
deleted file mode 100644
index fb3949478..000000000
--- a/src/test/ui/typeck/issue-81885.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-const TEST4: fn() -> _ = 42;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- //~| ERROR the placeholder `_` is not allowed within types on item signatures for constant items
-
-fn main() {
- const TEST5: fn() -> _ = 42;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- //~| ERROR the placeholder `_` is not allowed within types on item signatures for constant items
-}
diff --git a/src/test/ui/typeck/issue-81885.stderr b/src/test/ui/typeck/issue-81885.stderr
deleted file mode 100644
index 91c08bd82..000000000
--- a/src/test/ui/typeck/issue-81885.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/issue-81885.rs:1:22
- |
-LL | const TEST4: fn() -> _ = 42;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items
- --> $DIR/issue-81885.rs:1:22
- |
-LL | const TEST4: fn() -> _ = 42;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/issue-81885.rs:6:26
- |
-LL | const TEST5: fn() -> _ = 42;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items
- --> $DIR/issue-81885.rs:6:26
- |
-LL | const TEST5: fn() -> _ = 42;
- | ^ not allowed in type signatures
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-81943.rs b/src/test/ui/typeck/issue-81943.rs
deleted file mode 100644
index 18f5970a3..000000000
--- a/src/test/ui/typeck/issue-81943.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:issue-81943-lib.rs
-extern crate issue_81943_lib as lib;
-
-fn f<F: Fn(i32)>(f: F) { f(0); }
-fn g(t: i32) -> i32 { t }
-fn main() {
- f(|x| lib::d!(x)); //~ERROR
- f(|x| match x { tmp => { g(tmp) } }); //~ERROR
- macro_rules! d {
- ($e:expr) => { match $e { x => { g(x) } } } //~ERROR
- }
- f(|x| d!(x));
-}
diff --git a/src/test/ui/typeck/issue-81943.stderr b/src/test/ui/typeck/issue-81943.stderr
deleted file mode 100644
index 041ff1075..000000000
--- a/src/test/ui/typeck/issue-81943.stderr
+++ /dev/null
@@ -1,51 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-81943.rs:7:9
- |
-LL | f(|x| lib::d!(x));
- | ^^^^^^^^^^ expected `()`, found `i32`
- |
- = note: this error originates in the macro `lib::d` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0308]: mismatched types
- --> $DIR/issue-81943.rs:8:28
- |
-LL | f(|x| match x { tmp => { g(tmp) } });
- | -------------------^^^^^^----
- | | |
- | | expected `()`, found `i32`
- | expected this to be `()`
- |
-help: consider using a semicolon here
- |
-LL | f(|x| match x { tmp => { g(tmp); } });
- | +
-help: consider using a semicolon here
- |
-LL | f(|x| match x { tmp => { g(tmp) } };);
- | +
-
-error[E0308]: mismatched types
- --> $DIR/issue-81943.rs:10:38
- |
-LL | ($e:expr) => { match $e { x => { g(x) } } }
- | ------------------^^^^----
- | | |
- | | expected `()`, found `i32`
- | expected this to be `()`
-LL | }
-LL | f(|x| d!(x));
- | ----- in this macro invocation
- |
- = note: this error originates in the macro `d` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider using a semicolon here
- |
-LL | ($e:expr) => { match $e { x => { g(x); } } }
- | +
-help: consider using a semicolon here
- |
-LL | ($e:expr) => { match $e { x => { g(x) } }; }
- | +
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-82772.rs b/src/test/ui/typeck/issue-82772.rs
deleted file mode 100644
index 326273bfe..000000000
--- a/src/test/ui/typeck/issue-82772.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// edition:2018
-
-fn main() {
- use a::ModPrivateStruct;
- let Box { 0: _, .. }: Box<()>; //~ ERROR field `0` of
- let Box { 1: _, .. }: Box<()>; //~ ERROR field `1` of
- let ModPrivateStruct { 1: _, .. } = ModPrivateStruct::default(); //~ ERROR field `1` of
-}
-
-mod a {
- #[derive(Default)]
- pub struct ModPrivateStruct(u8, u8);
-}
diff --git a/src/test/ui/typeck/issue-82772.stderr b/src/test/ui/typeck/issue-82772.stderr
deleted file mode 100644
index 321143cb9..000000000
--- a/src/test/ui/typeck/issue-82772.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0451]: field `0` of struct `Box` is private
- --> $DIR/issue-82772.rs:5:15
- |
-LL | let Box { 0: _, .. }: Box<()>;
- | ^^^^ private field
-
-error[E0451]: field `1` of struct `Box` is private
- --> $DIR/issue-82772.rs:6:15
- |
-LL | let Box { 1: _, .. }: Box<()>;
- | ^^^^ private field
-
-error[E0451]: field `1` of struct `ModPrivateStruct` is private
- --> $DIR/issue-82772.rs:7:28
- |
-LL | let ModPrivateStruct { 1: _, .. } = ModPrivateStruct::default();
- | ^^^^ private field
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0451`.
diff --git a/src/test/ui/typeck/issue-83621-placeholder-static-in-extern.rs b/src/test/ui/typeck/issue-83621-placeholder-static-in-extern.rs
deleted file mode 100644
index 16ec2a546..000000000
--- a/src/test/ui/typeck/issue-83621-placeholder-static-in-extern.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Regression test for #83621.
-
-extern "C" {
- static x: _; //~ ERROR: [E0121]
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-83621-placeholder-static-in-extern.stderr b/src/test/ui/typeck/issue-83621-placeholder-static-in-extern.stderr
deleted file mode 100644
index 9376e8bcf..000000000
--- a/src/test/ui/typeck/issue-83621-placeholder-static-in-extern.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/issue-83621-placeholder-static-in-extern.rs:4:15
- |
-LL | static x: _;
- | ^ not allowed in type signatures
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-83693.rs b/src/test/ui/typeck/issue-83693.rs
deleted file mode 100644
index a42558220..000000000
--- a/src/test/ui/typeck/issue-83693.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Regression test for the ICE described in #83693.
-
-#![feature(fn_traits)]
-#![crate_type="lib"]
-
-impl F {
-//~^ ERROR: cannot find type `F` in this scope [E0412]
- fn call() {
- <Self as Fn(&TestResult)>::call
- //~^ ERROR: cannot find type `TestResult` in this scope [E0412]
- //~| associated type bindings are not allowed here [E0229]
- }
-}
-
-fn call() {
- <x as Fn(&usize)>::call
- //~^ ERROR: cannot find type `x` in this scope [E0412]
- //~| ERROR: associated type bindings are not allowed here [E0229]
-}
diff --git a/src/test/ui/typeck/issue-83693.stderr b/src/test/ui/typeck/issue-83693.stderr
deleted file mode 100644
index 1e45c2d35..000000000
--- a/src/test/ui/typeck/issue-83693.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0412]: cannot find type `F` in this scope
- --> $DIR/issue-83693.rs:6:6
- |
-LL | impl F {
- | ^ help: a trait with a similar name exists: `Fn`
- |
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
-
-error[E0412]: cannot find type `TestResult` in this scope
- --> $DIR/issue-83693.rs:9:22
- |
-LL | <Self as Fn(&TestResult)>::call
- | ^^^^^^^^^^ not found in this scope
-
-error[E0412]: cannot find type `x` in this scope
- --> $DIR/issue-83693.rs:16:6
- |
-LL | <x as Fn(&usize)>::call
- | ^ not found in this scope
-
-error[E0229]: associated type bindings are not allowed here
- --> $DIR/issue-83693.rs:9:18
- |
-LL | <Self as Fn(&TestResult)>::call
- | ^^^^^^^^^^^^^^^ associated type not allowed here
-
-error[E0229]: associated type bindings are not allowed here
- --> $DIR/issue-83693.rs:16:11
- |
-LL | <x as Fn(&usize)>::call
- | ^^^^^^^^^^ associated type not allowed here
-
-error: aborting due to 5 previous errors
-
-Some errors have detailed explanations: E0229, E0412.
-For more information about an error, try `rustc --explain E0229`.
diff --git a/src/test/ui/typeck/issue-84160.rs b/src/test/ui/typeck/issue-84160.rs
deleted file mode 100644
index 7b444df85..000000000
--- a/src/test/ui/typeck/issue-84160.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn mismatched_types_with_reference(x: &u32) -> &u32 {
- if false {
- return x;
- }
- return "test";
- //~^ERROR mismatched types
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-84160.stderr b/src/test/ui/typeck/issue-84160.stderr
deleted file mode 100644
index 24c188b3f..000000000
--- a/src/test/ui/typeck/issue-84160.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-84160.rs:5:12
- |
-LL | fn mismatched_types_with_reference(x: &u32) -> &u32 {
- | ---- expected `&u32` because of return type
-...
-LL | return "test";
- | ^^^^^^ expected `u32`, found `str`
- |
- = note: expected reference `&u32`
- found reference `&'static str`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-84768.rs b/src/test/ui/typeck/issue-84768.rs
deleted file mode 100644
index ffa92823b..000000000
--- a/src/test/ui/typeck/issue-84768.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Regression test for the ICE described in #84768.
-
-#![feature(fn_traits)]
-#![crate_type="lib"]
-
-fn transform_mut<F>(f: F) where F: for<'b> FnOnce(&'b mut u8) {
- <F as FnOnce(&mut u8)>::call_once(f, 1)
- //~^ ERROR: associated type bindings are not allowed here [E0229]
- //~| ERROR: mismatched types [E0308]
-}
diff --git a/src/test/ui/typeck/issue-84768.stderr b/src/test/ui/typeck/issue-84768.stderr
deleted file mode 100644
index 04dc0e365..000000000
--- a/src/test/ui/typeck/issue-84768.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error[E0229]: associated type bindings are not allowed here
- --> $DIR/issue-84768.rs:7:11
- |
-LL | <F as FnOnce(&mut u8)>::call_once(f, 1)
- | ^^^^^^^^^^^^^^^ associated type not allowed here
-
-error[E0308]: mismatched types
- --> $DIR/issue-84768.rs:7:42
- |
-LL | <F as FnOnce(&mut u8)>::call_once(f, 1)
- | --------------------------------- ^ expected tuple, found integer
- | |
- | arguments to this function are incorrect
- |
- = note: expected tuple `(&mut u8,)`
- found type `{integer}`
-note: associated function defined here
- --> $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
- | ^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0229, E0308.
-For more information about an error, try `rustc --explain E0229`.
diff --git a/src/test/ui/typeck/issue-84831.rs b/src/test/ui/typeck/issue-84831.rs
deleted file mode 100644
index c646f7107..000000000
--- a/src/test/ui/typeck/issue-84831.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn f() {
- std::<0>; //~ ERROR expected value
-}
-fn j() {
- std::<_ as _>; //~ ERROR expected value
- //~^ ERROR expected one of `,` or `>`, found keyword `as`
-}
-
-fn main () {}
diff --git a/src/test/ui/typeck/issue-84831.stderr b/src/test/ui/typeck/issue-84831.stderr
deleted file mode 100644
index 461ccb142..000000000
--- a/src/test/ui/typeck/issue-84831.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: expected one of `,` or `>`, found keyword `as`
- --> $DIR/issue-84831.rs:5:13
- |
-LL | std::<_ as _>;
- | ^^ expected one of `,` or `>`
- |
-help: expressions must be enclosed in braces to be used as const generic arguments
- |
-LL | std::<{ _ as _ }>;
- | + +
-
-error[E0423]: expected value, found crate `std`
- --> $DIR/issue-84831.rs:2:5
- |
-LL | std::<0>;
- | ^^^^^^^^ not a value
-
-error[E0423]: expected value, found crate `std`
- --> $DIR/issue-84831.rs:5:5
- |
-LL | std::<_ as _>;
- | ^^^^^^^^^^^^^ not a value
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0423`.
diff --git a/src/test/ui/typeck/issue-86721-return-expr-ice.rev1.stderr b/src/test/ui/typeck/issue-86721-return-expr-ice.rev1.stderr
deleted file mode 100644
index b1111fcf1..000000000
--- a/src/test/ui/typeck/issue-86721-return-expr-ice.rev1.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0572]: return statement outside of function body
- --> $DIR/issue-86721-return-expr-ice.rs:9:22
- |
-LL | const U: usize = return;
- | ^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0572`.
diff --git a/src/test/ui/typeck/issue-86721-return-expr-ice.rev2.stderr b/src/test/ui/typeck/issue-86721-return-expr-ice.rev2.stderr
deleted file mode 100644
index f489ae200..000000000
--- a/src/test/ui/typeck/issue-86721-return-expr-ice.rev2.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0572]: return statement outside of function body
- --> $DIR/issue-86721-return-expr-ice.rs:15:20
- |
-LL | fn foo(a: [(); return]);
- | ^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0572`.
diff --git a/src/test/ui/typeck/issue-86721-return-expr-ice.rs b/src/test/ui/typeck/issue-86721-return-expr-ice.rs
deleted file mode 100644
index cd7135f18..000000000
--- a/src/test/ui/typeck/issue-86721-return-expr-ice.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Regression test for the ICE described in #86721.
-
-// revisions: rev1 rev2
-#![cfg_attr(any(), rev1, rev2)]
-#![crate_type="lib"]
-
-#[cfg(any(rev1))]
-trait T {
- const U: usize = return;
- //[rev1]~^ ERROR: return statement outside of function body [E0572]
-}
-
-#[cfg(any(rev2))]
-trait T2 {
- fn foo(a: [(); return]);
- //[rev2]~^ ERROR: return statement outside of function body [E0572]
-}
diff --git a/src/test/ui/typeck/issue-87181/empty-tuple-method.rs b/src/test/ui/typeck/issue-87181/empty-tuple-method.rs
deleted file mode 100644
index be68ad32a..000000000
--- a/src/test/ui/typeck/issue-87181/empty-tuple-method.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-struct Bar<T> {
- bar: T
-}
-
-struct Foo();
-impl Foo {
- fn foo(&self) { }
-}
-
-fn main() {
- let thing = Bar { bar: Foo };
- thing.bar.foo();
- //~^ ERROR no method named `foo` found for fn item `fn() -> Foo {Foo}` in the current scope [E0599]
-}
diff --git a/src/test/ui/typeck/issue-87181/empty-tuple-method.stderr b/src/test/ui/typeck/issue-87181/empty-tuple-method.stderr
deleted file mode 100644
index 23e7b7cc3..000000000
--- a/src/test/ui/typeck/issue-87181/empty-tuple-method.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0599]: no method named `foo` found for fn item `fn() -> Foo {Foo}` in the current scope
- --> $DIR/empty-tuple-method.rs:12:15
- |
-LL | thing.bar.foo();
- | ^^^ method not found in `fn() -> Foo {Foo}`
- |
-help: use parentheses to construct this tuple struct
- |
-LL | (thing.bar)().foo();
- | + +++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/issue-87181/enum-variant.rs b/src/test/ui/typeck/issue-87181/enum-variant.rs
deleted file mode 100644
index d87f99c3c..000000000
--- a/src/test/ui/typeck/issue-87181/enum-variant.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-struct Bar<T> {
- bar: T
-}
-
-enum Foo{
- Tup()
-}
-impl Foo {
- fn foo(&self) { }
-}
-
-fn main() {
- let thing = Bar { bar: Foo::Tup };
- thing.bar.foo();
- //~^ ERROR no method named `foo` found for fn item `fn() -> Foo {Foo::Tup}` in the current scope [E0599]
-}
diff --git a/src/test/ui/typeck/issue-87181/enum-variant.stderr b/src/test/ui/typeck/issue-87181/enum-variant.stderr
deleted file mode 100644
index 2247ea270..000000000
--- a/src/test/ui/typeck/issue-87181/enum-variant.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0599]: no method named `foo` found for fn item `fn() -> Foo {Foo::Tup}` in the current scope
- --> $DIR/enum-variant.rs:14:15
- |
-LL | thing.bar.foo();
- | ^^^ method not found in `fn() -> Foo {Foo::Tup}`
- |
-help: use parentheses to construct this tuple variant
- |
-LL | (thing.bar)().foo();
- | + +++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/issue-87181/tuple-field.rs b/src/test/ui/typeck/issue-87181/tuple-field.rs
deleted file mode 100644
index 00e3b460e..000000000
--- a/src/test/ui/typeck/issue-87181/tuple-field.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-struct Bar<T> {
- bar: T
-}
-
-struct Foo(char, u16);
-impl Foo {
- fn foo() { }
-}
-
-fn main() {
- let thing = Bar { bar: Foo };
- thing.bar.0;
- //~^ ERROR no field `0` on type `fn(char, u16) -> Foo {Foo}` [E0609]
-}
diff --git a/src/test/ui/typeck/issue-87181/tuple-field.stderr b/src/test/ui/typeck/issue-87181/tuple-field.stderr
deleted file mode 100644
index 0a7d30b61..000000000
--- a/src/test/ui/typeck/issue-87181/tuple-field.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0609]: no field `0` on type `fn(char, u16) -> Foo {Foo}`
- --> $DIR/tuple-field.rs:12:15
- |
-LL | thing.bar.0;
- | ^
- |
-help: use parentheses to construct this tuple struct
- |
-LL | (thing.bar)(/* char */, /* u16 */).0;
- | + ++++++++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/ui/typeck/issue-87181/tuple-method.rs b/src/test/ui/typeck/issue-87181/tuple-method.rs
deleted file mode 100644
index e88f642b0..000000000
--- a/src/test/ui/typeck/issue-87181/tuple-method.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-struct Bar<T> {
- bar: T
-}
-
-struct Foo(u8, i32);
-impl Foo {
- fn foo() { }
-}
-
-fn main() {
- let thing = Bar { bar: Foo };
- thing.bar.foo();
- //~^ ERROR no method named `foo` found for fn item `fn(u8, i32) -> Foo {Foo}` in the current scope [E0599]
-}
diff --git a/src/test/ui/typeck/issue-87181/tuple-method.stderr b/src/test/ui/typeck/issue-87181/tuple-method.stderr
deleted file mode 100644
index e27c41858..000000000
--- a/src/test/ui/typeck/issue-87181/tuple-method.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0599]: no method named `foo` found for fn item `fn(u8, i32) -> Foo {Foo}` in the current scope
- --> $DIR/tuple-method.rs:12:15
- |
-LL | thing.bar.foo();
- | ^^^ method not found in `fn(u8, i32) -> Foo {Foo}`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.rs b/src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.rs
deleted file mode 100644
index 751dc8719..000000000
--- a/src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
- let mut a;
- a = a = true; //~ ERROR mismatched types
-}
diff --git a/src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr b/src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr
deleted file mode 100644
index 56817ee2c..000000000
--- a/src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-87771-ice-assign-assign-to-bool.rs:3:9
- |
-LL | let mut a;
- | ----- expected due to the type of this binding
-LL | a = a = true;
- | ^^^^^^^^ expected `bool`, found `()`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs
deleted file mode 100644
index 326e958aa..000000000
--- a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-pub mod foo {
- pub struct Foo {
- pub you_can_use_this_field: bool,
- you_cant_use_this_field: bool,
- }
-}
-
-fn main() {
- foo::Foo {};
- //~^ ERROR cannot construct `Foo` with struct literal syntax due to private fields
-}
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr
deleted file mode 100644
index f0bd3e0dd..000000000
--- a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: cannot construct `Foo` with struct literal syntax due to private fields
- --> $DIR/issue-87872-missing-inaccessible-field-literal.rs:9:5
- |
-LL | foo::Foo {};
- | ^^^^^^^^
- |
- = note: ... and other private field `you_cant_use_this_field` that was not provided
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs
deleted file mode 100644
index d28e17559..000000000
--- a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![allow(dead_code, unused_variables)]
-
-pub mod foo {
- #[derive(Default)]
- pub struct Foo { pub visible: bool, invisible: bool, }
-}
-
-fn main() {
- let foo::Foo {} = foo::Foo::default();
- //~^ ERROR pattern does not mention field `visible` and inaccessible fields
-}
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr
deleted file mode 100644
index dc3097510..000000000
--- a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0027]: pattern does not mention field `visible` and inaccessible fields
- --> $DIR/issue-87872-missing-inaccessible-field-pattern.rs:9:9
- |
-LL | let foo::Foo {} = foo::Foo::default();
- | ^^^^^^^^^^^ missing field `visible` and inaccessible fields
- |
-help: include the missing field in the pattern and ignore the inaccessible fields
- |
-LL | let foo::Foo { visible, .. } = foo::Foo::default();
- | ~~~~~~~~~~~~~~~
-help: if you don't care about this missing field, you can explicitly ignore it
- |
-LL | let foo::Foo { .. } = foo::Foo::default();
- | ~~~~~~
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0027`.
diff --git a/src/test/ui/typeck/issue-87935-unsized-box-expr.rs b/src/test/ui/typeck/issue-87935-unsized-box-expr.rs
deleted file mode 100644
index cd2a82074..000000000
--- a/src/test/ui/typeck/issue-87935-unsized-box-expr.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![feature(box_syntax)]
-// Box expression needs to be movable, and hence has to be of a Sized type.
-fn main() {
- let _x: Box<[u32]> = box { loop {} };
- //~^ ERROR: the size for values of type `[u32]` cannot be known at compilation time
-
- // Check that a deduced size does not cause issues.
- let _y: Box<[u32]> = box [];
- let _z: Box<[u32; 0]> = box { loop {} };
-}
diff --git a/src/test/ui/typeck/issue-87935-unsized-box-expr.stderr b/src/test/ui/typeck/issue-87935-unsized-box-expr.stderr
deleted file mode 100644
index 9ff822352..000000000
--- a/src/test/ui/typeck/issue-87935-unsized-box-expr.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0277]: the size for values of type `[u32]` cannot be known at compilation time
- --> $DIR/issue-87935-unsized-box-expr.rs:4:30
- |
-LL | let _x: Box<[u32]> = box { loop {} };
- | ^^^^^^^^^^^ doesn't have a size known at compile-time
- |
- = help: the trait `Sized` is not implemented for `[u32]`
- = note: the type of a box expression must have a statically known size
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/issue-88609.rs b/src/test/ui/typeck/issue-88609.rs
deleted file mode 100644
index dc459c885..000000000
--- a/src/test/ui/typeck/issue-88609.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Regression test for #88609:
-// The return type for `main` is not normalized while checking if it implements
-// the trait `std::process::Termination`.
-
-// build-pass
-
-trait Same {
- type Output;
-}
-
-impl<T> Same for T {
- type Output = T;
-}
-
-type Unit = <() as Same>::Output;
-
-fn main() -> Result<Unit, std::io::Error> {
- unimplemented!()
-}
diff --git a/src/test/ui/typeck/issue-88643.rs b/src/test/ui/typeck/issue-88643.rs
deleted file mode 100644
index 4435cba02..000000000
--- a/src/test/ui/typeck/issue-88643.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Regression test for the ICE described in #88643. Specifically:
-// https://github.com/rust-lang/rust/issues/88643#issuecomment-913128893
-// and https://github.com/rust-lang/rust/issues/88643#issuecomment-913171935
-// and https://github.com/rust-lang/rust/issues/88643#issuecomment-913765984
-
-use std::collections::HashMap;
-
-pub trait T {}
-
-static CALLBACKS: HashMap<*const dyn T, dyn FnMut(&mut _) + 'static> = HashMap::new();
-//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]
-
-static CALLBACKS2: Vec<dyn Fn(& _)> = Vec::new();
-//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]
-
-static CALLBACKS3: Option<dyn Fn(& _)> = None;
-//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static items [E0121]
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-88643.stderr b/src/test/ui/typeck/issue-88643.stderr
deleted file mode 100644
index d5d596b6f..000000000
--- a/src/test/ui/typeck/issue-88643.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static items
- --> $DIR/issue-88643.rs:10:56
- |
-LL | static CALLBACKS: HashMap<*const dyn T, dyn FnMut(&mut _) + 'static> = HashMap::new();
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static items
- --> $DIR/issue-88643.rs:13:33
- |
-LL | static CALLBACKS2: Vec<dyn Fn(& _)> = Vec::new();
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static items
- --> $DIR/issue-88643.rs:16:36
- |
-LL | static CALLBACKS3: Option<dyn Fn(& _)> = None;
- | ^ not allowed in type signatures
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-88803-call-expr-method.fixed b/src/test/ui/typeck/issue-88803-call-expr-method.fixed
deleted file mode 100644
index 19b96ecf3..000000000
--- a/src/test/ui/typeck/issue-88803-call-expr-method.fixed
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-
-fn main() {
- let a = Some(42);
- println!(
- "The value is {}.",
- a.unwrap() //~ERROR [E0615]
- );
-}
diff --git a/src/test/ui/typeck/issue-88803-call-expr-method.rs b/src/test/ui/typeck/issue-88803-call-expr-method.rs
deleted file mode 100644
index a06199466..000000000
--- a/src/test/ui/typeck/issue-88803-call-expr-method.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-
-fn main() {
- let a = Some(42);
- println!(
- "The value is {}.",
- (a.unwrap)() //~ERROR [E0615]
- );
-}
diff --git a/src/test/ui/typeck/issue-88803-call-expr-method.stderr b/src/test/ui/typeck/issue-88803-call-expr-method.stderr
deleted file mode 100644
index 645c04b87..000000000
--- a/src/test/ui/typeck/issue-88803-call-expr-method.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0615]: attempted to take value of method `unwrap` on type `Option<{integer}>`
- --> $DIR/issue-88803-call-expr-method.rs:7:12
- |
-LL | (a.unwrap)()
- | ^^^^^^ method, not a field
- |
-help: remove wrapping parentheses to call the method
- |
-LL - (a.unwrap)()
-LL + a.unwrap()
- |
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0615`.
diff --git a/src/test/ui/typeck/issue-88844.rs b/src/test/ui/typeck/issue-88844.rs
deleted file mode 100644
index 116c75aab..000000000
--- a/src/test/ui/typeck/issue-88844.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Regression test for #88844.
-
-struct Struct { value: i32 }
-//~^ NOTE: similarly named struct `Struct` defined here
-
-impl Stuct {
-//~^ ERROR: cannot find type `Stuct` in this scope [E0412]
-//~| HELP: a struct with a similar name exists
- fn new() -> Self {
- Self { value: 42 }
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-88844.stderr b/src/test/ui/typeck/issue-88844.stderr
deleted file mode 100644
index 90bba90be..000000000
--- a/src/test/ui/typeck/issue-88844.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0412]: cannot find type `Stuct` in this scope
- --> $DIR/issue-88844.rs:6:6
- |
-LL | struct Struct { value: i32 }
- | ------------- similarly named struct `Struct` defined here
-...
-LL | impl Stuct {
- | ^^^^^ help: a struct with a similar name exists: `Struct`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed b/src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed
deleted file mode 100644
index 0a3086a34..000000000
--- a/src/test/ui/typeck/issue-89044-wrapped-expr-method.fixed
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-
-fn main() {
- let a = Some(42);
- println!(
- "The value is {}.",
- (a.unwrap()) //~ERROR [E0615]
- );
-}
diff --git a/src/test/ui/typeck/issue-89044-wrapped-expr-method.rs b/src/test/ui/typeck/issue-89044-wrapped-expr-method.rs
deleted file mode 100644
index 83617e035..000000000
--- a/src/test/ui/typeck/issue-89044-wrapped-expr-method.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-
-fn main() {
- let a = Some(42);
- println!(
- "The value is {}.",
- (a.unwrap) //~ERROR [E0615]
- );
-}
diff --git a/src/test/ui/typeck/issue-89044-wrapped-expr-method.stderr b/src/test/ui/typeck/issue-89044-wrapped-expr-method.stderr
deleted file mode 100644
index 6fa0915dc..000000000
--- a/src/test/ui/typeck/issue-89044-wrapped-expr-method.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0615]: attempted to take value of method `unwrap` on type `Option<{integer}>`
- --> $DIR/issue-89044-wrapped-expr-method.rs:7:12
- |
-LL | (a.unwrap)
- | ^^^^^^ method, not a field
- |
-help: use parentheses to call the method
- |
-LL | (a.unwrap())
- | ++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0615`.
diff --git a/src/test/ui/typeck/issue-89275.rs b/src/test/ui/typeck/issue-89275.rs
deleted file mode 100644
index b91c00175..000000000
--- a/src/test/ui/typeck/issue-89275.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-#![recursion_limit = "5"] // To reduce noise
-
-//expect mutability error when ambiguous traits are in scope
-//and not an overflow error on the span in the main function.
-
-struct Ratio<T>(T);
-
-pub trait Pow {
- fn pow(self) -> Self;
-}
-
-impl<'a, T> Pow for &'a Ratio<T>
-where
- &'a T: Pow,
-{
- fn pow(self) -> Self {
- self
- }
-}
-
-fn downcast<'a, W: ?Sized>() -> &'a W {
- todo!()
-}
-
-struct Other;
-
-fn main() {
- let other: &mut Other = downcast();//~ERROR 28:29: 28:39: mismatched types [E0308]
-}
diff --git a/src/test/ui/typeck/issue-89275.stderr b/src/test/ui/typeck/issue-89275.stderr
deleted file mode 100644
index d73e647d2..000000000
--- a/src/test/ui/typeck/issue-89275.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-89275.rs:28:29
- |
-LL | let other: &mut Other = downcast();
- | ---------- ^^^^^^^^^^ types differ in mutability
- | |
- | expected due to this
- |
- = note: expected mutable reference `&mut Other`
- found reference `&_`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-89806.rs b/src/test/ui/typeck/issue-89806.rs
deleted file mode 100644
index 69cec0865..000000000
--- a/src/test/ui/typeck/issue-89806.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- 0u8.as_ref(); //~ ERROR no method named `as_ref` found for type `u8` in the current scope
-}
diff --git a/src/test/ui/typeck/issue-89806.stderr b/src/test/ui/typeck/issue-89806.stderr
deleted file mode 100644
index c36b4967e..000000000
--- a/src/test/ui/typeck/issue-89806.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0599]: no method named `as_ref` found for type `u8` in the current scope
- --> $DIR/issue-89806.rs:2:9
- |
-LL | 0u8.as_ref();
- | ^^^^^^ method not found in `u8`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/issue-89856.rs b/src/test/ui/typeck/issue-89856.rs
deleted file mode 100644
index b021e349e..000000000
--- a/src/test/ui/typeck/issue-89856.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-fn take_str_maybe(x: Option<&str>) -> Option<&str> { None }
-
-fn main() {
- let string = String::from("Hello, world");
- let option = Some(&string);
- take_str_maybe(option);
- //~^ ERROR: mismatched types [E0308]
-}
diff --git a/src/test/ui/typeck/issue-89856.stderr b/src/test/ui/typeck/issue-89856.stderr
deleted file mode 100644
index 5fa1ae1a5..000000000
--- a/src/test/ui/typeck/issue-89856.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-89856.rs:6:20
- |
-LL | take_str_maybe(option);
- | -------------- ^^^^^^ expected `str`, found struct `String`
- | |
- | arguments to this function are incorrect
- |
- = note: expected enum `Option<&str>`
- found enum `Option<&String>`
-note: function defined here
- --> $DIR/issue-89856.rs:1:4
- |
-LL | fn take_str_maybe(x: Option<&str>) -> Option<&str> { None }
- | ^^^^^^^^^^^^^^ ---------------
-help: try converting the passed type into a `&str`
- |
-LL | take_str_maybe(option.map(|x| &**x));
- | ++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-89935.rs b/src/test/ui/typeck/issue-89935.rs
deleted file mode 100644
index 03f8f09a7..000000000
--- a/src/test/ui/typeck/issue-89935.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// check-pass
-
-trait Foo: Baz {}
-trait Bar {}
-trait Baz: Bar {
- fn bar(&self);
-}
-
-impl<T: Foo> Bar for T {}
-impl<T: Foo> Baz for T {
- fn bar(&self) {}
-}
-
-fn accept_foo(x: Box<dyn Foo>) {
- x.bar();
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-90101.rs b/src/test/ui/typeck/issue-90101.rs
deleted file mode 100644
index 1954ee6f1..000000000
--- a/src/test/ui/typeck/issue-90101.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-use std::path::{Path, PathBuf};
-
-fn func(path: impl Into<PathBuf>, code: impl Into<String>) {}
-
-fn main() {
- func(Path::new("hello").to_path_buf().to_string_lossy(), "world")
- //~^ ERROR [E0277]
-}
diff --git a/src/test/ui/typeck/issue-90101.stderr b/src/test/ui/typeck/issue-90101.stderr
deleted file mode 100644
index d2729d853..000000000
--- a/src/test/ui/typeck/issue-90101.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error[E0277]: the trait bound `PathBuf: From<Cow<'_, str>>` is not satisfied
- --> $DIR/issue-90101.rs:6:10
- |
-LL | func(Path::new("hello").to_path_buf().to_string_lossy(), "world")
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<Cow<'_, str>>` is not implemented for `PathBuf`
- | |
- | required by a bound introduced by this call
- |
- = help: the following other types implement trait `From<T>`:
- <PathBuf as From<&T>>
- <PathBuf as From<Box<Path>>>
- <PathBuf as From<Cow<'a, Path>>>
- <PathBuf as From<OsString>>
- <PathBuf as From<String>>
- = note: required for `Cow<'_, str>` to implement `Into<PathBuf>`
-note: required by a bound in `func`
- --> $DIR/issue-90101.rs:3:20
- |
-LL | fn func(path: impl Into<PathBuf>, code: impl Into<String>) {}
- | ^^^^^^^^^^^^^ required by this bound in `func`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/issue-90164.rs b/src/test/ui/typeck/issue-90164.rs
deleted file mode 100644
index 63350433e..000000000
--- a/src/test/ui/typeck/issue-90164.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn copy<R: Unpin, W>(_: R, _: W) {}
-
-fn f<T>(r: T) {
- let w = ();
- copy(r, w);
- //~^ ERROR [E0277]
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-90164.stderr b/src/test/ui/typeck/issue-90164.stderr
deleted file mode 100644
index 1e2f1bae3..000000000
--- a/src/test/ui/typeck/issue-90164.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error[E0277]: `T` cannot be unpinned
- --> $DIR/issue-90164.rs:5:10
- |
-LL | copy(r, w);
- | ---- ^ the trait `Unpin` is not implemented for `T`
- | |
- | required by a bound introduced by this call
- |
- = note: consider using `Box::pin`
-note: required by a bound in `copy`
- --> $DIR/issue-90164.rs:1:12
- |
-LL | fn copy<R: Unpin, W>(_: R, _: W) {}
- | ^^^^^ required by this bound in `copy`
-help: consider restricting type parameter `T`
- |
-LL | fn f<T: std::marker::Unpin>(r: T) {
- | ++++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/issue-90319.rs b/src/test/ui/typeck/issue-90319.rs
deleted file mode 100644
index 57e6ac7cf..000000000
--- a/src/test/ui/typeck/issue-90319.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-struct Wrapper<T>(T);
-
-trait Trait {
- fn method(&self) {}
-}
-
-impl<'a, T> Trait for Wrapper<&'a T> where Wrapper<T>: Trait {}
-
-fn get<T>() -> T {
- unimplemented!()
-}
-
-fn main() {
- let thing = get::<Thing>();//~ERROR cannot find type `Thing` in this scope [E0412]
- let wrapper = Wrapper(thing);
- Trait::method(&wrapper);
-}
diff --git a/src/test/ui/typeck/issue-90319.stderr b/src/test/ui/typeck/issue-90319.stderr
deleted file mode 100644
index 61549dd70..000000000
--- a/src/test/ui/typeck/issue-90319.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0412]: cannot find type `Thing` in this scope
- --> $DIR/issue-90319.rs:14:23
- |
-LL | let thing = get::<Thing>();
- | ^^^^^ not found in this scope
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.rs b/src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.rs
deleted file mode 100644
index 74e50d46e..000000000
--- a/src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// edition:2021
-
-mod m {
- pub struct S { foo: i32 }
- impl S {
- pub fn foo(&self) -> i32 { 42 }
- }
-}
-
-fn bar(s: &m::S) {
- || s.foo() + s.foo; //~ ERROR E0616
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr b/src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr
deleted file mode 100644
index 02cdc102c..000000000
--- a/src/test/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0616]: field `foo` of struct `S` is private
- --> $DIR/issue-90483-inaccessible-field-adjustment.rs:11:18
- |
-LL | || s.foo() + s.foo;
- | ^^^ private field
- |
-help: a method `foo` also exists, call it with parentheses
- |
-LL | || s.foo() + s.foo();
- | ++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0616`.
diff --git a/src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.rs b/src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.rs
deleted file mode 100644
index f891a42fc..000000000
--- a/src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Do not suggest referencing the parameter to `check`
-
-trait Marker<T> {}
-
-impl<T> Marker<i32> for T {}
-
-pub fn check<T: Marker<u32>>(_: T) {}
-
-pub fn main() {
- check::<()>(()); //~ ERROR [E0277]
-}
diff --git a/src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr b/src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr
deleted file mode 100644
index 08eab0253..000000000
--- a/src/test/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0277]: the trait bound `(): Marker<u32>` is not satisfied
- --> $DIR/issue-90804-incorrect-reference-suggestion.rs:10:17
- |
-LL | check::<()>(());
- | ----------- ^^ the trait `Marker<u32>` is not implemented for `()`
- | |
- | required by a bound introduced by this call
- |
-note: required by a bound in `check`
- --> $DIR/issue-90804-incorrect-reference-suggestion.rs:7:17
- |
-LL | pub fn check<T: Marker<u32>>(_: T) {}
- | ^^^^^^^^^^^ required by this bound in `check`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/issue-91210-ptr-method.fixed b/src/test/ui/typeck/issue-91210-ptr-method.fixed
deleted file mode 100644
index 94200cce7..000000000
--- a/src/test/ui/typeck/issue-91210-ptr-method.fixed
+++ /dev/null
@@ -1,15 +0,0 @@
-// Regression test for issue #91210.
-
-// run-rustfix
-
-#![allow(unused)]
-
-struct Foo { read: i32 }
-
-unsafe fn blah(x: *mut Foo) {
- (*x).read = 4;
- //~^ ERROR: attempted to take value of method
- //~| HELP: to access the field, dereference first
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-91210-ptr-method.rs b/src/test/ui/typeck/issue-91210-ptr-method.rs
deleted file mode 100644
index ed0ce6eff..000000000
--- a/src/test/ui/typeck/issue-91210-ptr-method.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Regression test for issue #91210.
-
-// run-rustfix
-
-#![allow(unused)]
-
-struct Foo { read: i32 }
-
-unsafe fn blah(x: *mut Foo) {
- x.read = 4;
- //~^ ERROR: attempted to take value of method
- //~| HELP: to access the field, dereference first
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-91210-ptr-method.stderr b/src/test/ui/typeck/issue-91210-ptr-method.stderr
deleted file mode 100644
index 7a0cfb2cf..000000000
--- a/src/test/ui/typeck/issue-91210-ptr-method.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0615]: attempted to take value of method `read` on type `*mut Foo`
- --> $DIR/issue-91210-ptr-method.rs:10:7
- |
-LL | x.read = 4;
- | ^^^^ method, not a field
- |
-help: to access the field, dereference first
- |
-LL | (*x).read = 4;
- | ++ +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0615`.
diff --git a/src/test/ui/typeck/issue-91267.rs b/src/test/ui/typeck/issue-91267.rs
deleted file mode 100644
index 4e39cfab5..000000000
--- a/src/test/ui/typeck/issue-91267.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![feature(type_ascription)]
-
-fn main() {
- type_ascribe!(0, u8<e<5>=e>)
- //~^ ERROR: cannot find type `e` in this scope [E0412]
- //~| ERROR: associated type bindings are not allowed here [E0229]
- //~| ERROR: mismatched types [E0308]
-}
diff --git a/src/test/ui/typeck/issue-91267.stderr b/src/test/ui/typeck/issue-91267.stderr
deleted file mode 100644
index 72acd9c67..000000000
--- a/src/test/ui/typeck/issue-91267.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error[E0412]: cannot find type `e` in this scope
- --> $DIR/issue-91267.rs:4:30
- |
-LL | type_ascribe!(0, u8<e<5>=e>)
- | ^ not found in this scope
-
-error[E0229]: associated type bindings are not allowed here
- --> $DIR/issue-91267.rs:4:25
- |
-LL | type_ascribe!(0, u8<e<5>=e>)
- | ^^^^^^ associated type not allowed here
-
-error[E0308]: mismatched types
- --> $DIR/issue-91267.rs:4:5
- |
-LL | fn main() {
- | - expected `()` because of default return type
-LL | type_ascribe!(0, u8<e<5>=e>)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `u8`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0229, E0308, E0412.
-For more information about an error, try `rustc --explain E0229`.
diff --git a/src/test/ui/typeck/issue-91328.fixed b/src/test/ui/typeck/issue-91328.fixed
deleted file mode 100644
index c0384399a..000000000
--- a/src/test/ui/typeck/issue-91328.fixed
+++ /dev/null
@@ -1,47 +0,0 @@
-// Regression test for issue #91328.
-
-// run-rustfix
-
-#![allow(dead_code)]
-
-fn foo(r: Result<Vec<i32>, i32>) -> i32 {
- match r.as_deref() {
- //~^ HELP: consider using `as_deref` here
- Ok([a, b]) => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn bar(o: Option<Vec<i32>>) -> i32 {
- match o.as_deref() {
- //~^ HELP: consider using `as_deref` here
- Some([a, b]) => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn baz(v: Vec<i32>) -> i32 {
- match v[..] {
- //~^ HELP: consider slicing here
- [a, b] => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn qux(a: &Option<Box<[i32; 2]>>) -> i32 {
- match a.as_deref() {
- //~^ HELP: consider using `as_deref` here
- Some([a, b]) => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-91328.rs b/src/test/ui/typeck/issue-91328.rs
deleted file mode 100644
index 63602d26f..000000000
--- a/src/test/ui/typeck/issue-91328.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-// Regression test for issue #91328.
-
-// run-rustfix
-
-#![allow(dead_code)]
-
-fn foo(r: Result<Vec<i32>, i32>) -> i32 {
- match r {
- //~^ HELP: consider using `as_deref` here
- Ok([a, b]) => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn bar(o: Option<Vec<i32>>) -> i32 {
- match o {
- //~^ HELP: consider using `as_deref` here
- Some([a, b]) => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn baz(v: Vec<i32>) -> i32 {
- match v {
- //~^ HELP: consider slicing here
- [a, b] => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn qux(a: &Option<Box<[i32; 2]>>) -> i32 {
- match a {
- //~^ HELP: consider using `as_deref` here
- Some([a, b]) => a + b,
- //~^ ERROR: expected an array or slice
- //~| NOTE: pattern cannot match with input type
- _ => 42,
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-91328.stderr b/src/test/ui/typeck/issue-91328.stderr
deleted file mode 100644
index f2f407bca..000000000
--- a/src/test/ui/typeck/issue-91328.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0529]: expected an array or slice, found `Vec<i32>`
- --> $DIR/issue-91328.rs:10:12
- |
-LL | match r {
- | - help: consider using `as_deref` here: `r.as_deref()`
-LL |
-LL | Ok([a, b]) => a + b,
- | ^^^^^^ pattern cannot match with input type `Vec<i32>`
-
-error[E0529]: expected an array or slice, found `Vec<i32>`
- --> $DIR/issue-91328.rs:20:14
- |
-LL | match o {
- | - help: consider using `as_deref` here: `o.as_deref()`
-LL |
-LL | Some([a, b]) => a + b,
- | ^^^^^^ pattern cannot match with input type `Vec<i32>`
-
-error[E0529]: expected an array or slice, found `Vec<i32>`
- --> $DIR/issue-91328.rs:30:9
- |
-LL | match v {
- | - help: consider slicing here: `v[..]`
-LL |
-LL | [a, b] => a + b,
- | ^^^^^^ pattern cannot match with input type `Vec<i32>`
-
-error[E0529]: expected an array or slice, found `Box<[i32; 2]>`
- --> $DIR/issue-91328.rs:40:14
- |
-LL | match a {
- | - help: consider using `as_deref` here: `a.as_deref()`
-LL |
-LL | Some([a, b]) => a + b,
- | ^^^^^^ pattern cannot match with input type `Box<[i32; 2]>`
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0529`.
diff --git a/src/test/ui/typeck/issue-91334.rs b/src/test/ui/typeck/issue-91334.rs
deleted file mode 100644
index bf9a5a626..000000000
--- a/src/test/ui/typeck/issue-91334.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Regression test for the ICE described in issue #91334.
-
-// error-pattern: this file contains an unclosed delimiter
-// error-pattern: expected one of
-// error-pattern: mismatched closing delimiter
-// error-pattern: mismatched types
-
-#![feature(generators)]
-
-fn f(){||yield(((){),
diff --git a/src/test/ui/typeck/issue-91334.stderr b/src/test/ui/typeck/issue-91334.stderr
deleted file mode 100644
index 8508f7a38..000000000
--- a/src/test/ui/typeck/issue-91334.stderr
+++ /dev/null
@@ -1,50 +0,0 @@
-error: this file contains an unclosed delimiter
- --> $DIR/issue-91334.rs:10:23
- |
-LL | fn f(){||yield(((){),
- | - - ^
- | | |
- | | unclosed delimiter
- | unclosed delimiter
-
-error: this file contains an unclosed delimiter
- --> $DIR/issue-91334.rs:10:23
- |
-LL | fn f(){||yield(((){),
- | - - ^
- | | |
- | | unclosed delimiter
- | unclosed delimiter
-
-error: expected one of `)`, `,`, `.`, `?`, or an operator, found `{`
- --> $DIR/issue-91334.rs:10:19
- |
-LL | fn f(){||yield(((){),
- | ^
- | |
- | expected one of `)`, `,`, `.`, `?`, or an operator
- | help: missing `,`
-
-error: mismatched closing delimiter: `)`
- --> $DIR/issue-91334.rs:10:19
- |
-LL | fn f(){||yield(((){),
- | - ^^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error[E0308]: mismatched types
- --> $DIR/issue-91334.rs:10:8
- |
-LL | fn f(){||yield(((){),
- | -^^^^^^^^^^^^^^^ expected `()`, found generator
- | |
- | help: a return type might be missing here: `-> _`
- |
- = note: expected unit type `()`
- found generator `[generator@$DIR/issue-91334.rs:10:8: 10:10]`
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/issue-91450-inner-ty-error.rs b/src/test/ui/typeck/issue-91450-inner-ty-error.rs
deleted file mode 100644
index 3c7c990d4..000000000
--- a/src/test/ui/typeck/issue-91450-inner-ty-error.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Regression test for #91450.
-// This test ensures that the compiler does not suggest `Foo<[type error]>` in diagnostic messages.
-
-fn foo() -> Option<_> {} //~ ERROR: [E0308]
-//~^ ERROR: the placeholder `_` is not allowed
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-91450-inner-ty-error.stderr b/src/test/ui/typeck/issue-91450-inner-ty-error.stderr
deleted file mode 100644
index 32f4c8f6f..000000000
--- a/src/test/ui/typeck/issue-91450-inner-ty-error.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-91450-inner-ty-error.rs:4:13
- |
-LL | fn foo() -> Option<_> {}
- | --- ^^^^^^^^^ expected enum `Option`, found `()`
- | |
- | implicitly returns `()` as its body has no tail or `return` expression
- |
- = note: expected enum `Option<_>`
- found unit type `()`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/issue-91450-inner-ty-error.rs:4:20
- |
-LL | fn foo() -> Option<_> {}
- | ^ not allowed in type signatures
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0121, E0308.
-For more information about an error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-91633.rs b/src/test/ui/typeck/issue-91633.rs
deleted file mode 100644
index 331a798dd..000000000
--- a/src/test/ui/typeck/issue-91633.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// check-pass
-fn f<T> (it: &[T])
-where
- [T] : std::ops::Index<usize>,
-{
- let _ = &it[0];
-}
-fn main(){}
diff --git a/src/test/ui/typeck/issue-93486.rs b/src/test/ui/typeck/issue-93486.rs
deleted file mode 100644
index f8f98d5c1..000000000
--- a/src/test/ui/typeck/issue-93486.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-fn main() {
- while let 1 = 1 {
- vec![].last_mut().unwrap() = 3_u8;
- //~^ ERROR invalid left-hand side of assignment
- }
-}
diff --git a/src/test/ui/typeck/issue-93486.stderr b/src/test/ui/typeck/issue-93486.stderr
deleted file mode 100644
index 167edc894..000000000
--- a/src/test/ui/typeck/issue-93486.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/issue-93486.rs:3:36
- |
-LL | vec![].last_mut().unwrap() = 3_u8;
- | -------------------------- ^
- | |
- | cannot assign to this expression
- |
-help: consider dereferencing here to assign to the mutably borrowed value
- |
-LL | *vec![].last_mut().unwrap() = 3_u8;
- | +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0070`.
diff --git a/src/test/ui/typeck/issue-96738.rs b/src/test/ui/typeck/issue-96738.rs
deleted file mode 100644
index ce2556f86..000000000
--- a/src/test/ui/typeck/issue-96738.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
- Some.nonexistent_method(); //~ ERROR: no method named `nonexistent_method` found
- Some.nonexistent_field; //~ ERROR: no field `nonexistent_field`
-}
diff --git a/src/test/ui/typeck/issue-96738.stderr b/src/test/ui/typeck/issue-96738.stderr
deleted file mode 100644
index 0d4d87ef4..000000000
--- a/src/test/ui/typeck/issue-96738.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0599]: no method named `nonexistent_method` found for fn item `fn(_) -> Option<_> {Option::<_>::Some}` in the current scope
- --> $DIR/issue-96738.rs:2:10
- |
-LL | Some.nonexistent_method();
- | ^^^^^^^^^^^^^^^^^^ method not found in `fn(_) -> Option<_> {Option::<_>::Some}`
-
-error[E0609]: no field `nonexistent_field` on type `fn(_) -> Option<_> {Option::<_>::Some}`
- --> $DIR/issue-96738.rs:3:10
- |
-LL | Some.nonexistent_field;
- | ^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0599, E0609.
-For more information about an error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/issue-98260.rs b/src/test/ui/typeck/issue-98260.rs
deleted file mode 100644
index cf48294e1..000000000
--- a/src/test/ui/typeck/issue-98260.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn main() {}
-trait A {
- fn a(aa: B) -> Result<_, B> {
- //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for return types [E0121]
- Ok(())
- }
-}
-
-enum B {}
diff --git a/src/test/ui/typeck/issue-98260.stderr b/src/test/ui/typeck/issue-98260.stderr
deleted file mode 100644
index 08a1d17e2..000000000
--- a/src/test/ui/typeck/issue-98260.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/issue-98260.rs:3:27
- |
-LL | fn a(aa: B) -> Result<_, B> {
- | -------^----
- | | |
- | | not allowed in type signatures
- | help: replace with the correct return type: `Result<(), B>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/issue-98982.rs b/src/test/ui/typeck/issue-98982.rs
deleted file mode 100644
index 2553824bb..000000000
--- a/src/test/ui/typeck/issue-98982.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-fn foo() -> i32 {
- for i in 0..0 {
- //~^ ERROR: mismatched types [E0308]
- return i;
- }
- //~| help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/issue-98982.stderr b/src/test/ui/typeck/issue-98982.stderr
deleted file mode 100644
index 3c9806ac9..000000000
--- a/src/test/ui/typeck/issue-98982.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-98982.rs:2:5
- |
-LL | fn foo() -> i32 {
- | --- expected `i32` because of return type
-LL | / for i in 0..0 {
-LL | |
-LL | | return i;
-LL | | }
- | |_____^ expected `i32`, found `()`
- |
-note: the function expects a value to always be returned, but loops might run zero times
- --> $DIR/issue-98982.rs:2:5
- |
-LL | for i in 0..0 {
- | ^^^^^^^^^^^^^ this might have zero elements to iterate on
-LL |
-LL | return i;
- | -------- if the loop doesn't execute, this value would never get returned
- = help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/missing-private-fields-in-struct-literal.rs b/src/test/ui/typeck/missing-private-fields-in-struct-literal.rs
deleted file mode 100644
index 9f1560bfb..000000000
--- a/src/test/ui/typeck/missing-private-fields-in-struct-literal.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-pub mod m {
- pub struct S {
- pub visible: bool,
- a: (),
- b: (),
- c: (),
- d: (),
- e: (),
- }
-}
-
-fn main() {
- let _ = m::S { //~ ERROR cannot construct `S` with struct literal syntax due to private fields
- visible: true,
- a: (),
- b: (),
- };
-}
diff --git a/src/test/ui/typeck/missing-private-fields-in-struct-literal.stderr b/src/test/ui/typeck/missing-private-fields-in-struct-literal.stderr
deleted file mode 100644
index 234110f31..000000000
--- a/src/test/ui/typeck/missing-private-fields-in-struct-literal.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error: cannot construct `S` with struct literal syntax due to private fields
- --> $DIR/missing-private-fields-in-struct-literal.rs:13:13
- |
-LL | let _ = m::S {
- | ^^^^
-LL | visible: true,
-LL | a: (),
- | ----- private field
-LL | b: (),
- | ----- private field
- |
- = note: ... and other private fields `c`, `d` and `e` that were not provided
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/typeck/no-type-for-node-ice.rs b/src/test/ui/typeck/no-type-for-node-ice.rs
deleted file mode 100644
index d0cfdbf50..000000000
--- a/src/test/ui/typeck/no-type-for-node-ice.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// Related issues: #20401, #20506, #20614, #20752, #20829, #20846, #20885, #20886
-
-fn main() {
- "".homura[""]; //~ no field `homura` on type `&'static str`
-}
diff --git a/src/test/ui/typeck/no-type-for-node-ice.stderr b/src/test/ui/typeck/no-type-for-node-ice.stderr
deleted file mode 100644
index b50241fb1..000000000
--- a/src/test/ui/typeck/no-type-for-node-ice.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0609]: no field `homura` on type `&'static str`
- --> $DIR/no-type-for-node-ice.rs:4:8
- |
-LL | "".homura[""];
- | ^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0609`.
diff --git a/src/test/ui/typeck/path-to-method-sugg-unresolved-expr.rs b/src/test/ui/typeck/path-to-method-sugg-unresolved-expr.rs
deleted file mode 100644
index fb56b3944..000000000
--- a/src/test/ui/typeck/path-to-method-sugg-unresolved-expr.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
- let page_size = page_size::get();
- //~^ ERROR failed to resolve: use of undeclared crate or module `page_size`
-}
diff --git a/src/test/ui/typeck/path-to-method-sugg-unresolved-expr.stderr b/src/test/ui/typeck/path-to-method-sugg-unresolved-expr.stderr
deleted file mode 100644
index b01e30be5..000000000
--- a/src/test/ui/typeck/path-to-method-sugg-unresolved-expr.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0433]: failed to resolve: use of undeclared crate or module `page_size`
- --> $DIR/path-to-method-sugg-unresolved-expr.rs:2:21
- |
-LL | let page_size = page_size::get();
- | ^^^^^^^^^ use of undeclared crate or module `page_size`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0433`.
diff --git a/src/test/ui/typeck/point-at-type-param-in-path-expr.rs b/src/test/ui/typeck/point-at-type-param-in-path-expr.rs
deleted file mode 100644
index 9a21536f9..000000000
--- a/src/test/ui/typeck/point-at-type-param-in-path-expr.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-fn foo<T: std::fmt::Display>() {}
-
-fn main() {
- let x = foo::<()>;
- //~^ ERROR `()` doesn't implement `std::fmt::Display`
-}
diff --git a/src/test/ui/typeck/point-at-type-param-in-path-expr.stderr b/src/test/ui/typeck/point-at-type-param-in-path-expr.stderr
deleted file mode 100644
index 1feaa0508..000000000
--- a/src/test/ui/typeck/point-at-type-param-in-path-expr.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0277]: `()` doesn't implement `std::fmt::Display`
- --> $DIR/point-at-type-param-in-path-expr.rs:4:19
- |
-LL | let x = foo::<()>;
- | ^^ `()` cannot be formatted with the default formatter
- |
- = help: the trait `std::fmt::Display` is not implemented for `()`
- = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
-note: required by a bound in `foo`
- --> $DIR/point-at-type-param-in-path-expr.rs:1:11
- |
-LL | fn foo<T: std::fmt::Display>() {}
- | ^^^^^^^^^^^^^^^^^ required by this bound in `foo`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/point-at-type-parameter-definition.rs b/src/test/ui/typeck/point-at-type-parameter-definition.rs
deleted file mode 100644
index 856c0db08..000000000
--- a/src/test/ui/typeck/point-at-type-parameter-definition.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-trait Trait {
- fn do_stuff(&self);
-}
-
-struct Hello;
-
-impl Hello {
- fn method(&self) {}
-}
-
-impl<Hello> Trait for Vec<Hello> {
- fn do_stuff(&self) {
- self[0].method(); //~ ERROR no method named `method` found for type parameter `Hello` in the current scope
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/point-at-type-parameter-definition.stderr b/src/test/ui/typeck/point-at-type-parameter-definition.stderr
deleted file mode 100644
index 8a6ab6110..000000000
--- a/src/test/ui/typeck/point-at-type-parameter-definition.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0599]: no method named `method` found for type parameter `Hello` in the current scope
- --> $DIR/point-at-type-parameter-definition.rs:13:17
- |
-LL | impl<Hello> Trait for Vec<Hello> {
- | ----- method `method` not found for this type parameter
-LL | fn do_stuff(&self) {
-LL | self[0].method();
- | ^^^^^^ method not found in `Hello`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/typeck/prim-with-args.fixed b/src/test/ui/typeck/prim-with-args.fixed
deleted file mode 100644
index e3f99479a..000000000
--- a/src/test/ui/typeck/prim-with-args.fixed
+++ /dev/null
@@ -1,28 +0,0 @@
-// run-rustfix
-fn main() {
-
-let _x: isize; //~ ERROR type arguments are not allowed on builtin type
-let _x: i8; //~ ERROR type arguments are not allowed on builtin type
-let _x: i16; //~ ERROR type arguments are not allowed on builtin type
-let _x: i32; //~ ERROR type arguments are not allowed on builtin type
-let _x: i64; //~ ERROR type arguments are not allowed on builtin type
-let _x: usize; //~ ERROR type arguments are not allowed on builtin type
-let _x: u8; //~ ERROR type arguments are not allowed on builtin type
-let _x: u16; //~ ERROR type arguments are not allowed on builtin type
-let _x: u32; //~ ERROR type arguments are not allowed on builtin type
-let _x: u64; //~ ERROR type arguments are not allowed on builtin type
-let _x: char; //~ ERROR type arguments are not allowed on builtin type
-
-let _x: isize; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i8; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i16; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i32; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i64; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: usize; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u8; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u16; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u32; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u64; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: char; //~ ERROR lifetime arguments are not allowed on builtin type
-
-}
diff --git a/src/test/ui/typeck/prim-with-args.rs b/src/test/ui/typeck/prim-with-args.rs
deleted file mode 100644
index b10471ecc..000000000
--- a/src/test/ui/typeck/prim-with-args.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// run-rustfix
-fn main() {
-
-let _x: isize<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: i8<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: i16<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: i32<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: i64<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: usize<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: u8<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: u16<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: u32<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: u64<isize>; //~ ERROR type arguments are not allowed on builtin type
-let _x: char<isize>; //~ ERROR type arguments are not allowed on builtin type
-
-let _x: isize<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i8<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i16<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i32<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: i64<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: usize<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u8<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u16<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u32<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: u64<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-let _x: char<'static>; //~ ERROR lifetime arguments are not allowed on builtin type
-
-}
diff --git a/src/test/ui/typeck/prim-with-args.stderr b/src/test/ui/typeck/prim-with-args.stderr
deleted file mode 100644
index 2ddad5ad7..000000000
--- a/src/test/ui/typeck/prim-with-args.stderr
+++ /dev/null
@@ -1,311 +0,0 @@
-error[E0109]: type arguments are not allowed on builtin type `isize`
- --> $DIR/prim-with-args.rs:4:15
- |
-LL | let _x: isize<isize>;
- | ----- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `isize`
- |
-help: primitive type `isize` doesn't have generic parameters
- |
-LL - let _x: isize<isize>;
-LL + let _x: isize;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `i8`
- --> $DIR/prim-with-args.rs:5:12
- |
-LL | let _x: i8<isize>;
- | -- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `i8`
- |
-help: primitive type `i8` doesn't have generic parameters
- |
-LL - let _x: i8<isize>;
-LL + let _x: i8;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `i16`
- --> $DIR/prim-with-args.rs:6:13
- |
-LL | let _x: i16<isize>;
- | --- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `i16`
- |
-help: primitive type `i16` doesn't have generic parameters
- |
-LL - let _x: i16<isize>;
-LL + let _x: i16;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `i32`
- --> $DIR/prim-with-args.rs:7:13
- |
-LL | let _x: i32<isize>;
- | --- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `i32`
- |
-help: primitive type `i32` doesn't have generic parameters
- |
-LL - let _x: i32<isize>;
-LL + let _x: i32;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `i64`
- --> $DIR/prim-with-args.rs:8:13
- |
-LL | let _x: i64<isize>;
- | --- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `i64`
- |
-help: primitive type `i64` doesn't have generic parameters
- |
-LL - let _x: i64<isize>;
-LL + let _x: i64;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `usize`
- --> $DIR/prim-with-args.rs:9:15
- |
-LL | let _x: usize<isize>;
- | ----- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `usize`
- |
-help: primitive type `usize` doesn't have generic parameters
- |
-LL - let _x: usize<isize>;
-LL + let _x: usize;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `u8`
- --> $DIR/prim-with-args.rs:10:12
- |
-LL | let _x: u8<isize>;
- | -- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `u8`
- |
-help: primitive type `u8` doesn't have generic parameters
- |
-LL - let _x: u8<isize>;
-LL + let _x: u8;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `u16`
- --> $DIR/prim-with-args.rs:11:13
- |
-LL | let _x: u16<isize>;
- | --- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `u16`
- |
-help: primitive type `u16` doesn't have generic parameters
- |
-LL - let _x: u16<isize>;
-LL + let _x: u16;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `u32`
- --> $DIR/prim-with-args.rs:12:13
- |
-LL | let _x: u32<isize>;
- | --- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `u32`
- |
-help: primitive type `u32` doesn't have generic parameters
- |
-LL - let _x: u32<isize>;
-LL + let _x: u32;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `u64`
- --> $DIR/prim-with-args.rs:13:13
- |
-LL | let _x: u64<isize>;
- | --- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `u64`
- |
-help: primitive type `u64` doesn't have generic parameters
- |
-LL - let _x: u64<isize>;
-LL + let _x: u64;
- |
-
-error[E0109]: type arguments are not allowed on builtin type `char`
- --> $DIR/prim-with-args.rs:14:14
- |
-LL | let _x: char<isize>;
- | ---- ^^^^^ type argument not allowed
- | |
- | not allowed on builtin type `char`
- |
-help: primitive type `char` doesn't have generic parameters
- |
-LL - let _x: char<isize>;
-LL + let _x: char;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `isize`
- --> $DIR/prim-with-args.rs:16:15
- |
-LL | let _x: isize<'static>;
- | ----- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `isize`
- |
-help: primitive type `isize` doesn't have generic parameters
- |
-LL - let _x: isize<'static>;
-LL + let _x: isize;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `i8`
- --> $DIR/prim-with-args.rs:17:12
- |
-LL | let _x: i8<'static>;
- | -- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `i8`
- |
-help: primitive type `i8` doesn't have generic parameters
- |
-LL - let _x: i8<'static>;
-LL + let _x: i8;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `i16`
- --> $DIR/prim-with-args.rs:18:13
- |
-LL | let _x: i16<'static>;
- | --- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `i16`
- |
-help: primitive type `i16` doesn't have generic parameters
- |
-LL - let _x: i16<'static>;
-LL + let _x: i16;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `i32`
- --> $DIR/prim-with-args.rs:19:13
- |
-LL | let _x: i32<'static>;
- | --- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `i32`
- |
-help: primitive type `i32` doesn't have generic parameters
- |
-LL - let _x: i32<'static>;
-LL + let _x: i32;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `i64`
- --> $DIR/prim-with-args.rs:20:13
- |
-LL | let _x: i64<'static>;
- | --- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `i64`
- |
-help: primitive type `i64` doesn't have generic parameters
- |
-LL - let _x: i64<'static>;
-LL + let _x: i64;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `usize`
- --> $DIR/prim-with-args.rs:21:15
- |
-LL | let _x: usize<'static>;
- | ----- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `usize`
- |
-help: primitive type `usize` doesn't have generic parameters
- |
-LL - let _x: usize<'static>;
-LL + let _x: usize;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `u8`
- --> $DIR/prim-with-args.rs:22:12
- |
-LL | let _x: u8<'static>;
- | -- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `u8`
- |
-help: primitive type `u8` doesn't have generic parameters
- |
-LL - let _x: u8<'static>;
-LL + let _x: u8;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `u16`
- --> $DIR/prim-with-args.rs:23:13
- |
-LL | let _x: u16<'static>;
- | --- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `u16`
- |
-help: primitive type `u16` doesn't have generic parameters
- |
-LL - let _x: u16<'static>;
-LL + let _x: u16;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `u32`
- --> $DIR/prim-with-args.rs:24:13
- |
-LL | let _x: u32<'static>;
- | --- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `u32`
- |
-help: primitive type `u32` doesn't have generic parameters
- |
-LL - let _x: u32<'static>;
-LL + let _x: u32;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `u64`
- --> $DIR/prim-with-args.rs:25:13
- |
-LL | let _x: u64<'static>;
- | --- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `u64`
- |
-help: primitive type `u64` doesn't have generic parameters
- |
-LL - let _x: u64<'static>;
-LL + let _x: u64;
- |
-
-error[E0109]: lifetime arguments are not allowed on builtin type `char`
- --> $DIR/prim-with-args.rs:26:14
- |
-LL | let _x: char<'static>;
- | ---- ^^^^^^^ lifetime argument not allowed
- | |
- | not allowed on builtin type `char`
- |
-help: primitive type `char` doesn't have generic parameters
- |
-LL - let _x: char<'static>;
-LL + let _x: char;
- |
-
-error: aborting due to 22 previous errors
-
-For more information about this error, try `rustc --explain E0109`.
diff --git a/src/test/ui/typeck/project-cache-issue-37154.rs b/src/test/ui/typeck/project-cache-issue-37154.rs
deleted file mode 100644
index b10239c22..000000000
--- a/src/test/ui/typeck/project-cache-issue-37154.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// run-pass
-
-#![allow(dead_code)]
-// Regression test for #37154: the problem here was that the cache
-// results in a false error because it was caching placeholder results
-// even after those placeholder regions had been popped.
-
-trait Foo {
- fn method(&self) {}
-}
-
-struct Wrapper<T>(T);
-
-impl<T> Foo for Wrapper<T> where for<'a> &'a T: IntoIterator<Item=&'a ()> {}
-
-fn f(x: Wrapper<Vec<()>>) {
- x.method(); // This works.
- x.method(); // error: no method named `method`
-}
-
-fn main() { }
diff --git a/src/test/ui/typeck/remove-extra-argument.fixed b/src/test/ui/typeck/remove-extra-argument.fixed
deleted file mode 100644
index a9338c76c..000000000
--- a/src/test/ui/typeck/remove-extra-argument.fixed
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-// Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())`
-fn l(_a: Vec<u8>) {}
-
-fn main() {
- l(vec![])
- //~^ ERROR this function takes 1 argument but 2 arguments were supplied
- //~| HELP remove the extra argument
-}
diff --git a/src/test/ui/typeck/remove-extra-argument.rs b/src/test/ui/typeck/remove-extra-argument.rs
deleted file mode 100644
index 659cb8b26..000000000
--- a/src/test/ui/typeck/remove-extra-argument.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-rustfix
-// Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())`
-fn l(_a: Vec<u8>) {}
-
-fn main() {
- l(vec![], vec![])
- //~^ ERROR this function takes 1 argument but 2 arguments were supplied
- //~| HELP remove the extra argument
-}
diff --git a/src/test/ui/typeck/remove-extra-argument.stderr b/src/test/ui/typeck/remove-extra-argument.stderr
deleted file mode 100644
index b734bcd4e..000000000
--- a/src/test/ui/typeck/remove-extra-argument.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0061]: this function takes 1 argument but 2 arguments were supplied
- --> $DIR/remove-extra-argument.rs:6:5
- |
-LL | l(vec![], vec![])
- | ^ ------ argument of type `Vec<_>` unexpected
- |
-note: function defined here
- --> $DIR/remove-extra-argument.rs:3:4
- |
-LL | fn l(_a: Vec<u8>) {}
- | ^ -----------
-help: remove the extra argument
- |
-LL | l(vec![])
- | ~~~~~~~~
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0061`.
diff --git a/src/test/ui/typeck/return_type_containing_closure.rs b/src/test/ui/typeck/return_type_containing_closure.rs
deleted file mode 100644
index 29624e08a..000000000
--- a/src/test/ui/typeck/return_type_containing_closure.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#[allow(unused)]
-fn foo() { //~ HELP a return type might be missing here
- vec!['a'].iter().map(|c| c)
- //~^ ERROR mismatched types [E0308]
- //~| NOTE expected `()`, found struct `Map`
- //~| NOTE expected unit type `()`
- //~| HELP consider using a semicolon here
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/return_type_containing_closure.stderr b/src/test/ui/typeck/return_type_containing_closure.stderr
deleted file mode 100644
index 101aee395..000000000
--- a/src/test/ui/typeck/return_type_containing_closure.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/return_type_containing_closure.rs:3:5
- |
-LL | vec!['a'].iter().map(|c| c)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Map`
- |
- = note: expected unit type `()`
- found struct `Map<std::slice::Iter<'_, char>, [closure@$DIR/return_type_containing_closure.rs:3:26: 3:29]>`
-help: consider using a semicolon here
- |
-LL | vec!['a'].iter().map(|c| c);
- | +
-help: a return type might be missing here
- |
-LL | fn foo() -> _ {
- | ++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/slow-lhs-suggestion.rs b/src/test/ui/typeck/slow-lhs-suggestion.rs
deleted file mode 100644
index 80dfd6835..000000000
--- a/src/test/ui/typeck/slow-lhs-suggestion.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-fn main() {
- 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- //~^ ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
- //~| ERROR invalid left-hand side of assignment
-}
diff --git a/src/test/ui/typeck/slow-lhs-suggestion.stderr b/src/test/ui/typeck/slow-lhs-suggestion.stderr
deleted file mode 100644
index c5bf795ee..000000000
--- a/src/test/ui/typeck/slow-lhs-suggestion.stderr
+++ /dev/null
@@ -1,187 +0,0 @@
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:95
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:91
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:87
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:83
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:79
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:75
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:71
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:67
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:63
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:59
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:55
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:51
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:47
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:43
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:39
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:35
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:31
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:27
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:23
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:19
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:15
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:11
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/slow-lhs-suggestion.rs:2:7
- |
-LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1;
- | - ^
- | |
- | cannot assign to this expression
-
-error: aborting due to 23 previous errors
-
-For more information about this error, try `rustc --explain E0070`.
diff --git a/src/test/ui/typeck/struct-enum-wrong-args.rs b/src/test/ui/typeck/struct-enum-wrong-args.rs
deleted file mode 100644
index 19de4d677..000000000
--- a/src/test/ui/typeck/struct-enum-wrong-args.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Regression test of #86481.
-struct Wrapper(i32);
-struct DoubleWrapper(i32, i32);
-
-fn main() {
- let _ = Some(3, 2); //~ ERROR this enum variant takes
- let _ = Ok(3, 6, 2); //~ ERROR this enum variant takes
- let _ = Ok(); //~ ERROR this enum variant takes
- let _ = Wrapper(); //~ ERROR this struct takes
- let _ = Wrapper(5, 2); //~ ERROR this struct takes
- let _ = DoubleWrapper(); //~ ERROR this struct takes
- let _ = DoubleWrapper(5); //~ ERROR this struct takes
- let _ = DoubleWrapper(5, 2, 7); //~ ERROR this struct takes
-}
diff --git a/src/test/ui/typeck/struct-enum-wrong-args.stderr b/src/test/ui/typeck/struct-enum-wrong-args.stderr
deleted file mode 100644
index ea94bcbc2..000000000
--- a/src/test/ui/typeck/struct-enum-wrong-args.stderr
+++ /dev/null
@@ -1,133 +0,0 @@
-error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
- --> $DIR/struct-enum-wrong-args.rs:6:13
- |
-LL | let _ = Some(3, 2);
- | ^^^^ - argument of type `{integer}` unexpected
- |
-note: tuple variant defined here
- --> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
-help: remove the extra argument
- |
-LL | let _ = Some(3);
- | ~~~
-
-error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied
- --> $DIR/struct-enum-wrong-args.rs:7:13
- |
-LL | let _ = Ok(3, 6, 2);
- | ^^ - - argument of type `{integer}` unexpected
- | |
- | argument of type `{integer}` unexpected
- |
-note: tuple variant defined here
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
-help: remove the extra arguments
- |
-LL | let _ = Ok(3);
- | ~~~
-
-error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
- --> $DIR/struct-enum-wrong-args.rs:8:13
- |
-LL | let _ = Ok();
- | ^^-- an argument is missing
- |
-note: tuple variant defined here
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
-help: provide the argument
- |
-LL | let _ = Ok(/* value */);
- | ~~~~~~~~~~~~~
-
-error[E0061]: this struct takes 1 argument but 0 arguments were supplied
- --> $DIR/struct-enum-wrong-args.rs:9:13
- |
-LL | let _ = Wrapper();
- | ^^^^^^^-- an argument of type `i32` is missing
- |
-note: tuple struct defined here
- --> $DIR/struct-enum-wrong-args.rs:2:8
- |
-LL | struct Wrapper(i32);
- | ^^^^^^^
-help: provide the argument
- |
-LL | let _ = Wrapper(/* i32 */);
- | ~~~~~~~~~~~
-
-error[E0061]: this struct takes 1 argument but 2 arguments were supplied
- --> $DIR/struct-enum-wrong-args.rs:10:13
- |
-LL | let _ = Wrapper(5, 2);
- | ^^^^^^^ - argument of type `{integer}` unexpected
- |
-note: tuple struct defined here
- --> $DIR/struct-enum-wrong-args.rs:2:8
- |
-LL | struct Wrapper(i32);
- | ^^^^^^^
-help: remove the extra argument
- |
-LL | let _ = Wrapper(5);
- | ~~~
-
-error[E0061]: this struct takes 2 arguments but 0 arguments were supplied
- --> $DIR/struct-enum-wrong-args.rs:11:13
- |
-LL | let _ = DoubleWrapper();
- | ^^^^^^^^^^^^^-- two arguments of type `i32` and `i32` are missing
- |
-note: tuple struct defined here
- --> $DIR/struct-enum-wrong-args.rs:3:8
- |
-LL | struct DoubleWrapper(i32, i32);
- | ^^^^^^^^^^^^^
-help: provide the arguments
- |
-LL | let _ = DoubleWrapper(/* i32 */, /* i32 */);
- | ~~~~~~~~~~~~~~~~~~~~~~
-
-error[E0061]: this struct takes 2 arguments but 1 argument was supplied
- --> $DIR/struct-enum-wrong-args.rs:12:13
- |
-LL | let _ = DoubleWrapper(5);
- | ^^^^^^^^^^^^^--- an argument of type `i32` is missing
- |
-note: tuple struct defined here
- --> $DIR/struct-enum-wrong-args.rs:3:8
- |
-LL | struct DoubleWrapper(i32, i32);
- | ^^^^^^^^^^^^^
-help: provide the argument
- |
-LL | let _ = DoubleWrapper(5, /* i32 */);
- | ~~~~~~~~~~~~~~
-
-error[E0061]: this struct takes 2 arguments but 3 arguments were supplied
- --> $DIR/struct-enum-wrong-args.rs:13:13
- |
-LL | let _ = DoubleWrapper(5, 2, 7);
- | ^^^^^^^^^^^^^ - argument of type `{integer}` unexpected
- |
-note: tuple struct defined here
- --> $DIR/struct-enum-wrong-args.rs:3:8
- |
-LL | struct DoubleWrapper(i32, i32);
- | ^^^^^^^^^^^^^
-help: remove the extra argument
- |
-LL | let _ = DoubleWrapper(5, 2);
- | ~~~~~~
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0061`.
diff --git a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed b/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed
deleted file mode 100644
index ba83e7900..000000000
--- a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed
+++ /dev/null
@@ -1,11 +0,0 @@
-// run-rustfix
-
-fn main() {
- 2.0e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.0E1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.0f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.0f64; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.0e+12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.0e-12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.0e1f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
-}
diff --git a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs b/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs
deleted file mode 100644
index c102447f6..000000000
--- a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// run-rustfix
-
-fn main() {
- 2.e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.E1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.f64; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.e+12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.e-12; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
- 2.e1f32; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields
-}
diff --git a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.stderr b/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.stderr
deleted file mode 100644
index 503015f3b..000000000
--- a/src/test/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.stderr
+++ /dev/null
@@ -1,80 +0,0 @@
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/suggest-adding-missing-zero-to-floating-point-number.rs:4:7
- |
-LL | 2.e1;
- | ^^
- |
-help: if intended to be a floating point literal, consider adding a `0` after the period
- |
-LL | 2.0e1;
- | +
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/suggest-adding-missing-zero-to-floating-point-number.rs:5:7
- |
-LL | 2.E1;
- | ^^
- |
-help: if intended to be a floating point literal, consider adding a `0` after the period
- |
-LL | 2.0E1;
- | +
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/suggest-adding-missing-zero-to-floating-point-number.rs:6:7
- |
-LL | 2.f32;
- | ^^^
- |
-help: if intended to be a floating point literal, consider adding a `0` after the period
- |
-LL | 2.0f32;
- | +
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/suggest-adding-missing-zero-to-floating-point-number.rs:7:7
- |
-LL | 2.f64;
- | ^^^
- |
-help: if intended to be a floating point literal, consider adding a `0` after the period
- |
-LL | 2.0f64;
- | +
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/suggest-adding-missing-zero-to-floating-point-number.rs:8:7
- |
-LL | 2.e+12;
- | ^
- |
-help: if intended to be a floating point literal, consider adding a `0` after the period
- |
-LL | 2.0e+12;
- | +
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/suggest-adding-missing-zero-to-floating-point-number.rs:9:7
- |
-LL | 2.e-12;
- | ^
- |
-help: if intended to be a floating point literal, consider adding a `0` after the period
- |
-LL | 2.0e-12;
- | +
-
-error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
- --> $DIR/suggest-adding-missing-zero-to-floating-point-number.rs:10:7
- |
-LL | 2.e1f32;
- | ^^^^^
- |
-help: if intended to be a floating point literal, consider adding a `0` after the period
- |
-LL | 2.0e1f32;
- | +
-
-error: aborting due to 7 previous errors
-
-For more information about this error, try `rustc --explain E0610`.
diff --git a/src/test/ui/typeck/type-placeholder-fn-in-const.rs b/src/test/ui/typeck/type-placeholder-fn-in-const.rs
deleted file mode 100644
index ab2e2d8c5..000000000
--- a/src/test/ui/typeck/type-placeholder-fn-in-const.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-struct MyStruct;
-
-trait Test {
- const TEST: fn() -> _;
- //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions [E0121]
- //~| ERROR: the placeholder `_` is not allowed within types on item signatures for constants [E0121]
-}
-
-impl Test for MyStruct {
- const TEST: fn() -> _ = 42;
- //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions [E0121]
-}
-
-fn main() {}
diff --git a/src/test/ui/typeck/type-placeholder-fn-in-const.stderr b/src/test/ui/typeck/type-placeholder-fn-in-const.stderr
deleted file mode 100644
index e7b2e554a..000000000
--- a/src/test/ui/typeck/type-placeholder-fn-in-const.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/type-placeholder-fn-in-const.rs:4:25
- |
-LL | const TEST: fn() -> _;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/type-placeholder-fn-in-const.rs:4:25
- |
-LL | const TEST: fn() -> _;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/type-placeholder-fn-in-const.rs:10:25
- |
-LL | const TEST: fn() -> _ = 42;
- | ^ not allowed in type signatures
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs
deleted file mode 100644
index c463a8ad0..000000000
--- a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-fn foo1<T:Copy<U>, U>(x: T) {}
-//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
-
-trait Trait: Copy<dyn Send> {}
-//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
-
-struct MyStruct1<T: Copy<T>>;
-//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
-
-struct MyStruct2<'a, T: Copy<'a>>;
-//~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
-
-fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
-//~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
-//~| ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
-
-fn main() { }
diff --git a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr
deleted file mode 100644
index bf74dd7de..000000000
--- a/src/test/ui/typeck/typeck-builtin-bound-type-parameters.stderr
+++ /dev/null
@@ -1,87 +0,0 @@
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
- --> $DIR/typeck-builtin-bound-type-parameters.rs:1:11
- |
-LL | fn foo1<T:Copy<U>, U>(x: T) {}
- | ^^^^--- help: remove these generics
- | |
- | expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
-
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
- --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
- |
-LL | trait Trait: Copy<dyn Send> {}
- | ^^^^---------- help: remove these generics
- | |
- | expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
-
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
- --> $DIR/typeck-builtin-bound-type-parameters.rs:7:21
- |
-LL | struct MyStruct1<T: Copy<T>>;
- | ^^^^--- help: remove these generics
- | |
- | expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
-
-error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
- --> $DIR/typeck-builtin-bound-type-parameters.rs:10:25
- |
-LL | struct MyStruct2<'a, T: Copy<'a>>;
- | ^^^^---- help: remove these generics
- | |
- | expected 0 lifetime arguments
- |
-note: trait defined here, with 0 lifetime parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
-
-error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
- --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15
- |
-LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
- | ^^^^ -- help: remove this lifetime argument
- | |
- | expected 0 lifetime arguments
- |
-note: trait defined here, with 0 lifetime parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
-
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
- --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15
- |
-LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
- | ^^^^ - help: remove this generic argument
- | |
- | expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
-
-error: aborting due to 6 previous errors
-
-For more information about this error, try `rustc --explain E0107`.
diff --git a/src/test/ui/typeck/typeck-cast-pointer-to-float.rs b/src/test/ui/typeck/typeck-cast-pointer-to-float.rs
deleted file mode 100644
index 2af7a3cf2..000000000
--- a/src/test/ui/typeck/typeck-cast-pointer-to-float.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-fn main() {
- let x : i16 = 22;
- ((&x) as *const i16) as f32;
- //~^ ERROR casting `*const i16` as `f32` is invalid
-}
diff --git a/src/test/ui/typeck/typeck-cast-pointer-to-float.stderr b/src/test/ui/typeck/typeck-cast-pointer-to-float.stderr
deleted file mode 100644
index 81d968454..000000000
--- a/src/test/ui/typeck/typeck-cast-pointer-to-float.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0606]: casting `*const i16` as `f32` is invalid
- --> $DIR/typeck-cast-pointer-to-float.rs:3:5
- |
-LL | ((&x) as *const i16) as f32;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0606`.
diff --git a/src/test/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs b/src/test/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs
deleted file mode 100644
index 2530a1e96..000000000
--- a/src/test/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-pass
-
-unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () {
- func()
-}
-
-pub fn main() {
- unsafe { call_unsafe(|| {}); }
-}
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed
deleted file mode 100644
index a9107f998..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-rustfix
-// Test that we do not consider associated types to be sendable without
-// some applicable trait bound (and we don't ICE).
-#![allow(dead_code)]
-
-trait Trait {
- type AssocType;
- fn dummy(&self) { }
-}
-fn bar<T:Trait+Send>() where <T as Trait>::AssocType: Send {
- is_send::<T::AssocType>(); //~ ERROR E0277
-}
-
-fn is_send<T:Send>() {
-}
-
-fn main() { }
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.rs b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.rs
deleted file mode 100644
index bafc16577..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-rustfix
-// Test that we do not consider associated types to be sendable without
-// some applicable trait bound (and we don't ICE).
-#![allow(dead_code)]
-
-trait Trait {
- type AssocType;
- fn dummy(&self) { }
-}
-fn bar<T:Trait+Send>() {
- is_send::<T::AssocType>(); //~ ERROR E0277
-}
-
-fn is_send<T:Send>() {
-}
-
-fn main() { }
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr
deleted file mode 100644
index 468a14762..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0277]: `<T as Trait>::AssocType` cannot be sent between threads safely
- --> $DIR/typeck-default-trait-impl-assoc-type.rs:11:15
- |
-LL | is_send::<T::AssocType>();
- | ^^^^^^^^^^^^ `<T as Trait>::AssocType` cannot be sent between threads safely
- |
- = help: the trait `Send` is not implemented for `<T as Trait>::AssocType`
-note: required by a bound in `is_send`
- --> $DIR/typeck-default-trait-impl-assoc-type.rs:14:14
- |
-LL | fn is_send<T:Send>() {
- | ^^^^ required by this bound in `is_send`
-help: consider further restricting the associated type
- |
-LL | fn bar<T:Trait+Send>() where <T as Trait>::AssocType: Send {
- | +++++++++++++++++++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs
deleted file mode 100644
index cc75cd490..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// aux-build:tdticc_coherence_lib.rs
-#![allow(suspicious_auto_trait_impls)]
-
-// Test that we do not consider associated types to be sendable without
-// some applicable trait bound (and we don't ICE).
-
-#![feature(negative_impls)]
-
-extern crate tdticc_coherence_lib as lib;
-
-use lib::DefaultedTrait;
-
-struct A;
-impl DefaultedTrait for (A,) { } //~ ERROR E0117
-
-struct B;
-impl !DefaultedTrait for (B,) { } //~ ERROR E0117
-
-struct C;
-struct D<T>(T);
-impl DefaultedTrait for Box<C> { } //~ ERROR E0321
-impl DefaultedTrait for lib::Something<C> { } //~ ERROR E0117
-impl DefaultedTrait for D<C> { } // OK
-
-fn main() { }
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr
deleted file mode 100644
index fc3778b79..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr
+++ /dev/null
@@ -1,43 +0,0 @@
-error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
- --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:14:1
- |
-LL | impl DefaultedTrait for (A,) { }
- | ^^^^^^^^^^^^^^^^^^^^^^^^----
- | | |
- | | this is not defined in the current crate because tuples are always foreign
- | impl doesn't use only types from inside the current crate
- |
- = note: define and implement a trait or new type instead
-
-error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
- --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:17:1
- |
-LL | impl !DefaultedTrait for (B,) { }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^----
- | | |
- | | this is not defined in the current crate because tuples are always foreign
- | impl doesn't use only types from inside the current crate
- |
- = note: define and implement a trait or new type instead
-
-error[E0321]: cross-crate traits with a default impl, like `DefaultedTrait`, can only be implemented for a struct/enum type defined in the current crate
- --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:21:1
- |
-LL | impl DefaultedTrait for Box<C> { }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait for type in another crate
-
-error[E0117]: only traits defined in the current crate can be implemented for types defined outside of the crate
- --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:22:1
- |
-LL | impl DefaultedTrait for lib::Something<C> { }
- | ^^^^^^^^^^^^^^^^^^^^^^^^-----------------
- | | |
- | | `Something` is not defined in the current crate
- | impl doesn't use only types from inside the current crate
- |
- = note: define and implement a trait or new type instead
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0117, E0321.
-For more information about an error, try `rustc --explain E0117`.
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.rs b/src/test/ui/typeck/typeck-default-trait-impl-negation-send.rs
deleted file mode 100644
index 3a2fc39d4..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#![feature(negative_impls)]
-
-struct MySendable {
- t: *mut u8
-}
-
-unsafe impl Send for MySendable {}
-
-struct MyNotSendable {
- t: *mut u8
-}
-
-impl !Send for MyNotSendable {}
-
-fn is_send<T: Send>() {}
-
-fn main() {
- is_send::<MySendable>();
- is_send::<MyNotSendable>();
- //~^ ERROR `MyNotSendable` cannot be sent between threads safely
-}
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr
deleted file mode 100644
index 2ce32990e..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0277]: `MyNotSendable` cannot be sent between threads safely
- --> $DIR/typeck-default-trait-impl-negation-send.rs:19:15
- |
-LL | is_send::<MyNotSendable>();
- | ^^^^^^^^^^^^^ `MyNotSendable` cannot be sent between threads safely
- |
- = help: the trait `Send` is not implemented for `MyNotSendable`
-note: required by a bound in `is_send`
- --> $DIR/typeck-default-trait-impl-negation-send.rs:15:15
- |
-LL | fn is_send<T: Send>() {}
- | ^^^^ required by this bound in `is_send`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs
deleted file mode 100644
index b9042188a..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-#![feature(negative_impls)]
-
-struct Managed;
-impl !Send for Managed {}
-impl !Sync for Managed {}
-
-use std::cell::UnsafeCell;
-
-struct MySync {
- t: *mut u8
-}
-
-unsafe impl Sync for MySync {}
-
-struct MyNotSync {
- t: *mut u8
-}
-
-impl !Sync for MyNotSync {}
-
-struct MyTypeWUnsafe {
- t: UnsafeCell<u8>
-}
-
-struct MyTypeManaged {
- t: Managed
-}
-
-fn is_sync<T: Sync>() {}
-
-fn main() {
- is_sync::<MySync>();
- is_sync::<MyNotSync>();
- //~^ ERROR `MyNotSync` cannot be shared between threads safely [E0277]
-
- is_sync::<MyTypeWUnsafe>();
- //~^ ERROR `UnsafeCell<u8>` cannot be shared between threads safely [E0277]
-
- is_sync::<MyTypeManaged>();
- //~^ ERROR `Managed` cannot be shared between threads safely [E0277]
-}
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr
deleted file mode 100644
index b9fca1a1b..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr
+++ /dev/null
@@ -1,52 +0,0 @@
-error[E0277]: `MyNotSync` cannot be shared between threads safely
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:15
- |
-LL | is_sync::<MyNotSync>();
- | ^^^^^^^^^ `MyNotSync` cannot be shared between threads safely
- |
- = help: the trait `Sync` is not implemented for `MyNotSync`
-note: required by a bound in `is_sync`
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
- |
-LL | fn is_sync<T: Sync>() {}
- | ^^^^ required by this bound in `is_sync`
-
-error[E0277]: `UnsafeCell<u8>` cannot be shared between threads safely
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:15
- |
-LL | is_sync::<MyTypeWUnsafe>();
- | ^^^^^^^^^^^^^ `UnsafeCell<u8>` cannot be shared between threads safely
- |
- = help: within `MyTypeWUnsafe`, the trait `Sync` is not implemented for `UnsafeCell<u8>`
-note: required because it appears within the type `MyTypeWUnsafe`
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:21:8
- |
-LL | struct MyTypeWUnsafe {
- | ^^^^^^^^^^^^^
-note: required by a bound in `is_sync`
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
- |
-LL | fn is_sync<T: Sync>() {}
- | ^^^^ required by this bound in `is_sync`
-
-error[E0277]: `Managed` cannot be shared between threads safely
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:39:15
- |
-LL | is_sync::<MyTypeManaged>();
- | ^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely
- |
- = help: within `MyTypeManaged`, the trait `Sync` is not implemented for `Managed`
-note: required because it appears within the type `MyTypeManaged`
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:25:8
- |
-LL | struct MyTypeManaged {
- | ^^^^^^^^^^^^^
-note: required by a bound in `is_sync`
- --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
- |
-LL | fn is_sync<T: Sync>() {}
- | ^^^^ required by this bound in `is_sync`
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-send-param.rs b/src/test/ui/typeck/typeck-default-trait-impl-send-param.rs
deleted file mode 100644
index 7948cd101..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-send-param.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Test that we do not consider parameter types to be sendable without
-// an explicit trait bound.
-
-fn foo<T>() {
- is_send::<T>() //~ ERROR E0277
-}
-
-fn is_send<T:Send>() {
-}
-
-fn main() { }
diff --git a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr
deleted file mode 100644
index 887a1ddbb..000000000
--- a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0277]: `T` cannot be sent between threads safely
- --> $DIR/typeck-default-trait-impl-send-param.rs:5:15
- |
-LL | is_send::<T>()
- | ^ `T` cannot be sent between threads safely
- |
-note: required by a bound in `is_send`
- --> $DIR/typeck-default-trait-impl-send-param.rs:8:14
- |
-LL | fn is_send<T:Send>() {
- | ^^^^ required by this bound in `is_send`
-help: consider restricting type parameter `T`
- |
-LL | fn foo<T: std::marker::Send>() {
- | +++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs b/src/test/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs
deleted file mode 100644
index 1e954f569..000000000
--- a/src/test/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// run-pass
-// This tests reification from safe function to `unsafe fn` pointer
-
-fn do_nothing() -> () {}
-
-unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () {
- func()
-}
-
-pub fn main() {
- unsafe { call_unsafe(do_nothing); }
-}
diff --git a/src/test/ui/typeck/typeck-unsafe-always-share.rs b/src/test/ui/typeck/typeck-unsafe-always-share.rs
deleted file mode 100644
index be87ab172..000000000
--- a/src/test/ui/typeck/typeck-unsafe-always-share.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Verify that UnsafeCell is *always* !Sync regardless if `T` is sync.
-
-#![feature(negative_impls)]
-
-use std::cell::UnsafeCell;
-use std::marker::Sync;
-
-struct MySync<T> {
- u: UnsafeCell<T>
-}
-
-struct NoSync;
-impl !Sync for NoSync {}
-
-fn test<T: Sync>(s: T) {}
-
-fn main() {
- let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0)});
- test(us);
- //~^ ERROR `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
-
- let uns = UnsafeCell::new(NoSync);
- test(uns);
- //~^ ERROR `UnsafeCell<NoSync>` cannot be shared between threads safely [E0277]
-
- let ms = MySync{u: uns};
- test(ms);
- //~^ ERROR `UnsafeCell<NoSync>` cannot be shared between threads safely [E0277]
-
- test(NoSync);
- //~^ ERROR `NoSync` cannot be shared between threads safely [E0277]
-}
diff --git a/src/test/ui/typeck/typeck-unsafe-always-share.stderr b/src/test/ui/typeck/typeck-unsafe-always-share.stderr
deleted file mode 100644
index 154e50499..000000000
--- a/src/test/ui/typeck/typeck-unsafe-always-share.stderr
+++ /dev/null
@@ -1,68 +0,0 @@
-error[E0277]: `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
- --> $DIR/typeck-unsafe-always-share.rs:19:10
- |
-LL | test(us);
- | ---- ^^ `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
- | |
- | required by a bound introduced by this call
- |
- = help: the trait `Sync` is not implemented for `UnsafeCell<MySync<{integer}>>`
-note: required by a bound in `test`
- --> $DIR/typeck-unsafe-always-share.rs:15:12
- |
-LL | fn test<T: Sync>(s: T) {}
- | ^^^^ required by this bound in `test`
-
-error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
- --> $DIR/typeck-unsafe-always-share.rs:23:10
- |
-LL | test(uns);
- | ---- ^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
- | |
- | required by a bound introduced by this call
- |
- = help: the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
-note: required by a bound in `test`
- --> $DIR/typeck-unsafe-always-share.rs:15:12
- |
-LL | fn test<T: Sync>(s: T) {}
- | ^^^^ required by this bound in `test`
-
-error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
- --> $DIR/typeck-unsafe-always-share.rs:27:10
- |
-LL | test(ms);
- | ---- ^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
- | |
- | required by a bound introduced by this call
- |
- = help: within `MySync<NoSync>`, the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
-note: required because it appears within the type `MySync<NoSync>`
- --> $DIR/typeck-unsafe-always-share.rs:8:8
- |
-LL | struct MySync<T> {
- | ^^^^^^
-note: required by a bound in `test`
- --> $DIR/typeck-unsafe-always-share.rs:15:12
- |
-LL | fn test<T: Sync>(s: T) {}
- | ^^^^ required by this bound in `test`
-
-error[E0277]: `NoSync` cannot be shared between threads safely
- --> $DIR/typeck-unsafe-always-share.rs:30:10
- |
-LL | test(NoSync);
- | ---- ^^^^^^ `NoSync` cannot be shared between threads safely
- | |
- | required by a bound introduced by this call
- |
- = help: the trait `Sync` is not implemented for `NoSync`
-note: required by a bound in `test`
- --> $DIR/typeck-unsafe-always-share.rs:15:12
- |
-LL | fn test<T: Sync>(s: T) {}
- | ^^^^ required by this bound in `test`
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/typeck/typeck_type_placeholder_1.rs b/src/test/ui/typeck/typeck_type_placeholder_1.rs
deleted file mode 100644
index ea7aa5285..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_1.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// run-pass
-
-#![allow(dead_code)]
-// This test checks that the `_` type placeholder works
-// correctly for enabling type inference.
-
-
-struct TestStruct {
- x: *const isize
-}
-
-unsafe impl Sync for TestStruct {}
-
-static CONSTEXPR: TestStruct = TestStruct{ x: &413 };
-
-
-pub fn main() {
- let x: Vec<_> = (0..5).collect();
- let expected: &[usize] = &[0,1,2,3,4];
- assert_eq!(x, expected);
-
- let x = (0..5).collect::<Vec<_>>();
- assert_eq!(x, expected);
-
- let y: _ = "hello";
- assert_eq!(y.len(), 5);
-
- let ptr: &usize = &5;
- let ptr2 = ptr as *const _;
-
- assert_eq!(ptr as *const usize as usize, ptr2 as usize);
-}
diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.rs b/src/test/ui/typeck/typeck_type_placeholder_item.rs
deleted file mode 100644
index 22fedb22d..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_item.rs
+++ /dev/null
@@ -1,222 +0,0 @@
-// Needed for `type Y = impl Trait<_>` and `type B = _;`
-#![feature(associated_type_defaults)]
-#![feature(type_alias_impl_trait)]
-// This test checks that it is not possible to enable global type
-// inference by using the `_` type placeholder.
-
-fn test() -> _ { 5 }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
-fn test2() -> (_, _) { (5, 5) }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
-static TEST3: _ = "test";
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
-
-static TEST4: _ = 145;
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
-
-static TEST5: (_, _) = (1, 2);
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
-
-fn test6(_: _) { }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
-fn test6_b<T>(_: _, _: T) { }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
-fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
-fn test7(x: _) { let _x: usize = x; }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
-fn test8(_f: fn() -> _) { }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-//~^^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
-struct Test9;
-
-impl Test9 {
- fn test9(&self) -> _ { () }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
- fn test10(&self, _x : _) { }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-}
-
-fn test11(x: &usize) -> &_ {
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
- &x
-}
-
-unsafe fn test12(x: *const usize) -> *const *const _ {
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
- &x
-}
-
-impl Clone for Test9 {
- fn clone(&self) -> _ { Test9 }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
- fn clone_from(&mut self, other: _) { *self = Test9; }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-}
-
-struct Test10 {
- a: _,
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
- b: (_, _),
-}
-
-pub fn main() {
- static A = 42;
- //~^ ERROR missing type for `static` item
- static B: _ = 42;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
- static C: Option<_> = Some(42);
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
- fn fn_test() -> _ { 5 }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
- fn fn_test2() -> (_, _) { (5, 5) }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
- static FN_TEST3: _ = "test";
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
-
- static FN_TEST4: _ = 145;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
-
- static FN_TEST5: (_, _) = (1, 2);
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
-
- fn fn_test6(_: _) { }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
- fn fn_test7(x: _) { let _x: usize = x; }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
- fn fn_test8(_f: fn() -> _) { }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- //~^^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
- struct FnTest9;
-
- impl FnTest9 {
- fn fn_test9(&self) -> _ { () }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
- fn fn_test10(&self, _x : _) { }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- }
-
- impl Clone for FnTest9 {
- fn clone(&self) -> _ { FnTest9 }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-
- fn clone_from(&mut self, other: _) { *self = FnTest9; }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- }
-
- struct FnTest10 {
- a: _,
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
- b: (_, _),
- }
-
- fn fn_test11(_: _) -> (_, _) { panic!() }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
- //~| ERROR type annotations needed
-
- fn fn_test12(x: i32) -> (_, _) { (x, x) }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
- fn fn_test13(x: _) -> (i32, _) { (x, x) }
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-}
-
-trait T {
- fn method_test1(&self, x: _);
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- fn method_test2(&self, x: _) -> _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- fn method_test3(&self) -> _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- fn assoc_fn_test1(x: _);
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- fn assoc_fn_test2(x: _) -> _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
- fn assoc_fn_test3() -> _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-}
-
-struct BadStruct<_>(_);
-//~^ ERROR expected identifier, found reserved identifier `_`
-//~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
-trait BadTrait<_> {}
-//~^ ERROR expected identifier, found reserved identifier `_`
-impl BadTrait<_> for BadStruct<_> {}
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for implementations
-
-fn impl_trait() -> impl BadTrait<_> {
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
- unimplemented!()
-}
-
-struct BadStruct1<_, _>(_);
-//~^ ERROR expected identifier, found reserved identifier `_`
-//~| ERROR expected identifier, found reserved identifier `_`
-//~| ERROR the name `_` is already used
-//~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
-struct BadStruct2<_, T>(_, T);
-//~^ ERROR expected identifier, found reserved identifier `_`
-//~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
-
-type X = Box<_>;
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for type aliases
-
-struct Struct;
-trait Trait<T> {}
-impl Trait<usize> for Struct {}
-type Y = impl Trait<_>;
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
-fn foo() -> Y {
- Struct
-}
-
-trait Qux {
- type A;
- type B = _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
- const C: _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
- const D: _ = 42;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
- // type E: _; // FIXME: make the parser propagate the existence of `B`
- type F: std::ops::Fn(_);
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
-}
-impl Qux for Struct {
- type A = _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
- type B = _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
- const C: _;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
- //~| ERROR associated constant in `impl` without body
- const D: _ = 42;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
-}
-
-fn map<T>(_: fn() -> Option<&'static T>) -> Option<T> {
- None
-}
-
-fn value() -> Option<&'static _> {
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
- Option::<&'static u8>::None
-}
-
-const _: Option<_> = map(value);
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.stderr
deleted file mode 100644
index c57f71b80..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_item.stderr
+++ /dev/null
@@ -1,642 +0,0 @@
-error: expected identifier, found reserved identifier `_`
- --> $DIR/typeck_type_placeholder_item.rs:154:18
- |
-LL | struct BadStruct<_>(_);
- | ^ expected identifier, found reserved identifier
-
-error: expected identifier, found reserved identifier `_`
- --> $DIR/typeck_type_placeholder_item.rs:157:16
- |
-LL | trait BadTrait<_> {}
- | ^ expected identifier, found reserved identifier
-
-error: expected identifier, found reserved identifier `_`
- --> $DIR/typeck_type_placeholder_item.rs:167:19
- |
-LL | struct BadStruct1<_, _>(_);
- | ^ expected identifier, found reserved identifier
-
-error: expected identifier, found reserved identifier `_`
- --> $DIR/typeck_type_placeholder_item.rs:167:22
- |
-LL | struct BadStruct1<_, _>(_);
- | ^ expected identifier, found reserved identifier
-
-error: expected identifier, found reserved identifier `_`
- --> $DIR/typeck_type_placeholder_item.rs:172:19
- |
-LL | struct BadStruct2<_, T>(_, T);
- | ^ expected identifier, found reserved identifier
-
-error: associated constant in `impl` without body
- --> $DIR/typeck_type_placeholder_item.rs:205:5
- |
-LL | const C: _;
- | ^^^^^^^^^^-
- | |
- | help: provide a definition for the constant: `= <expr>;`
-
-error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
- --> $DIR/typeck_type_placeholder_item.rs:167:22
- |
-LL | struct BadStruct1<_, _>(_);
- | - ^ already used
- | |
- | first use of `_`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:7:14
- |
-LL | fn test() -> _ { 5 }
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct return type: `i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:10:16
- |
-LL | fn test2() -> (_, _) { (5, 5) }
- | -^--^-
- | || |
- | || not allowed in type signatures
- | |not allowed in type signatures
- | help: replace with the correct return type: `(i32, i32)`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:13:15
- |
-LL | static TEST3: _ = "test";
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `&str`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:16:15
- |
-LL | static TEST4: _ = 145;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:19:15
- |
-LL | static TEST5: (_, _) = (1, 2);
- | ^^^^^^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:22:13
- |
-LL | fn test6(_: _) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn test6<T>(_: T) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:25:18
- |
-LL | fn test6_b<T>(_: _, _: T) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn test6_b<T, U>(_: U, _: T) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:28:30
- |
-LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:31:13
- |
-LL | fn test7(x: _) { let _x: usize = x; }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn test7<T>(x: T) { let _x: usize = x; }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:34:22
- |
-LL | fn test8(_f: fn() -> _) { }
- | ^
- | |
- | not allowed in type signatures
- | help: use type parameters instead: `T`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:34:22
- |
-LL | fn test8(_f: fn() -> _) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn test8<T>(_f: fn() -> T) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:48:26
- |
-LL | fn test11(x: &usize) -> &_ {
- | -^
- | ||
- | |not allowed in type signatures
- | help: replace with the correct return type: `&'static &'static usize`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:53:52
- |
-LL | unsafe fn test12(x: *const usize) -> *const *const _ {
- | --------------^
- | | |
- | | not allowed in type signatures
- | help: replace with the correct return type: `*const *const usize`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
- --> $DIR/typeck_type_placeholder_item.rs:67:8
- |
-LL | a: _,
- | ^ not allowed in type signatures
-LL |
-LL | b: (_, _),
- | ^ ^ not allowed in type signatures
- | |
- | not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL ~ struct Test10<T> {
-LL ~ a: T,
-LL |
-LL ~ b: (T, T),
- |
-
-error: missing type for `static` item
- --> $DIR/typeck_type_placeholder_item.rs:73:13
- |
-LL | static A = 42;
- | ^ help: provide a type for the static variable: `: i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:75:15
- |
-LL | static B: _ = 42;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:77:15
- |
-LL | static C: Option<_> = Some(42);
- | ^^^^^^^^^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:79:21
- |
-LL | fn fn_test() -> _ { 5 }
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct return type: `i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:82:23
- |
-LL | fn fn_test2() -> (_, _) { (5, 5) }
- | -^--^-
- | || |
- | || not allowed in type signatures
- | |not allowed in type signatures
- | help: replace with the correct return type: `(i32, i32)`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:85:22
- |
-LL | static FN_TEST3: _ = "test";
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `&str`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:88:22
- |
-LL | static FN_TEST4: _ = 145;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
- --> $DIR/typeck_type_placeholder_item.rs:91:22
- |
-LL | static FN_TEST5: (_, _) = (1, 2);
- | ^^^^^^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:94:20
- |
-LL | fn fn_test6(_: _) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn fn_test6<T>(_: T) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:97:20
- |
-LL | fn fn_test7(x: _) { let _x: usize = x; }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn fn_test7<T>(x: T) { let _x: usize = x; }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:100:29
- |
-LL | fn fn_test8(_f: fn() -> _) { }
- | ^
- | |
- | not allowed in type signatures
- | help: use type parameters instead: `T`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:100:29
- |
-LL | fn fn_test8(_f: fn() -> _) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn fn_test8<T>(_f: fn() -> T) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
- --> $DIR/typeck_type_placeholder_item.rs:123:12
- |
-LL | a: _,
- | ^ not allowed in type signatures
-LL |
-LL | b: (_, _),
- | ^ ^ not allowed in type signatures
- | |
- | not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL ~ struct FnTest10<T> {
-LL ~ a: T,
-LL |
-LL ~ b: (T, T),
- |
-
-error[E0282]: type annotations needed
- --> $DIR/typeck_type_placeholder_item.rs:128:18
- |
-LL | fn fn_test11(_: _) -> (_, _) { panic!() }
- | ^ cannot infer type
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:128:28
- |
-LL | fn fn_test11(_: _) -> (_, _) { panic!() }
- | ^ ^ not allowed in type signatures
- | |
- | not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:132:30
- |
-LL | fn fn_test12(x: i32) -> (_, _) { (x, x) }
- | -^--^-
- | || |
- | || not allowed in type signatures
- | |not allowed in type signatures
- | help: replace with the correct return type: `(i32, i32)`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:135:33
- |
-LL | fn fn_test13(x: _) -> (i32, _) { (x, x) }
- | ------^-
- | | |
- | | not allowed in type signatures
- | help: replace with the correct return type: `(i32, i32)`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
- --> $DIR/typeck_type_placeholder_item.rs:154:21
- |
-LL | struct BadStruct<_>(_);
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | struct BadStruct<T>(T);
- | ~ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
- --> $DIR/typeck_type_placeholder_item.rs:159:15
- |
-LL | impl BadTrait<_> for BadStruct<_> {}
- | ^ ^ not allowed in type signatures
- | |
- | not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | impl<T> BadTrait<T> for BadStruct<T> {}
- | +++ ~ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
- --> $DIR/typeck_type_placeholder_item.rs:162:34
- |
-LL | fn impl_trait() -> impl BadTrait<_> {
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
- --> $DIR/typeck_type_placeholder_item.rs:167:25
- |
-LL | struct BadStruct1<_, _>(_);
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | struct BadStruct1<T, _>(T);
- | ~ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
- --> $DIR/typeck_type_placeholder_item.rs:172:25
- |
-LL | struct BadStruct2<_, T>(_, T);
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | struct BadStruct2<U, T>(U, T);
- | ~ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
- --> $DIR/typeck_type_placeholder_item.rs:176:14
- |
-LL | type X = Box<_>;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
- --> $DIR/typeck_type_placeholder_item.rs:182:21
- |
-LL | type Y = impl Trait<_>;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:216:31
- |
-LL | fn value() -> Option<&'static _> {
- | ----------------^-
- | | |
- | | not allowed in type signatures
- | help: replace with the correct return type: `Option<&'static u8>`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item.rs:221:10
- |
-LL | const _: Option<_> = map(value);
- | ^^^^^^^^^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `Option<u8>`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:140:31
- |
-LL | fn method_test1(&self, x: _);
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn method_test1<T>(&self, x: T);
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:142:31
- |
-LL | fn method_test2(&self, x: _) -> _;
- | ^ ^ not allowed in type signatures
- | |
- | not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn method_test2<T>(&self, x: T) -> T;
- | +++ ~ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:144:31
- |
-LL | fn method_test3(&self) -> _;
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn method_test3<T>(&self) -> T;
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:146:26
- |
-LL | fn assoc_fn_test1(x: _);
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn assoc_fn_test1<T>(x: T);
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:148:26
- |
-LL | fn assoc_fn_test2(x: _) -> _;
- | ^ ^ not allowed in type signatures
- | |
- | not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn assoc_fn_test2<T>(x: T) -> T;
- | +++ ~ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:150:28
- |
-LL | fn assoc_fn_test3() -> _;
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn assoc_fn_test3<T>() -> T;
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
- --> $DIR/typeck_type_placeholder_item.rs:190:14
- |
-LL | type B = _;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item.rs:192:14
- |
-LL | const C: _;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item.rs:194:14
- |
-LL | const D: _ = 42;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
- --> $DIR/typeck_type_placeholder_item.rs:197:26
- |
-LL | type F: std::ops::Fn(_);
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:41:24
- |
-LL | fn test9(&self) -> _ { () }
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct return type: `()`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:44:27
- |
-LL | fn test10(&self, _x : _) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn test10<T>(&self, _x : T) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:59:24
- |
-LL | fn clone(&self) -> _ { Test9 }
- | ^ not allowed in type signatures
- |
-help: try replacing `_` with the type in the corresponding trait method signature
- |
-LL | fn clone(&self) -> Test9 { Test9 }
- | ~~~~~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:62:37
- |
-LL | fn clone_from(&mut self, other: _) { *self = Test9; }
- | ^ not allowed in type signatures
- |
-help: try replacing `_` with the type in the corresponding trait method signature
- |
-LL | fn clone_from(&mut self, other: &Test9) { *self = Test9; }
- | ~~~~~~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item.rs:107:31
- |
-LL | fn fn_test9(&self) -> _ { () }
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct return type: `()`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:110:34
- |
-LL | fn fn_test10(&self, _x : _) { }
- | ^ not allowed in type signatures
- |
-help: use type parameters instead
- |
-LL | fn fn_test10<T>(&self, _x : T) { }
- | +++ ~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:115:28
- |
-LL | fn clone(&self) -> _ { FnTest9 }
- | ^ not allowed in type signatures
- |
-help: try replacing `_` with the type in the corresponding trait method signature
- |
-LL | fn clone(&self) -> FnTest9 { FnTest9 }
- | ~~~~~~~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item.rs:118:41
- |
-LL | fn clone_from(&mut self, other: _) { *self = FnTest9; }
- | ^ not allowed in type signatures
- |
-help: try replacing `_` with the type in the corresponding trait method signature
- |
-LL | fn clone_from(&mut self, other: &FnTest9) { *self = FnTest9; }
- | ~~~~~~~~
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
- --> $DIR/typeck_type_placeholder_item.rs:201:14
- |
-LL | type A = _;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
- --> $DIR/typeck_type_placeholder_item.rs:203:14
- |
-LL | type B = _;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item.rs:205:14
- |
-LL | const C: _;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item.rs:208:14
- |
-LL | const D: _ = 42;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `i32`
-
-error: aborting due to 69 previous errors
-
-Some errors have detailed explanations: E0121, E0282, E0403.
-For more information about an error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/typeck_type_placeholder_item_help.rs b/src/test/ui/typeck/typeck_type_placeholder_item_help.rs
deleted file mode 100644
index c459d8c3c..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_item_help.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// This test checks that it proper item type will be suggested when
-// using the `_` type placeholder.
-
-fn test1() -> _ { Some(42) }
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
-
-const TEST2: _ = 42u32;
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
-
-const TEST3: _ = Some(42);
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
-
-const TEST4: fn() -> _ = 42;
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-//~| ERROR the placeholder `_` is not allowed within types on item signatures for constant items
-
-trait Test5 {
- const TEST5: _ = 42;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
-}
-
-struct Test6;
-
-impl Test6 {
- const TEST6: _ = 13;
- //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
-}
-
-pub fn main() {
- let _: Option<usize> = test1();
- let _: f64 = test1();
- let _: Option<i32> = test1();
-}
diff --git a/src/test/ui/typeck/typeck_type_placeholder_item_help.stderr b/src/test/ui/typeck/typeck_type_placeholder_item_help.stderr
deleted file mode 100644
index 07a5dbd93..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_item_help.stderr
+++ /dev/null
@@ -1,60 +0,0 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
- --> $DIR/typeck_type_placeholder_item_help.rs:4:15
- |
-LL | fn test1() -> _ { Some(42) }
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct return type: `Option<i32>`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item_help.rs:7:14
- |
-LL | const TEST2: _ = 42u32;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `u32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item_help.rs:10:14
- |
-LL | const TEST3: _ = Some(42);
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `Option<i32>`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
- --> $DIR/typeck_type_placeholder_item_help.rs:13:22
- |
-LL | const TEST4: fn() -> _ = 42;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items
- --> $DIR/typeck_type_placeholder_item_help.rs:13:22
- |
-LL | const TEST4: fn() -> _ = 42;
- | ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item_help.rs:18:18
- |
-LL | const TEST5: _ = 42;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `i32`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
- --> $DIR/typeck_type_placeholder_item_help.rs:25:18
- |
-LL | const TEST6: _ = 13;
- | ^
- | |
- | not allowed in type signatures
- | help: replace with the correct type: `i32`
-
-error: aborting due to 7 previous errors
-
-For more information about this error, try `rustc --explain E0121`.
diff --git a/src/test/ui/typeck/typeck_type_placeholder_lifetime_1.rs b/src/test/ui/typeck/typeck_type_placeholder_lifetime_1.rs
deleted file mode 100644
index 43e46c5b6..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_lifetime_1.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// This test checks that the `_` type placeholder does not react
-// badly if put as a lifetime parameter.
-
-struct Foo<'a, T:'a> {
- r: &'a T
-}
-
-pub fn main() {
- let c: Foo<_, _> = Foo { r: &5 };
- //~^ ERROR this struct takes 1 generic argument but 2 generic arguments were supplied
-}
diff --git a/src/test/ui/typeck/typeck_type_placeholder_lifetime_1.stderr b/src/test/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
deleted file mode 100644
index a89c6b85c..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied
- --> $DIR/typeck_type_placeholder_lifetime_1.rs:9:12
- |
-LL | let c: Foo<_, _> = Foo { r: &5 };
- | ^^^ - help: remove this generic argument
- | |
- | expected 1 generic argument
- |
-note: struct defined here, with 1 generic parameter: `T`
- --> $DIR/typeck_type_placeholder_lifetime_1.rs:4:8
- |
-LL | struct Foo<'a, T:'a> {
- | ^^^ -
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0107`.
diff --git a/src/test/ui/typeck/typeck_type_placeholder_lifetime_2.rs b/src/test/ui/typeck/typeck_type_placeholder_lifetime_2.rs
deleted file mode 100644
index 178b8b122..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_lifetime_2.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// This test checks that the `_` type placeholder does not react
-// badly if put as a lifetime parameter.
-
-struct Foo<'a, T:'a> {
- r: &'a T
-}
-
-pub fn main() {
- let c: Foo<_, usize> = Foo { r: &5 };
- //~^ ERROR this struct takes 1 generic argument but 2 generic arguments were supplied
-}
diff --git a/src/test/ui/typeck/typeck_type_placeholder_lifetime_2.stderr b/src/test/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
deleted file mode 100644
index f30766bdf..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied
- --> $DIR/typeck_type_placeholder_lifetime_2.rs:9:12
- |
-LL | let c: Foo<_, usize> = Foo { r: &5 };
- | ^^^ ----- help: remove this generic argument
- | |
- | expected 1 generic argument
- |
-note: struct defined here, with 1 generic parameter: `T`
- --> $DIR/typeck_type_placeholder_lifetime_2.rs:4:8
- |
-LL | struct Foo<'a, T:'a> {
- | ^^^ -
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0107`.
diff --git a/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs b/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs
deleted file mode 100644
index 2f9cfcf8d..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// This test checks that genuine type errors with partial
-// type hints are understandable.
-
-use std::marker::PhantomData;
-
-struct Foo<T>(PhantomData<T>);
-struct Bar<U>(PhantomData<U>);
-
-pub fn main() {
-}
-
-fn test1() {
- let x: Foo<_> = Bar::<usize>(PhantomData);
- //~^ ERROR mismatched types
- //~| expected struct `Foo<_>`
- //~| found struct `Bar<usize>`
- //~| expected struct `Foo`, found struct `Bar`
- let y: Foo<usize> = x;
-}
-
-fn test2() {
- let x: Foo<_> = Bar::<usize>(PhantomData);
- //~^ ERROR mismatched types
- //~| expected struct `Foo<_>`
- //~| found struct `Bar<usize>`
- //~| expected struct `Foo`, found struct `Bar`
-}
diff --git a/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr b/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr
deleted file mode 100644
index 867412a24..000000000
--- a/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/typeck_type_placeholder_mismatch.rs:13:21
- |
-LL | let x: Foo<_> = Bar::<usize>(PhantomData);
- | ------ ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found struct `Bar`
- | |
- | expected due to this
- |
- = note: expected struct `Foo<_>`
- found struct `Bar<usize>`
-
-error[E0308]: mismatched types
- --> $DIR/typeck_type_placeholder_mismatch.rs:22:21
- |
-LL | let x: Foo<_> = Bar::<usize>(PhantomData);
- | ------ ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found struct `Bar`
- | |
- | expected due to this
- |
- = note: expected struct `Foo<_>`
- found struct `Bar<usize>`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/typeck/ufcs-type-params.rs b/src/test/ui/typeck/ufcs-type-params.rs
deleted file mode 100644
index eee2b55b2..000000000
--- a/src/test/ui/typeck/ufcs-type-params.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-// pretty-expanded FIXME #23616
-
-trait Foo<T> {
- fn get(&self) -> T;
-}
-
-impl Foo<i32> for i32 {
- fn get(&self) -> i32 { *self }
-}
-
-fn main() {
- let x: i32 = 1;
- Foo::<i32>::get(&x);
-}
diff --git a/src/test/ui/typeck/unify-return-ty.rs b/src/test/ui/typeck/unify-return-ty.rs
deleted file mode 100644
index da1d82e89..000000000
--- a/src/test/ui/typeck/unify-return-ty.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// run-pass
-// Tests that the tail expr in null() has its type
-// unified with the type *T, and so the type variable
-// in that type gets resolved.
-
-// pretty-expanded FIXME #23616
-
-use std::mem;
-
-fn null<T>() -> *const T {
- unsafe {
- mem::transmute(0_usize)
- }
-}
-
-pub fn main() { null::<isize>(); }
diff --git a/src/test/ui/typeck/while-loop-block-cond.rs b/src/test/ui/typeck/while-loop-block-cond.rs
deleted file mode 100644
index 929759766..000000000
--- a/src/test/ui/typeck/while-loop-block-cond.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
- while {} {}
- //~^ ERROR mismatched types [E0308]
-}
diff --git a/src/test/ui/typeck/while-loop-block-cond.stderr b/src/test/ui/typeck/while-loop-block-cond.stderr
deleted file mode 100644
index 598273af9..000000000
--- a/src/test/ui/typeck/while-loop-block-cond.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/while-loop-block-cond.rs:2:11
- |
-LL | while {} {}
- | ^^ expected `bool`, found `()`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.