Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Sep 1, 2019
1 parent aee6cd9 commit e553051
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | fn bar(f: impl Future<Output=()>) {}
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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | fn bar(f: impl T<O=()>) {}
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

Expand Down

0 comments on commit e553051

Please sign in to comment.