summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type/type-check
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/type/type-check
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/type/type-check')
-rw-r--r--src/test/ui/type/type-check/assignment-expected-bool.rs34
-rw-r--r--src/test/ui/type/type-check/assignment-expected-bool.stderr141
-rw-r--r--src/test/ui/type/type-check/assignment-in-if.rs62
-rw-r--r--src/test/ui/type/type-check/assignment-in-if.stderr126
-rw-r--r--src/test/ui/type/type-check/cannot_infer_local_or_array.rs3
-rw-r--r--src/test/ui/type/type-check/cannot_infer_local_or_array.stderr14
-rw-r--r--src/test/ui/type/type-check/cannot_infer_local_or_vec.rs4
-rw-r--r--src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr14
-rw-r--r--src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.rs4
-rw-r--r--src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr14
-rw-r--r--src/test/ui/type/type-check/issue-22897.rs5
-rw-r--r--src/test/ui/type/type-check/issue-22897.stderr9
-rw-r--r--src/test/ui/type/type-check/issue-40294.rs13
-rw-r--r--src/test/ui/type/type-check/issue-40294.stderr11
-rw-r--r--src/test/ui/type/type-check/issue-41314.rs10
-rw-r--r--src/test/ui/type/type-check/issue-41314.stderr14
-rw-r--r--src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.rs27
-rw-r--r--src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr22
-rw-r--r--src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.rs12
-rw-r--r--src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr13
-rw-r--r--src/test/ui/type/type-check/missing_trait_impl.rs16
-rw-r--r--src/test/ui/type/type-check/missing_trait_impl.stderr58
-rw-r--r--src/test/ui/type/type-check/unknown_type_for_closure.rs17
-rw-r--r--src/test/ui/type/type-check/unknown_type_for_closure.stderr37
24 files changed, 0 insertions, 680 deletions
diff --git a/src/test/ui/type/type-check/assignment-expected-bool.rs b/src/test/ui/type/type-check/assignment-expected-bool.rs
deleted file mode 100644
index 191939bdb..000000000
--- a/src/test/ui/type/type-check/assignment-expected-bool.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// The purpose of this text is to ensure that we get good
-// diagnostics when a `bool` is expected but that due to
-// an assignment expression `x = y` the type is `()`.
-
-fn main() {
- let _: bool = 0 = 0; //~ ERROR mismatched types [E0308]
-
- let _: bool = match 0 {
- 0 => 0 = 0, //~ ERROR mismatched types [E0308]
- _ => 0 = 0, //~ ERROR mismatched types [E0308]
- };
-
- let _: bool = match true {
- true => 0 = 0, //~ ERROR mismatched types [E0308]
- _ => (),
- };
-
- if 0 = 0 {} //~ ERROR mismatched types [E0308]
-
- let _: bool = if { 0 = 0 } { //~ ERROR mismatched types [E0308]
- 0 = 0 //~ ERROR mismatched types [E0308]
- } else {
- 0 = 0 //~ ERROR mismatched types [E0308]
- };
-
- let _ = (0 = 0) //~ ERROR mismatched types [E0308]
- && { 0 = 0 } //~ ERROR mismatched types [E0308]
- || (0 = 0); //~ ERROR mismatched types [E0308]
-
- // A test to check that not expecting `bool` behaves well:
- let _: usize = 0 = 0;
- //~^ ERROR mismatched types [E0308]
- //~| ERROR invalid left-hand side of assignment [E0070]
-}
diff --git a/src/test/ui/type/type-check/assignment-expected-bool.stderr b/src/test/ui/type/type-check/assignment-expected-bool.stderr
deleted file mode 100644
index 56494baff..000000000
--- a/src/test/ui/type/type-check/assignment-expected-bool.stderr
+++ /dev/null
@@ -1,141 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:6:19
- |
-LL | let _: bool = 0 = 0;
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | let _: bool = 0 == 0;
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:9:14
- |
-LL | 0 => 0 = 0,
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | 0 => 0 == 0,
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:10:14
- |
-LL | _ => 0 = 0,
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | _ => 0 == 0,
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:14:17
- |
-LL | true => 0 = 0,
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | true => 0 == 0,
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:18:8
- |
-LL | if 0 = 0 {}
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if 0 == 0 {}
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:20:24
- |
-LL | let _: bool = if { 0 = 0 } {
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | let _: bool = if { 0 == 0 } {
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:21:9
- |
-LL | 0 = 0
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | 0 == 0
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:23:9
- |
-LL | 0 = 0
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | 0 == 0
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:26:13
- |
-LL | let _ = (0 = 0)
- | ^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | let _ = (0 == 0)
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:27:14
- |
-LL | && { 0 = 0 }
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | && { 0 == 0 }
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:28:12
- |
-LL | || (0 = 0);
- | ^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | || (0 == 0);
- | +
-
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/assignment-expected-bool.rs:31:22
- |
-LL | let _: usize = 0 = 0;
- | - ^
- | |
- | cannot assign to this expression
-
-error[E0308]: mismatched types
- --> $DIR/assignment-expected-bool.rs:31:20
- |
-LL | let _: usize = 0 = 0;
- | ----- ^^^^^ expected `usize`, found `()`
- | |
- | expected due to this
-
-error: aborting due to 13 previous errors
-
-Some errors have detailed explanations: E0070, E0308.
-For more information about an error, try `rustc --explain E0070`.
diff --git a/src/test/ui/type/type-check/assignment-in-if.rs b/src/test/ui/type/type-check/assignment-in-if.rs
deleted file mode 100644
index ada250df2..000000000
--- a/src/test/ui/type/type-check/assignment-in-if.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Test that the parser does not attempt to parse struct literals
-// within assignments in if expressions.
-
-#![allow(unused_parens)]
-
-struct Foo {
- foo: usize
-}
-
-fn main() {
- let x = 1;
- let y: Foo;
-
- // `x { ... }` should not be interpreted as a struct literal here
- if x = x {
- //~^ ERROR mismatched types
- println!("{}", x);
- }
- // Explicit parentheses on the left should match behavior of above
- if (x = x) {
- //~^ ERROR mismatched types
- println!("{}", x);
- }
- // The struct literal interpretation is fine with explicit parentheses on the right
- if y = (Foo { foo: x }) {
- //~^ ERROR mismatched types
- println!("{}", x);
- }
- // "invalid left-hand side of assignment" error is suppresed
- if 3 = x {
- //~^ ERROR mismatched types
- println!("{}", x);
- }
- if (
- if true {
- x = 4 //~ ERROR mismatched types
- } else {
- x = 5 //~ ERROR mismatched types
- }
- ) {
- println!("{}", x);
- }
-
- if x == x && x = x && x == x {
- //~^ ERROR mismatched types
- //~| ERROR mismatched types
- //~| ERROR mismatched types
- println!("{}", x);
- }
-
- if x == x && x == x && x = x {
- //~^ ERROR mismatched types
- //~| ERROR mismatched types
- println!("{}", x);
- }
-
- if x = 1 && x == 1 {
- //~^ ERROR mismatched types
- //~| ERROR mismatched types
- println!("{}", x);
- }
-}
diff --git a/src/test/ui/type/type-check/assignment-in-if.stderr b/src/test/ui/type/type-check/assignment-in-if.stderr
deleted file mode 100644
index 8ab08e25e..000000000
--- a/src/test/ui/type/type-check/assignment-in-if.stderr
+++ /dev/null
@@ -1,126 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:15:8
- |
-LL | if x = x {
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if x == x {
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:20:8
- |
-LL | if (x = x) {
- | ^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if (x == x) {
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:25:8
- |
-LL | if y = (Foo { foo: x }) {
- | ^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if y == (Foo { foo: x }) {
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:30:8
- |
-LL | if 3 = x {
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if 3 == x {
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:36:13
- |
-LL | x = 4
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | x == 4
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:38:13
- |
-LL | x = 5
- | ^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | x == 5
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:44:18
- |
-LL | if x == x && x = x && x == x {
- | ^ expected `bool`, found `usize`
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:44:22
- |
-LL | if x == x && x = x && x == x {
- | ^ expected `bool`, found `usize`
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:44:8
- |
-LL | if x == x && x = x && x == x {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if x == x && x == x && x == x {
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:51:28
- |
-LL | if x == x && x == x && x = x {
- | ^ expected `bool`, found `usize`
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:51:8
- |
-LL | if x == x && x == x && x = x {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if x == x && x == x && x == x {
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:57:12
- |
-LL | if x = 1 && x == 1 {
- | ^ expected `bool`, found integer
-
-error[E0308]: mismatched types
- --> $DIR/assignment-in-if.rs:57:8
- |
-LL | if x = 1 && x == 1 {
- | ^^^^^^^^^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | if x == 1 && x == 1 {
- | +
-
-error: aborting due to 13 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_array.rs b/src/test/ui/type/type-check/cannot_infer_local_or_array.rs
deleted file mode 100644
index af7552523..000000000
--- a/src/test/ui/type/type-check/cannot_infer_local_or_array.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- let x = []; //~ ERROR type annotations needed
-}
diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_array.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_array.stderr
deleted file mode 100644
index e823bad26..000000000
--- a/src/test/ui/type/type-check/cannot_infer_local_or_array.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0282]: type annotations needed for `[_; 0]`
- --> $DIR/cannot_infer_local_or_array.rs:2:9
- |
-LL | let x = [];
- | ^ -- type must be known at this point
- |
-help: consider giving `x` an explicit type, where the placeholders `_` are specified
- |
-LL | let x: [_; 0] = [];
- | ++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec.rs b/src/test/ui/type/type-check/cannot_infer_local_or_vec.rs
deleted file mode 100644
index e72ddabf3..000000000
--- a/src/test/ui/type/type-check/cannot_infer_local_or_vec.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
- let x = vec![];
- //~^ ERROR type annotations needed
-}
diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr
deleted file mode 100644
index b63d2a3b6..000000000
--- a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0282]: type annotations needed for `Vec<T>`
- --> $DIR/cannot_infer_local_or_vec.rs:2:9
- |
-LL | let x = vec![];
- | ^
- |
-help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
- |
-LL | let x: Vec<T> = vec![];
- | ++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.rs b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.rs
deleted file mode 100644
index d21456439..000000000
--- a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
- let (x, ) = (vec![], );
- //~^ ERROR type annotations needed
-}
diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr
deleted file mode 100644
index be60cda68..000000000
--- a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0282]: type annotations needed for `(Vec<T>,)`
- --> $DIR/cannot_infer_local_or_vec_in_tuples.rs:2:9
- |
-LL | let (x, ) = (vec![], );
- | ^^^^^
- |
-help: consider giving this pattern a type, where the type for type parameter `T` is specified
- |
-LL | let (x, ): (Vec<T>,) = (vec![], );
- | +++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/ui/type/type-check/issue-22897.rs b/src/test/ui/type/type-check/issue-22897.rs
deleted file mode 100644
index 8171a0ef1..000000000
--- a/src/test/ui/type/type-check/issue-22897.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-fn main() { }
-
-fn unconstrained_type() {
- []; //~ ERROR type annotations needed
-}
diff --git a/src/test/ui/type/type-check/issue-22897.stderr b/src/test/ui/type/type-check/issue-22897.stderr
deleted file mode 100644
index fae7b7926..000000000
--- a/src/test/ui/type/type-check/issue-22897.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0282]: type annotations needed
- --> $DIR/issue-22897.rs:4:5
- |
-LL | [];
- | ^^ cannot infer type for array `[_; 0]`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/ui/type/type-check/issue-40294.rs b/src/test/ui/type/type-check/issue-40294.rs
deleted file mode 100644
index 5493a4e5f..000000000
--- a/src/test/ui/type/type-check/issue-40294.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-trait Foo: Sized {
- fn foo(self);
-}
-
-fn foo<'a,'b,T>(x: &'a T, y: &'b T)
- where &'a T : Foo, //~ ERROR type annotations needed
- &'b T : Foo
-{
- x.foo();
- y.foo();
-}
-
-fn main() { }
diff --git a/src/test/ui/type/type-check/issue-40294.stderr b/src/test/ui/type/type-check/issue-40294.stderr
deleted file mode 100644
index 75feb5698..000000000
--- a/src/test/ui/type/type-check/issue-40294.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0283]: type annotations needed: cannot satisfy `&'a T: Foo`
- --> $DIR/issue-40294.rs:6:19
- |
-LL | where &'a T : Foo,
- | ^^^
- |
- = note: cannot satisfy `&'a T: Foo`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0283`.
diff --git a/src/test/ui/type/type-check/issue-41314.rs b/src/test/ui/type/type-check/issue-41314.rs
deleted file mode 100644
index cbd39f5f9..000000000
--- a/src/test/ui/type/type-check/issue-41314.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-enum X {
- Y(u32)
-}
-
-fn main() {
- match X::Y(0) {
- X::Y { number } => {}
- //~^ ERROR tuple variant `X::Y` written as struct variant
- }
-}
diff --git a/src/test/ui/type/type-check/issue-41314.stderr b/src/test/ui/type/type-check/issue-41314.stderr
deleted file mode 100644
index 4a9bf6106..000000000
--- a/src/test/ui/type/type-check/issue-41314.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0769]: tuple variant `X::Y` written as struct variant
- --> $DIR/issue-41314.rs:7:9
- |
-LL | X::Y { number } => {}
- | ^^^^^^^^^^^^^^^
- |
-help: use the tuple variant pattern syntax instead
- |
-LL | X::Y(number) => {}
- | ~~~~~~~~
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0769`.
diff --git a/src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.rs b/src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.rs
deleted file mode 100644
index c39ab9544..000000000
--- a/src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-fn main() {
- let mut i: i64;
- // Expected type is an inference variable `?T`
- // because the `match` is used as a statement.
- // This is the "initial" type of the `coercion`.
- match i {
- // Add `bool` to the overall `coercion`.
- 0 => true,
-
- // Necessary to cause the ICE:
- 1 => true,
-
- // Suppose that we had `let _: bool = match i { ... }`.
- // In that case, as the expected type would be `bool`,
- // we would suggest `i == 1` as a fix.
- //
- // However, no type error happens when checking `i = 1` because `expected == ?T`,
- // which will unify with `typeof(i = 1) == ()`.
- //
- // However, in #67273, we would delay the unification of this arm with the above
- // because we used the hitherto accumulated coercion as opposed to the "initial" type.
- 2 => i = 1,
- //~^ ERROR `match` arms have incompatible types
-
- _ => (),
- }
-}
diff --git a/src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr b/src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr
deleted file mode 100644
index a431fe89c..000000000
--- a/src/test/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error[E0308]: `match` arms have incompatible types
- --> $DIR/issue-67273-assignment-match-prior-arm-bool-expected-unit.rs:22:14
- |
-LL | / match i {
-LL | | // Add `bool` to the overall `coercion`.
-LL | | 0 => true,
- | | ---- this is found to be of type `bool`
-LL | |
-LL | | // Necessary to cause the ICE:
-LL | | 1 => true,
- | | ---- this is found to be of type `bool`
-... |
-LL | | 2 => i = 1,
- | | ^^^^^ expected `bool`, found `()`
-... |
-LL | | _ => (),
-LL | | }
- | |_____- `match` arms have incompatible types
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.rs b/src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.rs
deleted file mode 100644
index e50cc5865..000000000
--- a/src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-macro_rules! many_args {
- ([$($t:tt)*]#$($h:tt)*) => {
- many_args!{[$($t)*$($t)*]$($h)*}
- };
- ([$($t:tt)*]) => {
- fn _f($($t: ()),*) {} //~ ERROR function can not have more than 65535 arguments
- }
-}
-
-many_args!{[_]########## ######}
-
-fn main() {}
diff --git a/src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr b/src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr
deleted file mode 100644
index 847bc517e..000000000
--- a/src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error: function can not have more than 65535 arguments
- --> $DIR/issue-88577-check-fn-with-more-than-65535-arguments.rs:6:22
- |
-LL | fn _f($($t: ()),*) {}
- | ^
-...
-LL | many_args!{[_]########## ######}
- | -------------------------------- in this macro invocation
- |
- = note: this error originates in the macro `many_args` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/type/type-check/missing_trait_impl.rs b/src/test/ui/type/type-check/missing_trait_impl.rs
deleted file mode 100644
index 0e3e703a2..000000000
--- a/src/test/ui/type/type-check/missing_trait_impl.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-fn main() {
-}
-
-fn foo<T>(x: T, y: T) {
- let z = x + y; //~ ERROR cannot add `T` to `T`
-}
-
-fn bar<T>(x: T) {
- x += x; //~ ERROR binary assignment operation `+=` cannot be applied to type `T`
-}
-
-fn baz<T>(x: T) {
- let y = -x; //~ ERROR cannot apply unary operator `-` to type `T`
- let y = !x; //~ ERROR cannot apply unary operator `!` to type `T`
- let y = *x; //~ ERROR type `T` cannot be dereferenced
-}
diff --git a/src/test/ui/type/type-check/missing_trait_impl.stderr b/src/test/ui/type/type-check/missing_trait_impl.stderr
deleted file mode 100644
index 2b58cd418..000000000
--- a/src/test/ui/type/type-check/missing_trait_impl.stderr
+++ /dev/null
@@ -1,58 +0,0 @@
-error[E0369]: cannot add `T` to `T`
- --> $DIR/missing_trait_impl.rs:5:15
- |
-LL | let z = x + y;
- | - ^ - T
- | |
- | T
- |
-help: consider restricting type parameter `T`
- |
-LL | fn foo<T: std::ops::Add>(x: T, y: T) {
- | +++++++++++++++
-
-error[E0368]: binary assignment operation `+=` cannot be applied to type `T`
- --> $DIR/missing_trait_impl.rs:9:5
- |
-LL | x += x;
- | -^^^^^
- | |
- | cannot use `+=` on type `T`
- |
-help: consider restricting type parameter `T`
- |
-LL | fn bar<T: std::ops::AddAssign>(x: T) {
- | +++++++++++++++++++++
-
-error[E0600]: cannot apply unary operator `-` to type `T`
- --> $DIR/missing_trait_impl.rs:13:13
- |
-LL | let y = -x;
- | ^^ cannot apply unary operator `-`
- |
-help: consider restricting type parameter `T`
- |
-LL | fn baz<T: std::ops::Neg>(x: T) {
- | +++++++++++++++
-
-error[E0600]: cannot apply unary operator `!` to type `T`
- --> $DIR/missing_trait_impl.rs:14:13
- |
-LL | let y = !x;
- | ^^ cannot apply unary operator `!`
- |
-help: consider restricting type parameter `T`
- |
-LL | fn baz<T: std::ops::Not>(x: T) {
- | +++++++++++++++
-
-error[E0614]: type `T` cannot be dereferenced
- --> $DIR/missing_trait_impl.rs:15:13
- |
-LL | let y = *x;
- | ^^
-
-error: aborting due to 5 previous errors
-
-Some errors have detailed explanations: E0368, E0369, E0600, E0614.
-For more information about an error, try `rustc --explain E0368`.
diff --git a/src/test/ui/type/type-check/unknown_type_for_closure.rs b/src/test/ui/type/type-check/unknown_type_for_closure.rs
deleted file mode 100644
index 167687c18..000000000
--- a/src/test/ui/type/type-check/unknown_type_for_closure.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-fn infer_in_arg() {
- let x = |b: Vec<_>| {}; //~ ERROR E0282
-}
-
-fn empty_pattern() {
- let x = |_| {}; //~ ERROR type annotations needed
-}
-
-fn infer_ty() {
- let x = |k: _| {}; //~ ERROR type annotations needed
-}
-
-fn ambig_return() {
- let x = || -> Vec<_> { Vec::new() }; //~ ERROR type annotations needed
-}
-
-fn main() {}
diff --git a/src/test/ui/type/type-check/unknown_type_for_closure.stderr b/src/test/ui/type/type-check/unknown_type_for_closure.stderr
deleted file mode 100644
index 9ae97f390..000000000
--- a/src/test/ui/type/type-check/unknown_type_for_closure.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0282]: type annotations needed
- --> $DIR/unknown_type_for_closure.rs:2:13
- |
-LL | let x = |b: Vec<_>| {};
- | ^^^^^^^^^^^^^^ cannot infer type for struct `Vec<_>`
-
-error[E0282]: type annotations needed
- --> $DIR/unknown_type_for_closure.rs:6:14
- |
-LL | let x = |_| {};
- | ^
- |
-help: consider giving this closure parameter an explicit type
- |
-LL | let x = |_: _| {};
- | +++
-
-error[E0282]: type annotations needed
- --> $DIR/unknown_type_for_closure.rs:10:14
- |
-LL | let x = |k: _| {};
- | ^ cannot infer type
-
-error[E0282]: type annotations needed
- --> $DIR/unknown_type_for_closure.rs:14:28
- |
-LL | let x = || -> Vec<_> { Vec::new() };
- | ^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `Vec`
- |
-help: consider specifying the generic argument
- |
-LL | let x = || -> Vec<_> { Vec::<T>::new() };
- | +++++
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0282`.