Delete Typing_print.suggest
commit1a94b4c4e7af38c266065d27d06b2cd5281b71fe
authorDwayne Reeves <dreeves@fb.com>
Fri, 13 Sep 2019 04:23:50 +0000 (12 21:23 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 13 Sep 2019 04:26:27 +0000 (12 21:26 -0700)
tree1b770b8db1a20f379d0a9ec077a4b096d7ab571c
parent47c1e02d18b45225b44da64f5a8095ba625abbc4
Delete Typing_print.suggest

Summary:
Typing_print.suggest was added in the early, early days (2014 or earlier) days of Hack. It's intention was to suggest a type if one was missing in a partial file. This code has bit rotten over the years and I couldn't come up with a case where it actually gets triggered in code.

There are a few other instances where it is used, which I can assume because it is the only function in Typing_print that takes only the type as an argument. I replaced those calls with other print functions to the best of my knowledge. Suggestions on testing those would be appreciated, but given how broken Typing_print.suggest is I doubt it will be a worst experience.

Reviewed By: andrewjkennedy

Differential Revision: D17323099

fbshipit-source-id: 0440784550a22cced1ffc601a6ca2725fbaf34f6
14 files changed:
hphp/hack/src/errors/error_codes.ml
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors.mli
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_exts.ml
hphp/hack/src/typing/typing_print.ml
hphp/hack/src/typing/typing_print.mli
hphp/hack/src/typing/typing_return.ml
hphp/hack/src/typing/typing_return.mli
hphp/hack/src/typing/typing_symbol_json_builder.ml
hphp/hack/test/errors/error_map.ml
hphp/hack/test/integration_ml/saved_state/test_disk_race_conditions.ml
hphp/hack/test/tast/infer_missing/return/type_hint_inferred_awaitable.php.exp
hphp/hack/test/typecheck/variadics/ellipsis_strict_mode.php.exp