From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/tuple/add-tuple-within-arguments.rs | 10 ---- .../ui/tuple/add-tuple-within-arguments.stderr | 40 ---------------- src/test/ui/tuple/array-diagnostics.rs | 7 --- src/test/ui/tuple/array-diagnostics.stderr | 9 ---- src/test/ui/tuple/builtin-fail.rs | 19 -------- src/test/ui/tuple/builtin-fail.stderr | 55 ---------------------- src/test/ui/tuple/builtin.rs | 20 -------- src/test/ui/tuple/index-float.rs | 10 ---- src/test/ui/tuple/index-invalid.rs | 7 --- src/test/ui/tuple/index-invalid.stderr | 21 --------- src/test/ui/tuple/indexing-in-macro.rs | 9 ---- src/test/ui/tuple/nested-index.rs | 12 ----- src/test/ui/tuple/one-tuple.rs | 15 ------ src/test/ui/tuple/tup.rs | 21 --------- src/test/ui/tuple/tuple-arity-mismatch.rs | 17 ------- src/test/ui/tuple/tuple-arity-mismatch.stderr | 35 -------------- src/test/ui/tuple/tuple-index-fat-types.rs | 13 ----- src/test/ui/tuple/tuple-index-not-tuple.rs | 10 ---- src/test/ui/tuple/tuple-index-not-tuple.stderr | 15 ------ src/test/ui/tuple/tuple-index-out-of-bounds.rs | 14 ------ src/test/ui/tuple/tuple-index-out-of-bounds.stderr | 15 ------ src/test/ui/tuple/tuple-struct-fields/test.rs | 9 ---- src/test/ui/tuple/tuple-struct-fields/test.stderr | 17 ------- src/test/ui/tuple/tuple-struct-fields/test2.rs | 15 ------ src/test/ui/tuple/tuple-struct-fields/test2.stderr | 28 ----------- src/test/ui/tuple/tuple-struct-fields/test3.rs | 15 ------ src/test/ui/tuple/tuple-struct-fields/test3.stderr | 28 ----------- src/test/ui/tuple/wrong_argument_ice-2.rs | 17 ------- src/test/ui/tuple/wrong_argument_ice-2.stderr | 19 -------- src/test/ui/tuple/wrong_argument_ice-3.rs | 17 ------- src/test/ui/tuple/wrong_argument_ice-3.stderr | 26 ---------- src/test/ui/tuple/wrong_argument_ice-4.rs | 6 --- src/test/ui/tuple/wrong_argument_ice-4.stderr | 23 --------- src/test/ui/tuple/wrong_argument_ice.rs | 17 ------- src/test/ui/tuple/wrong_argument_ice.stderr | 19 -------- 35 files changed, 630 deletions(-) delete mode 100644 src/test/ui/tuple/add-tuple-within-arguments.rs delete mode 100644 src/test/ui/tuple/add-tuple-within-arguments.stderr delete mode 100644 src/test/ui/tuple/array-diagnostics.rs delete mode 100644 src/test/ui/tuple/array-diagnostics.stderr delete mode 100644 src/test/ui/tuple/builtin-fail.rs delete mode 100644 src/test/ui/tuple/builtin-fail.stderr delete mode 100644 src/test/ui/tuple/builtin.rs delete mode 100644 src/test/ui/tuple/index-float.rs delete mode 100644 src/test/ui/tuple/index-invalid.rs delete mode 100644 src/test/ui/tuple/index-invalid.stderr delete mode 100644 src/test/ui/tuple/indexing-in-macro.rs delete mode 100644 src/test/ui/tuple/nested-index.rs delete mode 100644 src/test/ui/tuple/one-tuple.rs delete mode 100644 src/test/ui/tuple/tup.rs delete mode 100644 src/test/ui/tuple/tuple-arity-mismatch.rs delete mode 100644 src/test/ui/tuple/tuple-arity-mismatch.stderr delete mode 100644 src/test/ui/tuple/tuple-index-fat-types.rs delete mode 100644 src/test/ui/tuple/tuple-index-not-tuple.rs delete mode 100644 src/test/ui/tuple/tuple-index-not-tuple.stderr delete mode 100644 src/test/ui/tuple/tuple-index-out-of-bounds.rs delete mode 100644 src/test/ui/tuple/tuple-index-out-of-bounds.stderr delete mode 100644 src/test/ui/tuple/tuple-struct-fields/test.rs delete mode 100644 src/test/ui/tuple/tuple-struct-fields/test.stderr delete mode 100644 src/test/ui/tuple/tuple-struct-fields/test2.rs delete mode 100644 src/test/ui/tuple/tuple-struct-fields/test2.stderr delete mode 100644 src/test/ui/tuple/tuple-struct-fields/test3.rs delete mode 100644 src/test/ui/tuple/tuple-struct-fields/test3.stderr delete mode 100644 src/test/ui/tuple/wrong_argument_ice-2.rs delete mode 100644 src/test/ui/tuple/wrong_argument_ice-2.stderr delete mode 100644 src/test/ui/tuple/wrong_argument_ice-3.rs delete mode 100644 src/test/ui/tuple/wrong_argument_ice-3.stderr delete mode 100644 src/test/ui/tuple/wrong_argument_ice-4.rs delete mode 100644 src/test/ui/tuple/wrong_argument_ice-4.stderr delete mode 100644 src/test/ui/tuple/wrong_argument_ice.rs delete mode 100644 src/test/ui/tuple/wrong_argument_ice.stderr (limited to 'src/test/ui/tuple') diff --git a/src/test/ui/tuple/add-tuple-within-arguments.rs b/src/test/ui/tuple/add-tuple-within-arguments.rs deleted file mode 100644 index 089c703fd..000000000 --- a/src/test/ui/tuple/add-tuple-within-arguments.rs +++ /dev/null @@ -1,10 +0,0 @@ -fn foo(s: &str, a: (i32, i32), s2: &str) {} - -fn bar(s: &str, a: (&str,), s2: &str) {} - -fn main() { - foo("hi", 1, 2, "hi"); - //~^ ERROR this function takes 3 arguments but 4 arguments were supplied - bar("hi", "hi", "hi"); - //~^ ERROR mismatched types -} diff --git a/src/test/ui/tuple/add-tuple-within-arguments.stderr b/src/test/ui/tuple/add-tuple-within-arguments.stderr deleted file mode 100644 index 7029d298d..000000000 --- a/src/test/ui/tuple/add-tuple-within-arguments.stderr +++ /dev/null @@ -1,40 +0,0 @@ -error[E0061]: this function takes 3 arguments but 4 arguments were supplied - --> $DIR/add-tuple-within-arguments.rs:6:5 - | -LL | foo("hi", 1, 2, "hi"); - | ^^^ - | -note: function defined here - --> $DIR/add-tuple-within-arguments.rs:1:4 - | -LL | fn foo(s: &str, a: (i32, i32), s2: &str) {} - | ^^^ ------------- -help: wrap these arguments in parentheses to construct a tuple - | -LL | foo("hi", (1, 2), "hi"); - | + + - -error[E0308]: mismatched types - --> $DIR/add-tuple-within-arguments.rs:8:15 - | -LL | bar("hi", "hi", "hi"); - | --- ^^^^ expected tuple, found `&str` - | | - | arguments to this function are incorrect - | - = note: expected tuple `(&str,)` - found reference `&'static str` -note: function defined here - --> $DIR/add-tuple-within-arguments.rs:3:4 - | -LL | fn bar(s: &str, a: (&str,), s2: &str) {} - | ^^^ ---------- -help: use a trailing comma to create a tuple with one element - | -LL | bar("hi", ("hi",), "hi"); - | + ++ - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0061, E0308. -For more information about an error, try `rustc --explain E0061`. diff --git a/src/test/ui/tuple/array-diagnostics.rs b/src/test/ui/tuple/array-diagnostics.rs deleted file mode 100644 index 1929dab07..000000000 --- a/src/test/ui/tuple/array-diagnostics.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let _tmp = [ - ("C200B40A82", 3), - ("C200B40A83", 4) //~ ERROR: expected function, found `(&'static str, {integer})` [E0618] - ("C200B40A8537", 5), - ]; -} diff --git a/src/test/ui/tuple/array-diagnostics.stderr b/src/test/ui/tuple/array-diagnostics.stderr deleted file mode 100644 index a10d7af47..000000000 --- a/src/test/ui/tuple/array-diagnostics.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0618]: expected function, found `(&'static str, {integer})` - --> $DIR/array-diagnostics.rs:4:9 - | -LL | ("C200B40A83", 4) - | ^^^^^^^^^^^^^^^^^- help: consider separating array elements with a comma: `,` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0618`. diff --git a/src/test/ui/tuple/builtin-fail.rs b/src/test/ui/tuple/builtin-fail.rs deleted file mode 100644 index 312080961..000000000 --- a/src/test/ui/tuple/builtin-fail.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![feature(tuple_trait)] - -fn assert_is_tuple() {} - -struct TupleStruct(i32, i32); - -fn from_param_env() { - assert_is_tuple::(); - //~^ ERROR `T` is not a tuple -} - -fn main() { - assert_is_tuple::(); - //~^ ERROR `i32` is not a tuple - assert_is_tuple::<(i32)>(); - //~^ ERROR `i32` is not a tuple - assert_is_tuple::(); - //~^ ERROR `TupleStruct` is not a tuple -} diff --git a/src/test/ui/tuple/builtin-fail.stderr b/src/test/ui/tuple/builtin-fail.stderr deleted file mode 100644 index e3e29a73f..000000000 --- a/src/test/ui/tuple/builtin-fail.stderr +++ /dev/null @@ -1,55 +0,0 @@ -error[E0277]: `T` is not a tuple - --> $DIR/builtin-fail.rs:8:23 - | -LL | assert_is_tuple::(); - | ^ the trait `Tuple` is not implemented for `T` - | -note: required by a bound in `assert_is_tuple` - --> $DIR/builtin-fail.rs:3:23 - | -LL | fn assert_is_tuple() {} - | ^^^^^^^^^^^^^^^^^^ required by this bound in `assert_is_tuple` -help: consider restricting type parameter `T` - | -LL | fn from_param_env() { - | ++++++++++++++++++++ - -error[E0277]: `i32` is not a tuple - --> $DIR/builtin-fail.rs:13:23 - | -LL | assert_is_tuple::(); - | ^^^ the trait `Tuple` is not implemented for `i32` - | -note: required by a bound in `assert_is_tuple` - --> $DIR/builtin-fail.rs:3:23 - | -LL | fn assert_is_tuple() {} - | ^^^^^^^^^^^^^^^^^^ required by this bound in `assert_is_tuple` - -error[E0277]: `i32` is not a tuple - --> $DIR/builtin-fail.rs:15:24 - | -LL | assert_is_tuple::<(i32)>(); - | ^^^ the trait `Tuple` is not implemented for `i32` - | -note: required by a bound in `assert_is_tuple` - --> $DIR/builtin-fail.rs:3:23 - | -LL | fn assert_is_tuple() {} - | ^^^^^^^^^^^^^^^^^^ required by this bound in `assert_is_tuple` - -error[E0277]: `TupleStruct` is not a tuple - --> $DIR/builtin-fail.rs:17:23 - | -LL | assert_is_tuple::(); - | ^^^^^^^^^^^ the trait `Tuple` is not implemented for `TupleStruct` - | -note: required by a bound in `assert_is_tuple` - --> $DIR/builtin-fail.rs:3:23 - | -LL | fn assert_is_tuple() {} - | ^^^^^^^^^^^^^^^^^^ required by this bound in `assert_is_tuple` - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/tuple/builtin.rs b/src/test/ui/tuple/builtin.rs deleted file mode 100644 index d87ce5263..000000000 --- a/src/test/ui/tuple/builtin.rs +++ /dev/null @@ -1,20 +0,0 @@ -// check-pass - -#![feature(tuple_trait)] - -fn assert_is_tuple() {} - -struct Unsized([u8]); - -fn from_param_env() { - assert_is_tuple::(); -} - -fn main() { - assert_is_tuple::<()>(); - assert_is_tuple::<(i32,)>(); - assert_is_tuple::<(Unsized,)>(); - from_param_env::<()>(); - from_param_env::<(i32,)>(); - from_param_env::<(Unsized,)>(); -} diff --git a/src/test/ui/tuple/index-float.rs b/src/test/ui/tuple/index-float.rs deleted file mode 100644 index eda2bf485..000000000 --- a/src/test/ui/tuple/index-float.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass - -fn main() { - let tuple = (((),),); - - let _ = tuple. 0.0; // OK, whitespace - let _ = tuple.0. 0; // OK, whitespace - - let _ = tuple./*special cases*/0.0; // OK, comment -} diff --git a/src/test/ui/tuple/index-invalid.rs b/src/test/ui/tuple/index-invalid.rs deleted file mode 100644 index d36f6cfe3..000000000 --- a/src/test/ui/tuple/index-invalid.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let _ = (((),),).1.0; //~ ERROR no field `1` on type `(((),),)` - - let _ = (((),),).0.1; //~ ERROR no field `1` on type `((),)` - - let _ = (((),),).000.000; //~ ERROR no field `000` on type `(((),),)` -} diff --git a/src/test/ui/tuple/index-invalid.stderr b/src/test/ui/tuple/index-invalid.stderr deleted file mode 100644 index 8d22f458a..000000000 --- a/src/test/ui/tuple/index-invalid.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0609]: no field `1` on type `(((),),)` - --> $DIR/index-invalid.rs:2:22 - | -LL | let _ = (((),),).1.0; - | ^ - -error[E0609]: no field `1` on type `((),)` - --> $DIR/index-invalid.rs:4:24 - | -LL | let _ = (((),),).0.1; - | ^ - -error[E0609]: no field `000` on type `(((),),)` - --> $DIR/index-invalid.rs:6:22 - | -LL | let _ = (((),),).000.000; - | ^^^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0609`. diff --git a/src/test/ui/tuple/indexing-in-macro.rs b/src/test/ui/tuple/indexing-in-macro.rs deleted file mode 100644 index bef4a69ab..000000000 --- a/src/test/ui/tuple/indexing-in-macro.rs +++ /dev/null @@ -1,9 +0,0 @@ -// check-pass - -macro_rules! m { - (.$l:literal) => {}; -} - -m!(.0.0); // OK, `0.0` after a dot is still a float token. - -fn main() {} diff --git a/src/test/ui/tuple/nested-index.rs b/src/test/ui/tuple/nested-index.rs deleted file mode 100644 index a3232d6fc..000000000 --- a/src/test/ui/tuple/nested-index.rs +++ /dev/null @@ -1,12 +0,0 @@ -// run-pass - -fn main () { - let n = (1, (2, 3)).1.1; - assert_eq!(n, 3); - - let n = (1, (2, (3, 4))).1.1.1; - assert_eq!(n, 4); - - // This is a range expression, not nested indexing. - let _ = 0.0..1.1; -} diff --git a/src/test/ui/tuple/one-tuple.rs b/src/test/ui/tuple/one-tuple.rs deleted file mode 100644 index 00fbadce1..000000000 --- a/src/test/ui/tuple/one-tuple.rs +++ /dev/null @@ -1,15 +0,0 @@ -// run-pass -// Why one-tuples? Because macros. - - -pub fn main() { - match ('c',) { - (x,) => { - assert_eq!(x, 'c'); - } - } - // test the 1-tuple type too - let x: (char,) = ('d',); - let (y,) = x; - assert_eq!(y, 'd'); -} diff --git a/src/test/ui/tuple/tup.rs b/src/test/ui/tuple/tup.rs deleted file mode 100644 index 160477b0b..000000000 --- a/src/test/ui/tuple/tup.rs +++ /dev/null @@ -1,21 +0,0 @@ -// run-pass - -#![allow(non_camel_case_types)] - -type point = (isize, isize); - -fn f(p: point, x: isize, y: isize) { - let (a, b) = p; - assert_eq!(a, x); - assert_eq!(b, y); -} - -pub fn main() { - let p: point = (10, 20); - let (a, b) = p; - assert_eq!(a, 10); - assert_eq!(b, 20); - let p2: point = p; - f(p, 10, 20); - f(p2, 10, 20); -} diff --git a/src/test/ui/tuple/tuple-arity-mismatch.rs b/src/test/ui/tuple/tuple-arity-mismatch.rs deleted file mode 100644 index f1e525c93..000000000 --- a/src/test/ui/tuple/tuple-arity-mismatch.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Issue #6155 - -fn first((value, _): (isize, f64)) -> isize { value } - -fn main() { - let y = first ((1,2.0,3)); - //~^ ERROR mismatched types - //~| expected tuple `(isize, f64)` - //~| found tuple `(isize, f64, {integer})` - //~| expected a tuple with 2 elements, found one with 3 elements - - let y = first ((1,)); - //~^ ERROR mismatched types - //~| expected tuple `(isize, f64)` - //~| found tuple `(isize,)` - //~| expected a tuple with 2 elements, found one with 1 element -} diff --git a/src/test/ui/tuple/tuple-arity-mismatch.stderr b/src/test/ui/tuple/tuple-arity-mismatch.stderr deleted file mode 100644 index fff7be987..000000000 --- a/src/test/ui/tuple/tuple-arity-mismatch.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/tuple-arity-mismatch.rs:6:20 - | -LL | let y = first ((1,2.0,3)); - | ----- ^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements - | | - | arguments to this function are incorrect - | - = note: expected tuple `(isize, f64)` - found tuple `(isize, f64, {integer})` -note: function defined here - --> $DIR/tuple-arity-mismatch.rs:3:4 - | -LL | fn first((value, _): (isize, f64)) -> isize { value } - | ^^^^^ ------------------------ - -error[E0308]: mismatched types - --> $DIR/tuple-arity-mismatch.rs:12:20 - | -LL | let y = first ((1,)); - | ----- ^^^^ expected a tuple with 2 elements, found one with 1 element - | | - | arguments to this function are incorrect - | - = note: expected tuple `(isize, f64)` - found tuple `(isize,)` -note: function defined here - --> $DIR/tuple-arity-mismatch.rs:3:4 - | -LL | fn first((value, _): (isize, f64)) -> isize { value } - | ^^^^^ ------------------------ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/tuple/tuple-index-fat-types.rs b/src/test/ui/tuple/tuple-index-fat-types.rs deleted file mode 100644 index 5dda1ed97..000000000 --- a/src/test/ui/tuple/tuple-index-fat-types.rs +++ /dev/null @@ -1,13 +0,0 @@ -// run-pass - -struct Foo<'a>(&'a [isize]); - -fn main() { - let x: &[isize] = &[1, 2, 3]; - let y = (x,); - assert_eq!(y.0, x); - - let x: &[isize] = &[1, 2, 3]; - let y = Foo(x); - assert_eq!(y.0, x); -} diff --git a/src/test/ui/tuple/tuple-index-not-tuple.rs b/src/test/ui/tuple/tuple-index-not-tuple.rs deleted file mode 100644 index c478e1c67..000000000 --- a/src/test/ui/tuple/tuple-index-not-tuple.rs +++ /dev/null @@ -1,10 +0,0 @@ -struct Point { x: isize, y: isize } -struct Empty; - -fn main() { - let origin = Point { x: 0, y: 0 }; - origin.0; - //~^ ERROR no field `0` on type `Point` - Empty.0; - //~^ ERROR no field `0` on type `Empty` -} diff --git a/src/test/ui/tuple/tuple-index-not-tuple.stderr b/src/test/ui/tuple/tuple-index-not-tuple.stderr deleted file mode 100644 index a1bcdfaed..000000000 --- a/src/test/ui/tuple/tuple-index-not-tuple.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0609]: no field `0` on type `Point` - --> $DIR/tuple-index-not-tuple.rs:6:12 - | -LL | origin.0; - | ^ help: a field with a similar name exists: `x` - -error[E0609]: no field `0` on type `Empty` - --> $DIR/tuple-index-not-tuple.rs:8:11 - | -LL | Empty.0; - | ^ unknown field - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0609`. diff --git a/src/test/ui/tuple/tuple-index-out-of-bounds.rs b/src/test/ui/tuple/tuple-index-out-of-bounds.rs deleted file mode 100644 index c772c0daa..000000000 --- a/src/test/ui/tuple/tuple-index-out-of-bounds.rs +++ /dev/null @@ -1,14 +0,0 @@ -struct Point(i32, i32); - -fn main() { - let origin = Point(0, 0); - origin.0; - origin.1; - origin.2; - //~^ ERROR no field `2` on type `Point` - let tuple = (0, 0); - tuple.0; - tuple.1; - tuple.2; - //~^ ERROR no field `2` on type `({integer}, {integer})` -} diff --git a/src/test/ui/tuple/tuple-index-out-of-bounds.stderr b/src/test/ui/tuple/tuple-index-out-of-bounds.stderr deleted file mode 100644 index 7d7c5cd78..000000000 --- a/src/test/ui/tuple/tuple-index-out-of-bounds.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0609]: no field `2` on type `Point` - --> $DIR/tuple-index-out-of-bounds.rs:7:12 - | -LL | origin.2; - | ^ help: a field with a similar name exists: `0` - -error[E0609]: no field `2` on type `({integer}, {integer})` - --> $DIR/tuple-index-out-of-bounds.rs:12:11 - | -LL | tuple.2; - | ^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0609`. diff --git a/src/test/ui/tuple/tuple-struct-fields/test.rs b/src/test/ui/tuple/tuple-struct-fields/test.rs deleted file mode 100644 index 00677090d..000000000 --- a/src/test/ui/tuple/tuple-struct-fields/test.rs +++ /dev/null @@ -1,9 +0,0 @@ -mod foo { - type T = (); - struct S1(pub(in foo) (), pub(T), pub(crate) (), pub(((), T))); - struct S2(pub((foo)) ()); - //~^ ERROR expected one of `)` or `,`, found `(` - //~| ERROR cannot find type `foo` in this scope -} - -fn main() {} diff --git a/src/test/ui/tuple/tuple-struct-fields/test.stderr b/src/test/ui/tuple/tuple-struct-fields/test.stderr deleted file mode 100644 index bfa0b32fd..000000000 --- a/src/test/ui/tuple/tuple-struct-fields/test.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error: expected one of `)` or `,`, found `(` - --> $DIR/test.rs:4:26 - | -LL | struct S2(pub((foo)) ()); - | -^ expected one of `)` or `,` - | | - | help: missing `,` - -error[E0412]: cannot find type `foo` in this scope - --> $DIR/test.rs:4:20 - | -LL | struct S2(pub((foo)) ()); - | ^^^ not found in this scope - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0412`. diff --git a/src/test/ui/tuple/tuple-struct-fields/test2.rs b/src/test/ui/tuple/tuple-struct-fields/test2.rs deleted file mode 100644 index 2b2a2c127..000000000 --- a/src/test/ui/tuple/tuple-struct-fields/test2.rs +++ /dev/null @@ -1,15 +0,0 @@ -macro_rules! define_struct { - ($t:ty) => { - struct S1(pub $t); - struct S2(pub (in foo) ()); - struct S3(pub $t ()); - //~^ ERROR expected one of `)` or `,`, found `(` - } -} - -mod foo { - define_struct! { (foo) } //~ ERROR cannot find type `foo` in this scope - //~| ERROR cannot find type `foo` in this scope -} - -fn main() {} diff --git a/src/test/ui/tuple/tuple-struct-fields/test2.stderr b/src/test/ui/tuple/tuple-struct-fields/test2.stderr deleted file mode 100644 index 64a9ac135..000000000 --- a/src/test/ui/tuple/tuple-struct-fields/test2.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error: expected one of `)` or `,`, found `(` - --> $DIR/test2.rs:5:26 - | -LL | struct S3(pub $t ()); - | -^ expected one of `)` or `,` - | | - | help: missing `,` -... -LL | define_struct! { (foo) } - | ------------------------ in this macro invocation - | - = note: this error originates in the macro `define_struct` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0412]: cannot find type `foo` in this scope - --> $DIR/test2.rs:11:23 - | -LL | define_struct! { (foo) } - | ^^^ not found in this scope - -error[E0412]: cannot find type `foo` in this scope - --> $DIR/test2.rs:11:23 - | -LL | define_struct! { (foo) } - | ^^^ not found in this scope - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0412`. diff --git a/src/test/ui/tuple/tuple-struct-fields/test3.rs b/src/test/ui/tuple/tuple-struct-fields/test3.rs deleted file mode 100644 index 98d19426e..000000000 --- a/src/test/ui/tuple/tuple-struct-fields/test3.rs +++ /dev/null @@ -1,15 +0,0 @@ -macro_rules! define_struct { - ($t:ty) => { - struct S1(pub($t)); - struct S2(pub (in foo) ()); - struct S3(pub($t) ()); - //~^ ERROR expected one of `)` or `,`, found `(` - } -} - -mod foo { - define_struct! { foo } //~ ERROR cannot find type `foo` in this scope - //~| ERROR cannot find type `foo` in this scope -} - -fn main() {} diff --git a/src/test/ui/tuple/tuple-struct-fields/test3.stderr b/src/test/ui/tuple/tuple-struct-fields/test3.stderr deleted file mode 100644 index 75262ed57..000000000 --- a/src/test/ui/tuple/tuple-struct-fields/test3.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error: expected one of `)` or `,`, found `(` - --> $DIR/test3.rs:5:27 - | -LL | struct S3(pub($t) ()); - | -^ expected one of `)` or `,` - | | - | help: missing `,` -... -LL | define_struct! { foo } - | ---------------------- in this macro invocation - | - = note: this error originates in the macro `define_struct` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0412]: cannot find type `foo` in this scope - --> $DIR/test3.rs:11:22 - | -LL | define_struct! { foo } - | ^^^ not found in this scope - -error[E0412]: cannot find type `foo` in this scope - --> $DIR/test3.rs:11:22 - | -LL | define_struct! { foo } - | ^^^ not found in this scope - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0412`. diff --git a/src/test/ui/tuple/wrong_argument_ice-2.rs b/src/test/ui/tuple/wrong_argument_ice-2.rs deleted file mode 100644 index b0f814616..000000000 --- a/src/test/ui/tuple/wrong_argument_ice-2.rs +++ /dev/null @@ -1,17 +0,0 @@ -fn test(t: (i32, i32)) {} - -struct Foo; - -impl Foo { - fn qux(&self) -> i32 { - 0 - } -} - -fn bar() { - let x = Foo; - test(x.qux(), x.qux()); - //~^ ERROR this function takes 1 argument but 2 arguments were supplied -} - -fn main() {} diff --git a/src/test/ui/tuple/wrong_argument_ice-2.stderr b/src/test/ui/tuple/wrong_argument_ice-2.stderr deleted file mode 100644 index 0c2a4c414..000000000 --- a/src/test/ui/tuple/wrong_argument_ice-2.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0061]: this function takes 1 argument but 2 arguments were supplied - --> $DIR/wrong_argument_ice-2.rs:13:5 - | -LL | test(x.qux(), x.qux()); - | ^^^^ - | -note: function defined here - --> $DIR/wrong_argument_ice-2.rs:1:4 - | -LL | fn test(t: (i32, i32)) {} - | ^^^^ ------------- -help: wrap these arguments in parentheses to construct a tuple - | -LL | test((x.qux(), x.qux())); - | + + - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0061`. diff --git a/src/test/ui/tuple/wrong_argument_ice-3.rs b/src/test/ui/tuple/wrong_argument_ice-3.rs deleted file mode 100644 index 951687c37..000000000 --- a/src/test/ui/tuple/wrong_argument_ice-3.rs +++ /dev/null @@ -1,17 +0,0 @@ -struct Process; - -pub type Group = (Vec, Vec); - -fn test(process: &Process, groups: Vec) -> Vec { - let new_group = vec![String::new()]; - - if groups.capacity() == 0 { - groups.push(new_group, vec![process]); - //~^ ERROR this function takes 1 argument but 2 arguments were supplied - return groups; - } - - todo!() -} - -fn main() {} diff --git a/src/test/ui/tuple/wrong_argument_ice-3.stderr b/src/test/ui/tuple/wrong_argument_ice-3.stderr deleted file mode 100644 index f3a547fa2..000000000 --- a/src/test/ui/tuple/wrong_argument_ice-3.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0061]: this function takes 1 argument but 2 arguments were supplied - --> $DIR/wrong_argument_ice-3.rs:9:16 - | -LL | groups.push(new_group, vec![process]); - | ^^^^ ------------- argument of type `Vec<&Process>` unexpected - | -note: expected tuple, found struct `Vec` - --> $DIR/wrong_argument_ice-3.rs:9:21 - | -LL | groups.push(new_group, vec![process]); - | ^^^^^^^^^ - = note: expected tuple `(Vec, Vec)` - found struct `Vec` -note: associated function defined here - --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL - | -LL | pub fn push(&mut self, value: T) { - | ^^^^ -help: remove the extra argument - | -LL | groups.push(/* (Vec, Vec) */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0061`. diff --git a/src/test/ui/tuple/wrong_argument_ice-4.rs b/src/test/ui/tuple/wrong_argument_ice-4.rs deleted file mode 100644 index 479bd0d81..000000000 --- a/src/test/ui/tuple/wrong_argument_ice-4.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - (|| {})(|| { - //~^ ERROR this function takes 0 arguments but 1 argument was supplied - let b = 1; - }); -} diff --git a/src/test/ui/tuple/wrong_argument_ice-4.stderr b/src/test/ui/tuple/wrong_argument_ice-4.stderr deleted file mode 100644 index a2686ab94..000000000 --- a/src/test/ui/tuple/wrong_argument_ice-4.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0057]: this function takes 0 arguments but 1 argument was supplied - --> $DIR/wrong_argument_ice-4.rs:2:5 - | -LL | (|| {})(|| { - | _____^^^^^^^_- -LL | | -LL | | let b = 1; -LL | | }); - | |_____- argument of type `[closure@$DIR/wrong_argument_ice-4.rs:2:13: 2:15]` unexpected - | -note: closure defined here - --> $DIR/wrong_argument_ice-4.rs:2:6 - | -LL | (|| {})(|| { - | ^^ -help: remove the extra argument - | -LL | (|| {})(); - | ~~ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0057`. diff --git a/src/test/ui/tuple/wrong_argument_ice.rs b/src/test/ui/tuple/wrong_argument_ice.rs deleted file mode 100644 index da967d8c1..000000000 --- a/src/test/ui/tuple/wrong_argument_ice.rs +++ /dev/null @@ -1,17 +0,0 @@ -use std::collections::VecDeque; - -pub struct BuildPlanBuilder { - acc: VecDeque<(String, String)>, - current_provides: String, - current_requires: String, -} - -impl BuildPlanBuilder { - pub fn or(&mut self) -> &mut Self { - self.acc.push_back(self.current_provides, self.current_requires); - //~^ ERROR this function takes 1 argument but 2 arguments were supplied - self - } -} - -fn main() {} diff --git a/src/test/ui/tuple/wrong_argument_ice.stderr b/src/test/ui/tuple/wrong_argument_ice.stderr deleted file mode 100644 index ec07f1e70..000000000 --- a/src/test/ui/tuple/wrong_argument_ice.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0061]: this function takes 1 argument but 2 arguments were supplied - --> $DIR/wrong_argument_ice.rs:11:18 - | -LL | self.acc.push_back(self.current_provides, self.current_requires); - | ^^^^^^^^^ - | -note: associated function defined here - --> $SRC_DIR/alloc/src/collections/vec_deque/mod.rs:LL:COL - | -LL | pub fn push_back(&mut self, value: T) { - | ^^^^^^^^^ -help: wrap these arguments in parentheses to construct a tuple - | -LL | self.acc.push_back((self.current_provides, self.current_requires)); - | + + - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0061`. -- cgit v1.2.3