Skip to content

Commit e553051

Browse files
committed
review comment
1 parent aee6cd9 commit e553051

3 files changed

+3
-4
lines changed

src/librustc/traits/error_reporting.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -992,8 +992,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
992992
})) = self.tcx.hir().get_if_local(def_id) {
993993
let body = self.tcx.hir().body(*body_id);
994994
err.help(&format!(
995-
"it looks like you forgot to use parentheses to \
996-
call the function: `{}({})`",
995+
"use parentheses to call the function: `{}({})`",
997996
ident,
998997
body.params.iter()
999998
.map(|arg| match &arg.pat.node {

src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn bar(f: impl Future<Output=()>) {}
77
LL | bar(foo);
88
| ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}`
99
|
10-
= help: it looks like you forgot to use parentheses to call the function: `foo()`
10+
= help: use parentheses to call the function: `foo()`
1111

1212
error: aborting due to previous error
1313

src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn bar(f: impl T<O=()>) {}
77
LL | bar(foo);
88
| ^^^ the trait `T` is not implemented for `fn() -> impl T {foo}`
99
|
10-
= help: it looks like you forgot to use parentheses to call the function: `foo()`
10+
= help: use parentheses to call the function: `foo()`
1111

1212
error: aborting due to previous error
1313

0 commit comments

Comments
 (0)