Skip to content

Commit 245096b

Browse files
committed
Added comment to
`tests/ui/mismatched_types/assignment-mismatch-various-types.rs` merge `tests/ui/mismatched_types/main.rs`
1 parent 07b1dad commit 245096b

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
//! regression test for <https://github.com/rust-lang/rust/issues/3477>
2+
13
fn main() {
4+
let x: u32 = ();
5+
//~^ ERROR mismatched types
6+
27
let _p: char = 100;
38
//~^ ERROR mismatched types
4-
//~| NOTE expected `char`, found `u8`
5-
//~| NOTE expected due to this
69
}
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
error[E0308]: mismatched types
2-
--> $DIR/issue-3477.rs:2:20
2+
--> $DIR/assignment-mismatch-various-types.rs:4:18
3+
|
4+
LL | let x: u32 = ();
5+
| --- ^^ expected `u32`, found `()`
6+
| |
7+
| expected due to this
8+
9+
error[E0308]: mismatched types
10+
--> $DIR/assignment-mismatch-various-types.rs:7:20
311
|
412
LL | let _p: char = 100;
513
| ---- ^^^ expected `char`, found `u8`
614
| |
715
| expected due to this
816

9-
error: aborting due to 1 previous error
17+
error: aborting due to 2 previous errors
1018

1119
For more information about this error, try `rustc --explain E0308`.

tests/ui/mismatched_types/main.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/ui/mismatched_types/main.stderr

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)