Rollup merge of #33325 - birkenfeld:issue-31341, r=jseyfried

typeck: remove confusing suggestion for calling a fn type

* It is not clear what a "base function" is.
* The suggestion just adds parens, so suggests calling without args.

The second point could be fixed with e.g. `(...)` instead of `()`,
but the preceding "note: X is a function, perhaps you wish to call it"
should already be clear enough.

Fixes: #31341
This commit is contained in:
Manish Goregaokar 2016-05-03 01:02:44 +05:30
commit 0ee84c71fc
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
2 changed files with 0 additions and 8 deletions

View file

@ -25,11 +25,7 @@ fn main() {
obj::func.x();
//~^ ERROR no method named `x` found for type `fn() -> ret {obj::func}` in the current scope
//~^^ NOTE obj::func is a function, perhaps you wish to call it
//~^^^ HELP try calling the base function:
//~| SUGGESTION obj::func().x();
func.x();
//~^ ERROR no method named `x` found for type `fn() -> ret {func}` in the current scope
//~^^ NOTE func is a function, perhaps you wish to call it
//~^^^ HELP try calling the base function:
//~| SUGGESTION func().x();
}