Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions tests/ui/issues/issue-3477.rs

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/issues/issue-3477.stderr

This file was deleted.

7 changes: 0 additions & 7 deletions tests/ui/issues/issue-4935.rs

This file was deleted.

20 changes: 0 additions & 20 deletions tests/ui/issues/issue-4935.stderr

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ui/issues/issue-5062.rs

This file was deleted.

14 changes: 0 additions & 14 deletions tests/ui/issues/issue-5062.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//! regression test for <https://github.com/rust-lang/rust/issues/3477>

fn main() {
let x: u32 = ();
//~^ ERROR mismatched types

let _p: char = 100;
//~^ ERROR mismatched types
}
19 changes: 19 additions & 0 deletions tests/ui/mismatched_types/assignment-mismatch-various-types.stderr
Original file line number Diff line number Diff line change
@@ -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`.
4 changes: 0 additions & 4 deletions tests/ui/mismatched_types/main.rs

This file was deleted.

13 changes: 0 additions & 13 deletions tests/ui/mismatched_types/main.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for <https://github.com/rust-lang/rust/issues/3109>
//@ run-pass
pub fn main() {
println!("{:?}", ("hi there!", "you"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! regression test for <https://github.com/rust-lang/rust/issues/51874>

fn main() {
let a = (1.0).pow(1.0); //~ ERROR can't call method `pow` on ambiguous numeric type
}
Original file line number Diff line number Diff line change
@@ -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);
| ^^^
Expand Down
4 changes: 4 additions & 0 deletions tests/ui/type-inference/type-inference-unconstrained-none.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/5062>.

fn foo() {
format!("{:?}", None); //~ ERROR type annotations needed [E0282]
}

fn main() {
None; //~ ERROR type annotations needed [E0282]
}
15 changes: 13 additions & 2 deletions tests/ui/type-inference/type-inference-unconstrained-none.stderr
Original file line number Diff line number Diff line change
@@ -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::<T>);
| +++++

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`
Expand All @@ -9,6 +20,6 @@ help: consider specifying the generic argument
LL | None::<T>;
| +++++

error: aborting due to 1 previous error
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0282`.
Loading