Add explanatory comment to the issue-84976.rs test case

This commit is contained in:
Fabian Wolff 2021-05-11 21:51:58 +02:00
parent f740923b8c
commit 69a4ae2030
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
/* Checks whether primitive type names are formatted correctly in the
* error messages about mismatched types (#84976).
*/
fn foo(length: &u32) -> i32 {
0
}

View File

@ -1,23 +1,23 @@
error[E0308]: mismatched types
--> $DIR/issue-84976.rs:11:16
--> $DIR/issue-84976.rs:15:16
|
LL | length = { foo(&length) };
| ^^^^^^^^^^^^ expected `u32`, found `i32`
error[E0308]: mismatched types
--> $DIR/issue-84976.rs:13:14
--> $DIR/issue-84976.rs:17:14
|
LL | length = foo(&length);
| ^^^^^^^^^^^^ expected `u32`, found `i32`
error[E0308]: mismatched types
--> $DIR/issue-84976.rs:17:22
--> $DIR/issue-84976.rs:21:22
|
LL | float_length = { bar(&float_length) };
| ^^^^^^^^^^^^^^^^^^ expected `f32`, found `f64`
error[E0308]: mismatched types
--> $DIR/issue-84976.rs:19:20
--> $DIR/issue-84976.rs:23:20
|
LL | float_length = bar(&float_length);
| ^^^^^^^^^^^^^^^^^^ expected `f32`, found `f64`