From e5530519502baf3ae37fa94eda27c2461d8c94aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sun, 1 Sep 2019 00:08:44 -0700 Subject: [PATCH] review comment --- src/librustc/traits/error_reporting.rs | 3 +-- ...-ctor-passed-as-arg-where-it-should-have-been-called.stderr | 2 +- ...-ctor-passed-as-arg-where-it-should-have-been-called.stderr | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index 181efeb2f985b..b38e1f5f83937 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -992,8 +992,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { })) = self.tcx.hir().get_if_local(def_id) { let body = self.tcx.hir().body(*body_id); err.help(&format!( - "it looks like you forgot to use parentheses to \ - call the function: `{}({})`", + "use parentheses to call the function: `{}({})`", ident, body.params.iter() .map(|arg| match &arg.pat.node { diff --git a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index 5735f725dc380..3141b1b65f9ba 100644 --- a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -7,7 +7,7 @@ LL | fn bar(f: impl Future) {} LL | bar(foo); | ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}` | - = help: it looks like you forgot to use parentheses to call the function: `foo()` + = help: use parentheses to call the function: `foo()` error: aborting due to previous error diff --git a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index 2e4505c740588..2cc4653fabe2d 100644 --- a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -7,7 +7,7 @@ LL | fn bar(f: impl T) {} LL | bar(foo); | ^^^ the trait `T` is not implemented for `fn() -> impl T {foo}` | - = help: it looks like you forgot to use parentheses to call the function: `foo()` + = help: use parentheses to call the function: `foo()` error: aborting due to previous error