Skip to content

Commit fc93461

Browse files
fix typo
1 parent 6c9bd8d commit fc93461

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

compiler/rustc_typeck/src/check/fn_ctxt/checks.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
867867
let first_expected_ty =
868868
self.resolve_vars_if_possible(expected_input_tys[arg_idx]);
869869
let first_provided_ty = if let Some((ty, _)) = final_arg_types[input_idx] {
870-
format!(",found `{}`", ty)
870+
format!(", found `{}`", ty)
871871
} else {
872872
String::new()
873873
};
@@ -879,7 +879,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
879879
self.resolve_vars_if_possible(expected_input_tys[other_arg_idx]);
880880
let other_provided_ty =
881881
if let Some((ty, _)) = final_arg_types[other_input_idx] {
882-
format!(",found `{}`", ty)
882+
format!(", found `{}`", ty)
883883
} else {
884884
String::new()
885885
};
@@ -897,7 +897,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
897897
let expected_ty =
898898
self.resolve_vars_if_possible(expected_input_tys[dst_arg]);
899899
let provided_ty = if let Some((ty, _)) = final_arg_types[dest_input] {
900-
format!(",found `{}`", ty)
900+
format!(", found `{}`", ty)
901901
} else {
902902
String::new()
903903
};

src/test/ui/argument-suggestions/basic.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ error[E0308]: arguments to this function are incorrect
4848
--> $DIR/basic.rs:23:5
4949
|
5050
LL | swapped("", 1);
51-
| ^^^^^^^ -- - expected `&str`,found `{integer}`
51+
| ^^^^^^^ -- - expected `&str`, found `{integer}`
5252
| |
53-
| expected `u32`,found `&'static str`
53+
| expected `u32`, found `&'static str`
5454
|
5555
note: function defined here
5656
--> $DIR/basic.rs:16:4
@@ -66,10 +66,10 @@ error[E0308]: arguments to this function are incorrect
6666
--> $DIR/basic.rs:24:5
6767
|
6868
LL | permuted(Y {}, Z {}, X {});
69-
| ^^^^^^^^ ---- ---- ---- expected `Z`,found `X`
69+
| ^^^^^^^^ ---- ---- ---- expected `Z`, found `X`
7070
| | |
71-
| | expected `Y`,found `Z`
72-
| expected `X`,found `Y`
71+
| | expected `Y`, found `Z`
72+
| expected `X`, found `Y`
7373
|
7474
note: function defined here
7575
--> $DIR/basic.rs:17:4

src/test/ui/argument-suggestions/mixed_cases.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ error[E0308]: arguments to this function are incorrect
7676
--> $DIR/mixed_cases.rs:20:3
7777
|
7878
LL | three_args("", X {}, 1);
79-
| ^^^^^^^^^^ -- ---- - expected `&str`,found `{integer}`
79+
| ^^^^^^^^^^ -- ---- - expected `&str`, found `{integer}`
8080
| | |
8181
| | expected `f32`, found struct `X`
82-
| expected `i32`,found `&'static str`
82+
| expected `i32`, found `&'static str`
8383
|
8484
note: function defined here
8585
--> $DIR/mixed_cases.rs:6:4
@@ -98,8 +98,8 @@ LL | three_args("", 1);
9898
| ^^^^^^^^^^ -- -
9999
| | |
100100
| | an argument of type `f32` is missing
101-
| | expected `&str`,found `{integer}`
102-
| expected `i32`,found `&'static str`
101+
| | expected `&str`, found `{integer}`
102+
| expected `i32`, found `&'static str`
103103
|
104104
note: function defined here
105105
--> $DIR/mixed_cases.rs:6:4

src/test/ui/argument-suggestions/permuted_arguments.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ error[E0308]: arguments to this function are incorrect
22
--> $DIR/permuted_arguments.rs:10:3
33
|
44
LL | three_args(1.0, "", 1);
5-
| ^^^^^^^^^^ --- -- - expected `&str`,found `{integer}`
5+
| ^^^^^^^^^^ --- -- - expected `&str`, found `{integer}`
66
| | |
7-
| | expected `f32`,found `&'static str`
8-
| expected `i32`,found `{float}`
7+
| | expected `f32`, found `&'static str`
8+
| expected `i32`, found `{float}`
99
|
1010
note: function defined here
1111
--> $DIR/permuted_arguments.rs:5:4
@@ -21,12 +21,12 @@ error[E0308]: arguments to this function are incorrect
2121
--> $DIR/permuted_arguments.rs:12:3
2222
|
2323
LL | many_args(X {}, Y {}, 1, 1.0, "");
24-
| ^^^^^^^^^ ---- ---- - --- -- expected `Y`,found `&'static str`
24+
| ^^^^^^^^^ ---- ---- - --- -- expected `Y`, found `&'static str`
2525
| | | | |
26-
| | | | expected `X`,found `{float}`
27-
| | | expected `&str`,found `{integer}`
28-
| | expected `f32`,found `Y`
29-
| expected `i32`,found `X`
26+
| | | | expected `X`, found `{float}`
27+
| | | expected `&str`, found `{integer}`
28+
| | expected `f32`, found `Y`
29+
| expected `i32`, found `X`
3030
|
3131
note: function defined here
3232
--> $DIR/permuted_arguments.rs:6:4

src/test/ui/argument-suggestions/swapped_arguments.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ error[E0308]: arguments to this function are incorrect
22
--> $DIR/swapped_arguments.rs:8:3
33
|
44
LL | two_args(1.0, 1);
5-
| ^^^^^^^^ --- - expected `f32`,found `{integer}`
5+
| ^^^^^^^^ --- - expected `f32`, found `{integer}`
66
| |
7-
| expected `i32`,found `{float}`
7+
| expected `i32`, found `{float}`
88
|
99
note: function defined here
1010
--> $DIR/swapped_arguments.rs:3:4
@@ -20,9 +20,9 @@ error[E0308]: arguments to this function are incorrect
2020
--> $DIR/swapped_arguments.rs:9:3
2121
|
2222
LL | three_args(1.0, 1, "");
23-
| ^^^^^^^^^^ --- - expected `f32`,found `{integer}`
23+
| ^^^^^^^^^^ --- - expected `f32`, found `{integer}`
2424
| |
25-
| expected `i32`,found `{float}`
25+
| expected `i32`, found `{float}`
2626
|
2727
note: function defined here
2828
--> $DIR/swapped_arguments.rs:4:4
@@ -38,9 +38,9 @@ error[E0308]: arguments to this function are incorrect
3838
--> $DIR/swapped_arguments.rs:10:3
3939
|
4040
LL | three_args( 1, "", 1.0);
41-
| ^^^^^^^^^^ -- --- expected `&str`,found `{float}`
41+
| ^^^^^^^^^^ -- --- expected `&str`, found `{float}`
4242
| |
43-
| expected `f32`,found `&'static str`
43+
| expected `f32`, found `&'static str`
4444
|
4545
note: function defined here
4646
--> $DIR/swapped_arguments.rs:4:4
@@ -56,9 +56,9 @@ error[E0308]: arguments to this function are incorrect
5656
--> $DIR/swapped_arguments.rs:11:3
5757
|
5858
LL | three_args( "", 1.0, 1);
59-
| ^^^^^^^^^^ -- - expected `&str`,found `{integer}`
59+
| ^^^^^^^^^^ -- - expected `&str`, found `{integer}`
6060
| |
61-
| expected `i32`,found `&'static str`
61+
| expected `i32`, found `&'static str`
6262
|
6363
note: function defined here
6464
--> $DIR/swapped_arguments.rs:4:4
@@ -74,11 +74,11 @@ error[E0308]: arguments to this function are incorrect
7474
--> $DIR/swapped_arguments.rs:13:3
7575
|
7676
LL | four_args(1.0, 1, X {}, "");
77-
| ^^^^^^^^^ --- - ---- -- expected `X`,found `&'static str`
77+
| ^^^^^^^^^ --- - ---- -- expected `X`, found `&'static str`
7878
| | | |
79-
| | | expected `&str`,found `X`
80-
| | expected `f32`,found `{integer}`
81-
| expected `i32`,found `{float}`
79+
| | | expected `&str`, found `X`
80+
| | expected `f32`, found `{integer}`
81+
| expected `i32`, found `{float}`
8282
|
8383
note: function defined here
8484
--> $DIR/swapped_arguments.rs:5:4

0 commit comments

Comments
 (0)