From 2fbd6927a5116e856aa7085bbcab27e87271bb91 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Mon, 16 Sep 2019 15:54:31 -0700 Subject: When possible, suggest fn call --- ...c-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr | 7 ++++--- .../fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/test') 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 4df639b55e5..6bb65338996 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 @@ -5,9 +5,10 @@ LL | fn bar(f: impl Future) {} | --------------------------------- required by `bar` ... LL | bar(foo); - | ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}` - | - = help: use parentheses to call the function: `foo()` + | ^^^ + | | + | the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {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 f51f1a8215c..59726c82c23 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 @@ -5,9 +5,10 @@ LL | fn bar(f: impl T) {} | ----------------------- required by `bar` ... LL | bar(foo); - | ^^^ the trait `T` is not implemented for `fn() -> impl T {foo}` - | - = help: use parentheses to call the function: `foo()` + | ^^^ + | | + | the trait `T` is not implemented for `fn() -> impl T {foo}` + | help: use parentheses to call the function: `foo()` error: aborting due to previous error -- cgit 1.4.1-3-g733a5