1
Fork 0
This commit is contained in:
Michael Goulet 2022-05-30 11:37:37 -07:00
parent 6c9bd8db9a
commit fc934618c2
5 changed files with 32 additions and 32 deletions

View file

@ -867,7 +867,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let first_expected_ty =
self.resolve_vars_if_possible(expected_input_tys[arg_idx]);
let first_provided_ty = if let Some((ty, _)) = final_arg_types[input_idx] {
format!(",found `{}`", ty)
format!(", found `{}`", ty)
} else {
String::new()
};
@ -879,7 +879,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
self.resolve_vars_if_possible(expected_input_tys[other_arg_idx]);
let other_provided_ty =
if let Some((ty, _)) = final_arg_types[other_input_idx] {
format!(",found `{}`", ty)
format!(", found `{}`", ty)
} else {
String::new()
};
@ -897,7 +897,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let expected_ty =
self.resolve_vars_if_possible(expected_input_tys[dst_arg]);
let provided_ty = if let Some((ty, _)) = final_arg_types[dest_input] {
format!(",found `{}`", ty)
format!(", found `{}`", ty)
} else {
String::new()
};

View file

@ -48,9 +48,9 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/basic.rs:23:5
|
LL | swapped("", 1);
| ^^^^^^^ -- - expected `&str`,found `{integer}`
| ^^^^^^^ -- - expected `&str`, found `{integer}`
| |
| expected `u32`,found `&'static str`
| expected `u32`, found `&'static str`
|
note: function defined here
--> $DIR/basic.rs:16:4
@ -66,10 +66,10 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/basic.rs:24:5
|
LL | permuted(Y {}, Z {}, X {});
| ^^^^^^^^ ---- ---- ---- expected `Z`,found `X`
| ^^^^^^^^ ---- ---- ---- expected `Z`, found `X`
| | |
| | expected `Y`,found `Z`
| expected `X`,found `Y`
| | expected `Y`, found `Z`
| expected `X`, found `Y`
|
note: function defined here
--> $DIR/basic.rs:17:4

View file

@ -76,10 +76,10 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/mixed_cases.rs:20:3
|
LL | three_args("", X {}, 1);
| ^^^^^^^^^^ -- ---- - expected `&str`,found `{integer}`
| ^^^^^^^^^^ -- ---- - expected `&str`, found `{integer}`
| | |
| | expected `f32`, found struct `X`
| expected `i32`,found `&'static str`
| expected `i32`, found `&'static str`
|
note: function defined here
--> $DIR/mixed_cases.rs:6:4
@ -98,8 +98,8 @@ LL | three_args("", 1);
| ^^^^^^^^^^ -- -
| | |
| | an argument of type `f32` is missing
| | expected `&str`,found `{integer}`
| expected `i32`,found `&'static str`
| | expected `&str`, found `{integer}`
| expected `i32`, found `&'static str`
|
note: function defined here
--> $DIR/mixed_cases.rs:6:4

View file

@ -2,10 +2,10 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/permuted_arguments.rs:10:3
|
LL | three_args(1.0, "", 1);
| ^^^^^^^^^^ --- -- - expected `&str`,found `{integer}`
| ^^^^^^^^^^ --- -- - expected `&str`, found `{integer}`
| | |
| | expected `f32`,found `&'static str`
| expected `i32`,found `{float}`
| | expected `f32`, found `&'static str`
| expected `i32`, found `{float}`
|
note: function defined here
--> $DIR/permuted_arguments.rs:5:4
@ -21,12 +21,12 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/permuted_arguments.rs:12:3
|
LL | many_args(X {}, Y {}, 1, 1.0, "");
| ^^^^^^^^^ ---- ---- - --- -- expected `Y`,found `&'static str`
| ^^^^^^^^^ ---- ---- - --- -- expected `Y`, found `&'static str`
| | | | |
| | | | expected `X`,found `{float}`
| | | expected `&str`,found `{integer}`
| | expected `f32`,found `Y`
| expected `i32`,found `X`
| | | | expected `X`, found `{float}`
| | | expected `&str`, found `{integer}`
| | expected `f32`, found `Y`
| expected `i32`, found `X`
|
note: function defined here
--> $DIR/permuted_arguments.rs:6:4

View file

@ -2,9 +2,9 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/swapped_arguments.rs:8:3
|
LL | two_args(1.0, 1);
| ^^^^^^^^ --- - expected `f32`,found `{integer}`
| ^^^^^^^^ --- - expected `f32`, found `{integer}`
| |
| expected `i32`,found `{float}`
| expected `i32`, found `{float}`
|
note: function defined here
--> $DIR/swapped_arguments.rs:3:4
@ -20,9 +20,9 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/swapped_arguments.rs:9:3
|
LL | three_args(1.0, 1, "");
| ^^^^^^^^^^ --- - expected `f32`,found `{integer}`
| ^^^^^^^^^^ --- - expected `f32`, found `{integer}`
| |
| expected `i32`,found `{float}`
| expected `i32`, found `{float}`
|
note: function defined here
--> $DIR/swapped_arguments.rs:4:4
@ -38,9 +38,9 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/swapped_arguments.rs:10:3
|
LL | three_args( 1, "", 1.0);
| ^^^^^^^^^^ -- --- expected `&str`,found `{float}`
| ^^^^^^^^^^ -- --- expected `&str`, found `{float}`
| |
| expected `f32`,found `&'static str`
| expected `f32`, found `&'static str`
|
note: function defined here
--> $DIR/swapped_arguments.rs:4:4
@ -56,9 +56,9 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/swapped_arguments.rs:11:3
|
LL | three_args( "", 1.0, 1);
| ^^^^^^^^^^ -- - expected `&str`,found `{integer}`
| ^^^^^^^^^^ -- - expected `&str`, found `{integer}`
| |
| expected `i32`,found `&'static str`
| expected `i32`, found `&'static str`
|
note: function defined here
--> $DIR/swapped_arguments.rs:4:4
@ -74,11 +74,11 @@ error[E0308]: arguments to this function are incorrect
--> $DIR/swapped_arguments.rs:13:3
|
LL | four_args(1.0, 1, X {}, "");
| ^^^^^^^^^ --- - ---- -- expected `X`,found `&'static str`
| ^^^^^^^^^ --- - ---- -- expected `X`, found `&'static str`
| | | |
| | | expected `&str`,found `X`
| | expected `f32`,found `{integer}`
| expected `i32`,found `{float}`
| | | expected `&str`, found `X`
| | expected `f32`, found `{integer}`
| expected `i32`, found `{float}`
|
note: function defined here
--> $DIR/swapped_arguments.rs:5:4