diff --git a/tests/ui/issues/issue-3477.rs b/tests/ui/issues/issue-3477.rs deleted file mode 100644 index eb94294d5a877..0000000000000 --- a/tests/ui/issues/issue-3477.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - let _p: char = 100; - //~^ ERROR mismatched types - //~| NOTE expected `char`, found `u8` - //~| NOTE expected due to this -} diff --git a/tests/ui/issues/issue-3477.stderr b/tests/ui/issues/issue-3477.stderr deleted file mode 100644 index 2a4d6d2449ed4..0000000000000 --- a/tests/ui/issues/issue-3477.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/issue-3477.rs:2:20 - | -LL | let _p: char = 100; - | ---- ^^^ expected `char`, found `u8` - | | - | expected due to this - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/issues/issue-4935.rs b/tests/ui/issues/issue-4935.rs deleted file mode 100644 index ef8a3eb32abbe..0000000000000 --- a/tests/ui/issues/issue-4935.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Regression test for issue #4935 - -fn foo(a: usize) {} -//~^ NOTE defined here -fn main() { foo(5, 6) } -//~^ ERROR function takes 1 argument but 2 arguments were supplied -//~| NOTE unexpected argument #2 of type `{integer}` diff --git a/tests/ui/issues/issue-4935.stderr b/tests/ui/issues/issue-4935.stderr deleted file mode 100644 index 918f74256c034..0000000000000 --- a/tests/ui/issues/issue-4935.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0061]: this function takes 1 argument but 2 arguments were supplied - --> $DIR/issue-4935.rs:5:13 - | -LL | fn main() { foo(5, 6) } - | ^^^ - unexpected argument #2 of type `{integer}` - | -note: function defined here - --> $DIR/issue-4935.rs:3:4 - | -LL | fn foo(a: usize) {} - | ^^^ -help: remove the extra argument - | -LL - fn main() { foo(5, 6) } -LL + fn main() { foo(5) } - | - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0061`. diff --git a/tests/ui/issues/issue-5062.rs b/tests/ui/issues/issue-5062.rs deleted file mode 100644 index 2db0a8e25b462..0000000000000 --- a/tests/ui/issues/issue-5062.rs +++ /dev/null @@ -1,2 +0,0 @@ -fn main() { format!("{:?}", None); } - //~^ ERROR type annotations needed [E0282] diff --git a/tests/ui/issues/issue-5062.stderr b/tests/ui/issues/issue-5062.stderr deleted file mode 100644 index 0839ece79aaff..0000000000000 --- a/tests/ui/issues/issue-5062.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0282]: type annotations needed - --> $DIR/issue-5062.rs:1:29 - | -LL | fn main() { format!("{:?}", None); } - | ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option` - | -help: consider specifying the generic argument - | -LL | fn main() { format!("{:?}", None::); } - | +++++ - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/mismatched_types/assignment-mismatch-various-types.rs b/tests/ui/mismatched_types/assignment-mismatch-various-types.rs new file mode 100644 index 0000000000000..903bfd9756f01 --- /dev/null +++ b/tests/ui/mismatched_types/assignment-mismatch-various-types.rs @@ -0,0 +1,9 @@ +//! regression test for + +fn main() { + let x: u32 = (); + //~^ ERROR mismatched types + + let _p: char = 100; + //~^ ERROR mismatched types +} diff --git a/tests/ui/mismatched_types/assignment-mismatch-various-types.stderr b/tests/ui/mismatched_types/assignment-mismatch-various-types.stderr new file mode 100644 index 0000000000000..14356fe16d3d8 --- /dev/null +++ b/tests/ui/mismatched_types/assignment-mismatch-various-types.stderr @@ -0,0 +1,19 @@ +error[E0308]: mismatched types + --> $DIR/assignment-mismatch-various-types.rs:4:18 + | +LL | let x: u32 = (); + | --- ^^ expected `u32`, found `()` + | | + | expected due to this + +error[E0308]: mismatched types + --> $DIR/assignment-mismatch-various-types.rs:7:20 + | +LL | let _p: char = 100; + | ---- ^^^ expected `char`, found `u8` + | | + | expected due to this + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/mismatched_types/main.rs b/tests/ui/mismatched_types/main.rs deleted file mode 100644 index e2d09dc219922..0000000000000 --- a/tests/ui/mismatched_types/main.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let x: u32 = ( //~ ERROR mismatched types - ); -} diff --git a/tests/ui/mismatched_types/main.stderr b/tests/ui/mismatched_types/main.stderr deleted file mode 100644 index 38146cef3475a..0000000000000 --- a/tests/ui/mismatched_types/main.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/main.rs:2:18 - | -LL | let x: u32 = ( - | ____________---___^ - | | | - | | expected due to this -LL | | ); - | |_____^ expected `u32`, found `()` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/issues/issue-3109.rs b/tests/ui/str/debug-print-basic-tuple.rs similarity index 51% rename from tests/ui/issues/issue-3109.rs rename to tests/ui/str/debug-print-basic-tuple.rs index 89beaa2222732..7e2b86f56293d 100644 --- a/tests/ui/issues/issue-3109.rs +++ b/tests/ui/str/debug-print-basic-tuple.rs @@ -1,3 +1,4 @@ +//! regression test for //@ run-pass pub fn main() { println!("{:?}", ("hi there!", "you")); diff --git a/tests/ui/issues/issue-51874.rs b/tests/ui/type-inference/ambiguous-num-type-method-call.rs similarity index 57% rename from tests/ui/issues/issue-51874.rs rename to tests/ui/type-inference/ambiguous-num-type-method-call.rs index d9d7e36b50e9b..ee3c95ba0843b 100644 --- a/tests/ui/issues/issue-51874.rs +++ b/tests/ui/type-inference/ambiguous-num-type-method-call.rs @@ -1,3 +1,5 @@ +//! regression test for + fn main() { let a = (1.0).pow(1.0); //~ ERROR can't call method `pow` on ambiguous numeric type } diff --git a/tests/ui/issues/issue-51874.stderr b/tests/ui/type-inference/ambiguous-num-type-method-call.stderr similarity index 88% rename from tests/ui/issues/issue-51874.stderr rename to tests/ui/type-inference/ambiguous-num-type-method-call.stderr index 5c9331b4e1e1a..3a808c06aef1c 100644 --- a/tests/ui/issues/issue-51874.stderr +++ b/tests/ui/type-inference/ambiguous-num-type-method-call.stderr @@ -1,5 +1,5 @@ error[E0689]: can't call method `pow` on ambiguous numeric type `{float}` - --> $DIR/issue-51874.rs:2:19 + --> $DIR/ambiguous-num-type-method-call.rs:4:19 | LL | let a = (1.0).pow(1.0); | ^^^ diff --git a/tests/ui/type-inference/type-inference-unconstrained-none.rs b/tests/ui/type-inference/type-inference-unconstrained-none.rs index 38a506763c761..5b24e866b5216 100644 --- a/tests/ui/type-inference/type-inference-unconstrained-none.rs +++ b/tests/ui/type-inference/type-inference-unconstrained-none.rs @@ -1,5 +1,9 @@ //! Regression test for . +fn foo() { + format!("{:?}", None); //~ ERROR type annotations needed [E0282] +} + fn main() { None; //~ ERROR type annotations needed [E0282] } diff --git a/tests/ui/type-inference/type-inference-unconstrained-none.stderr b/tests/ui/type-inference/type-inference-unconstrained-none.stderr index 80572b845e84f..54260c03b76a1 100644 --- a/tests/ui/type-inference/type-inference-unconstrained-none.stderr +++ b/tests/ui/type-inference/type-inference-unconstrained-none.stderr @@ -1,5 +1,16 @@ error[E0282]: type annotations needed - --> $DIR/type-inference-unconstrained-none.rs:4:5 + --> $DIR/type-inference-unconstrained-none.rs:4:21 + | +LL | format!("{:?}", None); + | ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option` + | +help: consider specifying the generic argument + | +LL | format!("{:?}", None::); + | +++++ + +error[E0282]: type annotations needed + --> $DIR/type-inference-unconstrained-none.rs:8:5 | LL | None; | ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option` @@ -9,6 +20,6 @@ help: consider specifying the generic argument LL | None::; | +++++ -error: aborting due to 1 previous error +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0282`.