From fc934618c294c17b1574164d65aab1dc695bd6c8 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 30 May 2022 11:37:37 -0700 Subject: [PATCH] fix typo --- .../rustc_typeck/src/check/fn_ctxt/checks.rs | 6 ++--- src/test/ui/argument-suggestions/basic.stderr | 10 ++++---- .../argument-suggestions/mixed_cases.stderr | 8 +++---- .../permuted_arguments.stderr | 16 ++++++------- .../swapped_arguments.stderr | 24 +++++++++---------- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs index 35a658596ef..d4dacb1970a 100644 --- a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs +++ b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs @@ -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() }; diff --git a/src/test/ui/argument-suggestions/basic.stderr b/src/test/ui/argument-suggestions/basic.stderr index 8300a22c548..b44e77b43f8 100644 --- a/src/test/ui/argument-suggestions/basic.stderr +++ b/src/test/ui/argument-suggestions/basic.stderr @@ -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 diff --git a/src/test/ui/argument-suggestions/mixed_cases.stderr b/src/test/ui/argument-suggestions/mixed_cases.stderr index 61da02f5837..78765335c02 100644 --- a/src/test/ui/argument-suggestions/mixed_cases.stderr +++ b/src/test/ui/argument-suggestions/mixed_cases.stderr @@ -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 diff --git a/src/test/ui/argument-suggestions/permuted_arguments.stderr b/src/test/ui/argument-suggestions/permuted_arguments.stderr index 52890f4e6a5..f16d22860d8 100644 --- a/src/test/ui/argument-suggestions/permuted_arguments.stderr +++ b/src/test/ui/argument-suggestions/permuted_arguments.stderr @@ -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 diff --git a/src/test/ui/argument-suggestions/swapped_arguments.stderr b/src/test/ui/argument-suggestions/swapped_arguments.stderr index 672f0d5bb56..a90792d0c53 100644 --- a/src/test/ui/argument-suggestions/swapped_arguments.stderr +++ b/src/test/ui/argument-suggestions/swapped_arguments.stderr @@ -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