From b0f3a551f2974eccf65b4477c9d7b2e42036d52f Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 2 Sep 2022 02:17:44 +0000 Subject: [PATCH] Shrink suggestion span of argument mismatch error --- .../rustc_typeck/src/check/fn_ctxt/checks.rs | 23 ++++++++--- src/test/ui/argument-suggestions/basic.stderr | 10 ++--- .../ui/argument-suggestions/complex.stderr | 2 +- .../argument-suggestions/exotic-calls.stderr | 8 ++-- .../extra_arguments.stderr | 28 +++++++------- .../argument-suggestions/issue-96638.stderr | 2 +- .../argument-suggestions/issue-97197.stderr | 2 +- .../argument-suggestions/issue-97484.stderr | 2 +- .../argument-suggestions/issue-98894.stderr | 2 +- .../argument-suggestions/issue-98897.stderr | 2 +- .../argument-suggestions/issue-99482.stderr | 2 +- .../missing_arguments.stderr | 38 +++++++++---------- .../argument-suggestions/mixed_cases.stderr | 12 +++--- .../permuted_arguments.stderr | 4 +- .../swapped_arguments.stderr | 10 ++--- src/test/ui/c-variadic/variadic-ffi-1.stderr | 4 +- src/test/ui/error-codes/E0057.stderr | 4 +- src/test/ui/error-codes/E0060.stderr | 2 +- src/test/ui/error-codes/E0061.stderr | 4 +- .../issue-58451.stderr | 2 +- src/test/ui/issues/issue-16939.stderr | 2 +- src/test/ui/issues/issue-18819.stderr | 2 +- src/test/ui/issues/issue-4935.stderr | 2 +- src/test/ui/lifetimes/issue-26638.stderr | 2 +- .../ui/methods/method-call-err-msg.stderr | 8 ++-- .../overloaded-calls-bad.stderr | 4 +- src/test/ui/not-enough-arguments.stderr | 4 +- .../resolve/resolve-primitive-fallback.stderr | 2 +- src/test/ui/span/issue-34264.stderr | 4 +- src/test/ui/span/missing-unit-argument.stderr | 12 +++--- .../args-instead-of-tuple-errors.stderr | 6 +-- .../suggestions/args-instead-of-tuple.stderr | 2 +- src/test/ui/tuple/wrong_argument_ice-3.stderr | 2 +- src/test/ui/tuple/wrong_argument_ice-4.stderr | 2 +- ...priority-higher-than-other-inherent.stderr | 2 +- ...e-ascription-instead-of-initializer.stderr | 2 +- .../ui/typeck/remove-extra-argument.stderr | 2 +- .../ui/typeck/struct-enum-wrong-args.stderr | 16 ++++---- 38 files changed, 125 insertions(+), 114 deletions(-) diff --git a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs index 7ff4aef2d25..ce0e59d0622 100644 --- a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs +++ b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs @@ -1056,11 +1056,22 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { }; if let Some(suggestion_text) = suggestion_text { let source_map = self.sess().source_map(); - let mut suggestion = format!( - "{}(", - source_map.span_to_snippet(full_call_span).unwrap_or_else(|_| fn_def_id - .map_or("".to_string(), |fn_def_id| tcx.item_name(fn_def_id).to_string())) - ); + let (mut suggestion, suggestion_span) = + if let Some(call_span) = full_call_span.find_ancestor_inside(error_span) { + ("(".to_string(), call_span.shrink_to_hi().to(error_span.shrink_to_hi())) + } else { + ( + format!( + "{}(", + source_map.span_to_snippet(full_call_span).unwrap_or_else(|_| { + fn_def_id.map_or("".to_string(), |fn_def_id| { + tcx.item_name(fn_def_id).to_string() + }) + }) + ), + error_span, + ) + }; let mut needs_comma = false; for (expected_idx, provided_idx) in matched_inputs.iter_enumerated() { if needs_comma { @@ -1088,7 +1099,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } suggestion += ")"; err.span_suggestion_verbose( - error_span, + suggestion_span, &suggestion_text, suggestion, Applicability::HasPlaceholders, diff --git a/src/test/ui/argument-suggestions/basic.stderr b/src/test/ui/argument-suggestions/basic.stderr index c495ad6b842..b118ce1bd0e 100644 --- a/src/test/ui/argument-suggestions/basic.stderr +++ b/src/test/ui/argument-suggestions/basic.stderr @@ -26,7 +26,7 @@ LL | fn extra() {} help: remove the extra argument | LL | extra(); - | ~~~~~~~ + | ~~ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/basic.rs:22:5 @@ -42,7 +42,7 @@ LL | fn missing(_i: u32) {} help: provide the argument | LL | missing(/* u32 */); - | ~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/basic.rs:23:5 @@ -60,7 +60,7 @@ LL | fn swapped(_i: u32, _s: &str) {} help: swap these arguments | LL | swapped(1, ""); - | ~~~~~~~~~~~~~~ + | ~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/basic.rs:24:5 @@ -79,7 +79,7 @@ LL | fn permuted(_x: X, _y: Y, _z: Z) {} help: reorder these arguments | LL | permuted(X {}, Y {}, Z {}); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error[E0057]: this function takes 1 argument but 0 arguments were supplied --> $DIR/basic.rs:27:5 @@ -95,7 +95,7 @@ LL | let closure = |x| x; help: provide the argument | LL | closure(/* value */); - | ~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/argument-suggestions/complex.stderr b/src/test/ui/argument-suggestions/complex.stderr index bf49e744458..205a852983a 100644 --- a/src/test/ui/argument-suggestions/complex.stderr +++ b/src/test/ui/argument-suggestions/complex.stderr @@ -12,7 +12,7 @@ LL | fn complex(_i: u32, _s: &str, _e: E, _f: F, _g: G, _x: X, _y: Y, _z: Z ) {} help: did you mean | LL | complex(/* u32 */, &"", /* E */, F::X2, G{}, X {}, Y {}, Z {}); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/argument-suggestions/exotic-calls.stderr b/src/test/ui/argument-suggestions/exotic-calls.stderr index ca93ecc4e38..0580e53c510 100644 --- a/src/test/ui/argument-suggestions/exotic-calls.stderr +++ b/src/test/ui/argument-suggestions/exotic-calls.stderr @@ -12,7 +12,7 @@ LL | fn foo(t: T) { help: remove the extra argument | LL | t(); - | ~~~ + | ~~ error[E0057]: this function takes 0 arguments but 1 argument was supplied --> $DIR/exotic-calls.rs:7:5 @@ -28,7 +28,7 @@ LL | fn bar(t: impl Fn()) { help: remove the extra argument | LL | t(); - | ~~~ + | ~~ error[E0057]: this function takes 0 arguments but 1 argument was supplied --> $DIR/exotic-calls.rs:16:5 @@ -44,7 +44,7 @@ LL | fn baz() -> impl Fn() { help: remove the extra argument | LL | baz()() - | + | ~~ error[E0057]: this function takes 0 arguments but 1 argument was supplied --> $DIR/exotic-calls.rs:22:5 @@ -60,7 +60,7 @@ LL | let x = || {}; help: remove the extra argument | LL | x(); - | ~~~ + | ~~ error: aborting due to 4 previous errors diff --git a/src/test/ui/argument-suggestions/extra_arguments.stderr b/src/test/ui/argument-suggestions/extra_arguments.stderr index 32b1e15737a..48787b0c352 100644 --- a/src/test/ui/argument-suggestions/extra_arguments.stderr +++ b/src/test/ui/argument-suggestions/extra_arguments.stderr @@ -12,7 +12,7 @@ LL | fn empty() {} help: remove the extra argument | LL | empty(); - | ~~~~~~~ + | ~~ error[E0061]: this function takes 1 argument but 2 arguments were supplied --> $DIR/extra_arguments.rs:9:3 @@ -28,7 +28,7 @@ LL | fn one_arg(_a: i32) {} help: remove the extra argument | LL | one_arg(1); - | ~~~~~~~~~~ + | ~~~ error[E0061]: this function takes 1 argument but 2 arguments were supplied --> $DIR/extra_arguments.rs:10:3 @@ -44,7 +44,7 @@ LL | fn one_arg(_a: i32) {} help: remove the extra argument | LL | one_arg(1); - | ~~~~~~~~~~ + | ~~~ error[E0061]: this function takes 1 argument but 3 arguments were supplied --> $DIR/extra_arguments.rs:11:3 @@ -62,7 +62,7 @@ LL | fn one_arg(_a: i32) {} help: remove the extra arguments | LL | one_arg(1); - | ~~~~~~~~~~ + | ~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:13:3 @@ -78,7 +78,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {} help: remove the extra argument | LL | two_arg_same(1, 1); - | ~~~~~~~~~~~~~~~~~~ + | ~~~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:14:3 @@ -94,7 +94,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {} help: remove the extra argument | LL | two_arg_same(1, 1); - | ~~~~~~~~~~~~~~~~~~ + | ~~~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:16:3 @@ -110,7 +110,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {} help: remove the extra argument | LL | two_arg_diff(1, ""); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:17:3 @@ -126,7 +126,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {} help: remove the extra argument | LL | two_arg_diff(1, ""); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~ error[E0061]: this function takes 2 arguments but 4 arguments were supplied --> $DIR/extra_arguments.rs:18:3 @@ -144,7 +144,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {} help: remove the extra arguments | LL | two_arg_diff(1, ""); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~ error[E0061]: this function takes 2 arguments but 4 arguments were supplied --> $DIR/extra_arguments.rs:19:3 @@ -162,7 +162,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {} help: remove the extra arguments | LL | two_arg_diff(1, ""); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:22:3 @@ -178,7 +178,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {} help: remove the extra argument | LL | two_arg_same(1, 1); - | ~~~~~~~~~~~~~~~~~~ + | ~~~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:23:3 @@ -194,7 +194,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {} help: remove the extra argument | LL | two_arg_diff(1, ""); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:24:3 @@ -213,7 +213,7 @@ LL | fn two_arg_same(_a: i32, _b: i32) {} help: remove the extra argument | LL | two_arg_same(1, 1); - | ~~~~~~~~~~~~~~~~~~ + | ~~~~~~ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> $DIR/extra_arguments.rs:30:3 @@ -232,7 +232,7 @@ LL | fn two_arg_diff(_a: i32, _b: &str) {} help: remove the extra argument | LL | two_arg_diff(1, ""); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~ error: aborting due to 14 previous errors diff --git a/src/test/ui/argument-suggestions/issue-96638.stderr b/src/test/ui/argument-suggestions/issue-96638.stderr index 804cb1aa322..4d18b97c98b 100644 --- a/src/test/ui/argument-suggestions/issue-96638.stderr +++ b/src/test/ui/argument-suggestions/issue-96638.stderr @@ -14,7 +14,7 @@ LL | fn f(_: usize, _: &usize, _: usize) {} help: provide the argument | LL | f(/* usize */, &x, /* usize */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/argument-suggestions/issue-97197.stderr b/src/test/ui/argument-suggestions/issue-97197.stderr index ac54adc5eeb..de221ba1fe1 100644 --- a/src/test/ui/argument-suggestions/issue-97197.stderr +++ b/src/test/ui/argument-suggestions/issue-97197.stderr @@ -12,7 +12,7 @@ LL | pub fn g(a1: (), a2: bool, a3: bool, a4: bool, a5: bool, a6: ()) -> () {} help: provide the arguments | LL | g((), /* bool */, /* bool */, /* bool */, /* bool */, ()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/argument-suggestions/issue-97484.stderr b/src/test/ui/argument-suggestions/issue-97484.stderr index b5dedf0f4fa..caa50f14b43 100644 --- a/src/test/ui/argument-suggestions/issue-97484.stderr +++ b/src/test/ui/argument-suggestions/issue-97484.stderr @@ -20,7 +20,7 @@ LL | foo(&&A, B, C, D, &E, F, G); help: remove the extra arguments | LL | foo(&&A, D, /* &E */, G); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/argument-suggestions/issue-98894.stderr b/src/test/ui/argument-suggestions/issue-98894.stderr index 0c8b94901e1..f64a83ab710 100644 --- a/src/test/ui/argument-suggestions/issue-98894.stderr +++ b/src/test/ui/argument-suggestions/issue-98894.stderr @@ -12,7 +12,7 @@ LL | (|_, ()| ())(if true {} else {return;}); help: provide the argument | LL | (|_, ()| ())(if true {} else {return;}, ()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/argument-suggestions/issue-98897.stderr b/src/test/ui/argument-suggestions/issue-98897.stderr index 8f0d98d09e8..f2c47d353ef 100644 --- a/src/test/ui/argument-suggestions/issue-98897.stderr +++ b/src/test/ui/argument-suggestions/issue-98897.stderr @@ -12,7 +12,7 @@ LL | (|_, ()| ())([return, ()]); help: provide the argument | LL | (|_, ()| ())([return, ()], ()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/argument-suggestions/issue-99482.stderr b/src/test/ui/argument-suggestions/issue-99482.stderr index bc005e82a2c..bcf36e37cdc 100644 --- a/src/test/ui/argument-suggestions/issue-99482.stderr +++ b/src/test/ui/argument-suggestions/issue-99482.stderr @@ -12,7 +12,7 @@ LL | let f = |_: (), f: fn()| f; help: provide the argument | LL | let _f = f((), main); - | ~~~~~~~~~~~ + | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/argument-suggestions/missing_arguments.stderr b/src/test/ui/argument-suggestions/missing_arguments.stderr index 2509d22d7ff..ba9ece040be 100644 --- a/src/test/ui/argument-suggestions/missing_arguments.stderr +++ b/src/test/ui/argument-suggestions/missing_arguments.stderr @@ -12,7 +12,7 @@ LL | fn one_arg(_a: i32) {} help: provide the argument | LL | one_arg(/* i32 */); - | ~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~ error[E0061]: this function takes 2 arguments but 0 arguments were supplied --> $DIR/missing_arguments.rs:14:3 @@ -28,7 +28,7 @@ LL | fn two_same(_a: i32, _b: i32) {} help: provide the arguments | LL | two_same(/* i32 */, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 2 arguments but 1 argument was supplied --> $DIR/missing_arguments.rs:15:3 @@ -44,7 +44,7 @@ LL | fn two_same(_a: i32, _b: i32) {} help: provide the argument | LL | two_same(1, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~ error[E0061]: this function takes 2 arguments but 0 arguments were supplied --> $DIR/missing_arguments.rs:16:3 @@ -60,7 +60,7 @@ LL | fn two_diff(_a: i32, _b: f32) {} help: provide the arguments | LL | two_diff(/* i32 */, /* f32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 2 arguments but 1 argument was supplied --> $DIR/missing_arguments.rs:17:3 @@ -76,7 +76,7 @@ LL | fn two_diff(_a: i32, _b: f32) {} help: provide the argument | LL | two_diff(1, /* f32 */); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~ error[E0061]: this function takes 2 arguments but 1 argument was supplied --> $DIR/missing_arguments.rs:18:3 @@ -92,7 +92,7 @@ LL | fn two_diff(_a: i32, _b: f32) {} help: provide the argument | LL | two_diff(/* i32 */, 1.0); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 0 arguments were supplied --> $DIR/missing_arguments.rs:21:3 @@ -108,7 +108,7 @@ LL | fn three_same(_a: i32, _b: i32, _c: i32) {} help: provide the arguments | LL | three_same(/* i32 */, /* i32 */, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 1 argument was supplied --> $DIR/missing_arguments.rs:22:3 @@ -124,7 +124,7 @@ LL | fn three_same(_a: i32, _b: i32, _c: i32) {} help: provide the arguments | LL | three_same(1, /* i32 */, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> $DIR/missing_arguments.rs:23:3 @@ -140,7 +140,7 @@ LL | fn three_same(_a: i32, _b: i32, _c: i32) {} help: provide the argument | LL | three_same(1, 1, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> $DIR/missing_arguments.rs:26:3 @@ -156,7 +156,7 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {} help: provide the argument | LL | three_diff(/* i32 */, 1.0, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> $DIR/missing_arguments.rs:27:3 @@ -172,7 +172,7 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {} help: provide the argument | LL | three_diff(1, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> $DIR/missing_arguments.rs:28:3 @@ -188,7 +188,7 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {} help: provide the argument | LL | three_diff(1, 1.0, /* &str */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 1 argument was supplied --> $DIR/missing_arguments.rs:29:3 @@ -204,7 +204,7 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {} help: provide the arguments | LL | three_diff(/* i32 */, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 1 argument was supplied --> $DIR/missing_arguments.rs:30:3 @@ -223,7 +223,7 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {} help: provide the arguments | LL | three_diff(/* i32 */, 1.0, /* &str */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 1 argument was supplied --> $DIR/missing_arguments.rs:31:3 @@ -239,7 +239,7 @@ LL | fn three_diff(_a: i32, _b: f32, _c: &str) {} help: provide the arguments | LL | three_diff(1, /* f32 */, /* &str */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 4 arguments but 0 arguments were supplied --> $DIR/missing_arguments.rs:34:3 @@ -255,7 +255,7 @@ LL | fn four_repeated(_a: i32, _b: f32, _c: f32, _d: &str) {} help: provide the arguments | LL | four_repeated(/* i32 */, /* f32 */, /* f32 */, /* &str */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 4 arguments but 2 arguments were supplied --> $DIR/missing_arguments.rs:35:3 @@ -271,7 +271,7 @@ LL | fn four_repeated(_a: i32, _b: f32, _c: f32, _d: &str) {} help: provide the arguments | LL | four_repeated(1, /* f32 */, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 5 arguments but 0 arguments were supplied --> $DIR/missing_arguments.rs:38:3 @@ -287,7 +287,7 @@ LL | fn complex(_a: i32, _b: f32, _c: i32, _d: f32, _e: &str) {} help: provide the arguments | LL | complex(/* i32 */, /* f32 */, /* i32 */, /* f32 */, /* &str */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 5 arguments but 2 arguments were supplied --> $DIR/missing_arguments.rs:39:3 @@ -303,7 +303,7 @@ LL | fn complex(_a: i32, _b: f32, _c: i32, _d: f32, _e: &str) {} help: provide the arguments | LL | complex(1, /* f32 */, /* i32 */, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 19 previous errors diff --git a/src/test/ui/argument-suggestions/mixed_cases.stderr b/src/test/ui/argument-suggestions/mixed_cases.stderr index a52a30d7884..8c525db1ac6 100644 --- a/src/test/ui/argument-suggestions/mixed_cases.stderr +++ b/src/test/ui/argument-suggestions/mixed_cases.stderr @@ -14,7 +14,7 @@ LL | fn two_args(_a: i32, _b: f32) {} help: remove the extra argument | LL | two_args(1, /* f32 */); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 4 arguments were supplied --> $DIR/mixed_cases.rs:11:3 @@ -33,7 +33,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: did you mean | LL | three_args(1, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> $DIR/mixed_cases.rs:14:3 @@ -52,7 +52,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: provide the argument | LL | three_args(1, /* f32 */, /* &str */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/mixed_cases.rs:17:3 @@ -70,7 +70,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: did you mean | LL | three_args(1, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/mixed_cases.rs:20:3 @@ -89,7 +89,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: swap these arguments | LL | three_args(1, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> $DIR/mixed_cases.rs:23:3 @@ -109,7 +109,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: did you mean | LL | three_args(1, /* f32 */, ""); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/argument-suggestions/permuted_arguments.stderr b/src/test/ui/argument-suggestions/permuted_arguments.stderr index f16d22860d8..655807a7f38 100644 --- a/src/test/ui/argument-suggestions/permuted_arguments.stderr +++ b/src/test/ui/argument-suggestions/permuted_arguments.stderr @@ -15,7 +15,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: reorder these arguments | LL | three_args(1, 1.0, ""); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/permuted_arguments.rs:12:3 @@ -36,7 +36,7 @@ LL | fn many_args(_a: i32, _b: f32, _c: &str, _d: X, _e: Y) {} help: reorder these arguments | LL | many_args(1, 1.0, "", X {}, Y {}); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/argument-suggestions/swapped_arguments.stderr b/src/test/ui/argument-suggestions/swapped_arguments.stderr index a90792d0c53..dabf5e952b2 100644 --- a/src/test/ui/argument-suggestions/swapped_arguments.stderr +++ b/src/test/ui/argument-suggestions/swapped_arguments.stderr @@ -14,7 +14,7 @@ LL | fn two_args(_a: i32, _b: f32) {} help: swap these arguments | LL | two_args(1, 1.0); - | ~~~~~~~~~~~~~~~~ + | ~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/swapped_arguments.rs:9:3 @@ -32,7 +32,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: swap these arguments | LL | three_args(1, 1.0, ""); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/swapped_arguments.rs:10:3 @@ -50,7 +50,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: swap these arguments | LL | three_args(1, 1.0, ""); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/swapped_arguments.rs:11:3 @@ -68,7 +68,7 @@ LL | fn three_args(_a: i32, _b: f32, _c: &str) {} help: swap these arguments | LL | three_args(1, 1.0, ""); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~ error[E0308]: arguments to this function are incorrect --> $DIR/swapped_arguments.rs:13:3 @@ -88,7 +88,7 @@ LL | fn four_args(_a: i32, _b: f32, _c: &str, _d: X) {} help: did you mean | LL | four_args(1, 1.0, "", X {}); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/c-variadic/variadic-ffi-1.stderr b/src/test/ui/c-variadic/variadic-ffi-1.stderr index 176bec819d6..2ffb80f7ef6 100644 --- a/src/test/ui/c-variadic/variadic-ffi-1.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-1.stderr @@ -18,7 +18,7 @@ LL | fn foo(f: isize, x: u8, ...); help: provide the arguments | LL | foo(/* isize */, /* u8 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0060]: this function takes at least 2 arguments but 1 argument was supplied --> $DIR/variadic-ffi-1.rs:21:9 @@ -34,7 +34,7 @@ LL | fn foo(f: isize, x: u8, ...); help: provide the argument | LL | foo(1, /* u8 */); - | ~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/variadic-ffi-1.rs:23:56 diff --git a/src/test/ui/error-codes/E0057.stderr b/src/test/ui/error-codes/E0057.stderr index 2307f52c93b..bea226f09dc 100644 --- a/src/test/ui/error-codes/E0057.stderr +++ b/src/test/ui/error-codes/E0057.stderr @@ -12,7 +12,7 @@ LL | let f = |x| x * 3; help: provide the argument | LL | let a = f(/* value */); - | ~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error[E0057]: this function takes 1 argument but 2 arguments were supplied --> $DIR/E0057.rs:5:13 @@ -28,7 +28,7 @@ LL | let f = |x| x * 3; help: remove the extra argument | LL | let c = f(2); - | ~~~~ + | ~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0060.stderr b/src/test/ui/error-codes/E0060.stderr index 644fd598338..934a18d896d 100644 --- a/src/test/ui/error-codes/E0060.stderr +++ b/src/test/ui/error-codes/E0060.stderr @@ -12,7 +12,7 @@ LL | fn printf(_: *const u8, ...) -> u32; help: provide the argument | LL | unsafe { printf(/* *const u8 */); } - | ~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0061.stderr b/src/test/ui/error-codes/E0061.stderr index fa55db0924d..fa4ccbe6677 100644 --- a/src/test/ui/error-codes/E0061.stderr +++ b/src/test/ui/error-codes/E0061.stderr @@ -12,7 +12,7 @@ LL | fn f(a: u16, b: &str) {} help: provide the argument | LL | f(0, /* &str */); - | ~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/E0061.rs:9:5 @@ -28,7 +28,7 @@ LL | fn f2(a: u16) {} help: provide the argument | LL | f2(/* u16 */); - | ~~~~~~~~~~~~~ + | ~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/higher-rank-trait-bounds/issue-58451.stderr b/src/test/ui/higher-rank-trait-bounds/issue-58451.stderr index 22ba63c3e86..09e25f4dc96 100644 --- a/src/test/ui/higher-rank-trait-bounds/issue-58451.stderr +++ b/src/test/ui/higher-rank-trait-bounds/issue-58451.stderr @@ -12,7 +12,7 @@ LL | fn f(i: I) help: provide the argument | LL | f(&[f(/* value */)]); - | ~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16939.stderr b/src/test/ui/issues/issue-16939.stderr index aaa3c49b3d8..76645645464 100644 --- a/src/test/ui/issues/issue-16939.stderr +++ b/src/test/ui/issues/issue-16939.stderr @@ -12,7 +12,7 @@ LL | fn _foo (f: F) { help: remove the extra argument | LL | |t| f(); - | ~~~ + | ~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18819.stderr b/src/test/ui/issues/issue-18819.stderr index e499d0572f6..767fdd5caf0 100644 --- a/src/test/ui/issues/issue-18819.stderr +++ b/src/test/ui/issues/issue-18819.stderr @@ -23,7 +23,7 @@ LL | print_x(&X); help: provide the argument | LL | print_x(/* &dyn Foo */, /* &str */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-4935.stderr b/src/test/ui/issues/issue-4935.stderr index aab19a699ac..bb45fa08338 100644 --- a/src/test/ui/issues/issue-4935.stderr +++ b/src/test/ui/issues/issue-4935.stderr @@ -12,7 +12,7 @@ LL | fn foo(a: usize) {} help: remove the extra argument | LL | fn main() { foo(5) } - | ~~~~~~ + | ~~~ error: aborting due to previous error diff --git a/src/test/ui/lifetimes/issue-26638.stderr b/src/test/ui/lifetimes/issue-26638.stderr index f3af5cf5a35..98d39d614d0 100644 --- a/src/test/ui/lifetimes/issue-26638.stderr +++ b/src/test/ui/lifetimes/issue-26638.stderr @@ -54,7 +54,7 @@ LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } help: provide the argument | LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter(/* &u8 */) } - | ~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/issue-26638.rs:5:47 diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr index e9b49c89bf1..a4ffb864dad 100644 --- a/src/test/ui/methods/method-call-err-msg.stderr +++ b/src/test/ui/methods/method-call-err-msg.stderr @@ -12,7 +12,7 @@ LL | fn zero(self) -> Foo { self } help: remove the extra argument | LL | x.zero() - | ~~~~~~ + | ~~ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/method-call-err-msg.rs:14:7 @@ -28,7 +28,7 @@ LL | fn one(self, _: isize) -> Foo { self } help: provide the argument | LL | .one(/* isize */) - | ~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error[E0061]: this function takes 2 arguments but 1 argument was supplied --> $DIR/method-call-err-msg.rs:15:7 @@ -44,7 +44,7 @@ LL | fn two(self, _: isize, _: isize) -> Foo { self } help: provide the argument | LL | .two(0, /* isize */); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~ error[E0599]: `Foo` is not an iterator --> $DIR/method-call-err-msg.rs:19:7 @@ -84,7 +84,7 @@ LL | fn three(self, _: T, _: T, _: T) -> Foo { self } help: provide the arguments | LL | y.three::(/* usize */, /* usize */, /* usize */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 5 previous errors diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index 475ea9dfaf1..fb3597aa853 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -26,7 +26,7 @@ LL | impl FnMut<(isize,)> for S { help: provide the argument | LL | let ans = s(/* isize */); - | ~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error[E0057]: this function takes 1 argument but 2 arguments were supplied --> $DIR/overloaded-calls-bad.rs:31:15 @@ -44,7 +44,7 @@ LL | impl FnMut<(isize,)> for S { help: remove the extra argument | LL | let ans = s(/* isize */); - | ~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/not-enough-arguments.stderr b/src/test/ui/not-enough-arguments.stderr index b1df578ea80..8b2dafb4e1d 100644 --- a/src/test/ui/not-enough-arguments.stderr +++ b/src/test/ui/not-enough-arguments.stderr @@ -12,7 +12,7 @@ LL | fn foo(a: isize, b: isize, c: isize, d:isize) { help: provide the argument | LL | foo(1, 2, 3, /* isize */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 6 arguments but 3 arguments were supplied --> $DIR/not-enough-arguments.rs:29:3 @@ -40,7 +40,7 @@ LL | f: i32, help: provide the arguments | LL | bar(1, 2, 3, /* i32 */, /* i32 */, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/resolve-primitive-fallback.stderr b/src/test/ui/resolve/resolve-primitive-fallback.stderr index f0eb1a4f487..6d5d5bad9fe 100644 --- a/src/test/ui/resolve/resolve-primitive-fallback.stderr +++ b/src/test/ui/resolve/resolve-primitive-fallback.stderr @@ -34,7 +34,7 @@ LL | pub const fn size_of() -> usize { help: remove the extra argument | LL | std::mem::size_of(); - | ~~~~~~~~~~~~~~~~~~~ + | ~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index 28a911d0c5b..15179954adc 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -64,7 +64,7 @@ LL | fn foo(Option, String) {} help: remove the extra argument | LL | foo(Some(42), 2); - | ~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/issue-34264.rs:8:13 @@ -94,7 +94,7 @@ LL | fn bar(x, y: usize) {} help: remove the extra argument | LL | bar(1, 2); - | ~~~~~~~~~ + | ~~~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index d2afd277ecf..b76a3ab307a 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -12,7 +12,7 @@ LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), help: provide the argument | LL | let _: Result<(), String> = Ok(()); - | ~~~~~~ + | ~~~~ error[E0061]: this function takes 2 arguments but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:12:5 @@ -28,7 +28,7 @@ LL | fn foo(():(), ():()) {} help: provide the arguments | LL | foo((), ()); - | ~~~~~~~~~~~ + | ~~~~~~~~ error[E0061]: this function takes 2 arguments but 1 argument was supplied --> $DIR/missing-unit-argument.rs:13:5 @@ -44,7 +44,7 @@ LL | fn foo(():(), ():()) {} help: provide the argument | LL | foo((), ()); - | ~~~~~~~~~~~ + | ~~~~~~~~ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:14:5 @@ -60,7 +60,7 @@ LL | fn bar(():()) {} help: provide the argument | LL | bar(()); - | ~~~~~~~ + | ~~~~ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:15:7 @@ -76,7 +76,7 @@ LL | fn baz(self, (): ()) { } help: provide the argument | LL | S.baz(()); - | ~~~~~~~ + | ~~~~ error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:16:7 @@ -92,7 +92,7 @@ LL | fn generic(self, _: T) { } help: provide the argument | LL | S.generic::<()>(()); - | ~~~~~~~~~~~~~~~~~ + | ~~~~ error: aborting due to 6 previous errors diff --git a/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr b/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr index 4c952669cfa..0a91c442d2c 100644 --- a/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr +++ b/src/test/ui/suggestions/args-instead-of-tuple-errors.stderr @@ -19,7 +19,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), help: remove the extra argument | LL | let _: Option<(i32, bool)> = Some(/* (i32, bool) */); - | ~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~ error[E0061]: this function takes 1 argument but 2 arguments were supplied --> $DIR/args-instead-of-tuple-errors.rs:8:5 @@ -42,7 +42,7 @@ LL | fn int_bool(_: (i32, bool)) { help: remove the extra argument | LL | int_bool(/* (i32, bool) */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied --> $DIR/args-instead-of-tuple-errors.rs:11:28 @@ -58,7 +58,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), help: provide the argument | LL | let _: Option<(i8,)> = Some(/* (i8,) */); - | ~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/args-instead-of-tuple-errors.rs:14:34 diff --git a/src/test/ui/suggestions/args-instead-of-tuple.stderr b/src/test/ui/suggestions/args-instead-of-tuple.stderr index 2448a514965..20f9e5259a4 100644 --- a/src/test/ui/suggestions/args-instead-of-tuple.stderr +++ b/src/test/ui/suggestions/args-instead-of-tuple.stderr @@ -44,7 +44,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), help: provide the argument | LL | let _: Option<()> = Some(()); - | ~~~~~~~~ + | ~~~~ error[E0308]: mismatched types --> $DIR/args-instead-of-tuple.rs:14:34 diff --git a/src/test/ui/tuple/wrong_argument_ice-3.stderr b/src/test/ui/tuple/wrong_argument_ice-3.stderr index 968cb75db76..f3a547fa238 100644 --- a/src/test/ui/tuple/wrong_argument_ice-3.stderr +++ b/src/test/ui/tuple/wrong_argument_ice-3.stderr @@ -19,7 +19,7 @@ LL | pub fn push(&mut self, value: T) { help: remove the extra argument | LL | groups.push(/* (Vec, Vec) */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/tuple/wrong_argument_ice-4.stderr b/src/test/ui/tuple/wrong_argument_ice-4.stderr index 828ae21b480..a2686ab9440 100644 --- a/src/test/ui/tuple/wrong_argument_ice-4.stderr +++ b/src/test/ui/tuple/wrong_argument_ice-4.stderr @@ -16,7 +16,7 @@ LL | (|| {})(|| { help: remove the extra argument | LL | (|| {})(); - | ~~~~~~~~~ + | ~~ error: aborting due to previous error diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr index 006253f8432..eb58ee73ca2 100644 --- a/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr +++ b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr @@ -12,7 +12,7 @@ LL | V(u8) help: provide the argument | LL | ::V(/* u8 */); - | ~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~ error[E0308]: mismatched types --> $DIR/enum-variant-priority-higher-than-other-inherent.rs:22:17 diff --git a/src/test/ui/type/type-ascription-instead-of-initializer.stderr b/src/test/ui/type/type-ascription-instead-of-initializer.stderr index fcac6c495c4..de578ca93ed 100644 --- a/src/test/ui/type/type-ascription-instead-of-initializer.stderr +++ b/src/test/ui/type/type-ascription-instead-of-initializer.stderr @@ -21,7 +21,7 @@ LL | pub fn with_capacity(capacity: usize) -> Self { help: remove the extra argument | LL | let x: Vec::with_capacity(10); - | ~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/typeck/remove-extra-argument.stderr b/src/test/ui/typeck/remove-extra-argument.stderr index 703032a8322..b734bcd4eb0 100644 --- a/src/test/ui/typeck/remove-extra-argument.stderr +++ b/src/test/ui/typeck/remove-extra-argument.stderr @@ -12,7 +12,7 @@ LL | fn l(_a: Vec) {} help: remove the extra argument | LL | l(vec![]) - | + | ~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/typeck/struct-enum-wrong-args.stderr b/src/test/ui/typeck/struct-enum-wrong-args.stderr index f72082d5301..ea94bcbc290 100644 --- a/src/test/ui/typeck/struct-enum-wrong-args.stderr +++ b/src/test/ui/typeck/struct-enum-wrong-args.stderr @@ -12,7 +12,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), help: remove the extra argument | LL | let _ = Some(3); - | ~~~~~~~ + | ~~~ error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:7:13 @@ -30,7 +30,7 @@ LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), help: remove the extra arguments | LL | let _ = Ok(3); - | ~~~~~ + | ~~~ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:8:13 @@ -46,7 +46,7 @@ LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), help: provide the argument | LL | let _ = Ok(/* value */); - | ~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~ error[E0061]: this struct takes 1 argument but 0 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:9:13 @@ -62,7 +62,7 @@ LL | struct Wrapper(i32); help: provide the argument | LL | let _ = Wrapper(/* i32 */); - | ~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~ error[E0061]: this struct takes 1 argument but 2 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:10:13 @@ -78,7 +78,7 @@ LL | struct Wrapper(i32); help: remove the extra argument | LL | let _ = Wrapper(5); - | ~~~~~~~~~~ + | ~~~ error[E0061]: this struct takes 2 arguments but 0 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:11:13 @@ -94,7 +94,7 @@ LL | struct DoubleWrapper(i32, i32); help: provide the arguments | LL | let _ = DoubleWrapper(/* i32 */, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this struct takes 2 arguments but 1 argument was supplied --> $DIR/struct-enum-wrong-args.rs:12:13 @@ -110,7 +110,7 @@ LL | struct DoubleWrapper(i32, i32); help: provide the argument | LL | let _ = DoubleWrapper(5, /* i32 */); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ~~~~~~~~~~~~~~ error[E0061]: this struct takes 2 arguments but 3 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:13:13 @@ -126,7 +126,7 @@ LL | struct DoubleWrapper(i32, i32); help: remove the extra argument | LL | let _ = DoubleWrapper(5, 2); - | ~~~~~~~~~~~~~~~~~~~ + | ~~~~~~ error: aborting due to 8 previous errors