From e2c05c1c6ee2f430e92df57e7bd7bb5d3ba1dd2a Mon Sep 17 00:00:00 2001 From: Jake Bailey Date: Wed, 18 Apr 2018 11:34:57 -0700 Subject: [PATCH] Remove Naming_hooks Summary: The last naming hook is no longer used, so we can remove the module. Reviewed By: dlreeves Differential Revision: D6813198 fbshipit-source-id: 3a7665736bc9c8ffc734e38c6dcd26dcc919e5fe --- hphp/hack/src/naming/naming.ml | 1 - hphp/hack/src/naming/naming_hooks.ml | 21 --------------------- 2 files changed, 22 deletions(-) delete mode 100644 hphp/hack/src/naming/naming_hooks.ml diff --git a/hphp/hack/src/naming/naming.ml b/hphp/hack/src/naming/naming.ml index a6a5d73915b..2b669e5a53e 100644 --- a/hphp/hack/src/naming/naming.ml +++ b/hphp/hack/src/naming/naming.ml @@ -876,7 +876,6 @@ module Make (GetLocals : GetLocals) = struct and hint_id ~forbid_this ~allow_retonly ~allow_typedef ~allow_wildcard env is_static_var (p, x as id) hl = - Naming_hooks.dispatch_hint_hook id; let params = (fst env).type_params in if is_alok_type_name id && not (SMap.mem x params) then Errors.typeparam_alok id; diff --git a/hphp/hack/src/naming/naming_hooks.ml b/hphp/hack/src/naming/naming_hooks.ml deleted file mode 100644 index 7273edc0df3..00000000000 --- a/hphp/hack/src/naming/naming_hooks.ml +++ /dev/null @@ -1,21 +0,0 @@ -(** - * Copyright (c) 2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the "hack" directory of this source tree. - * - *) - -open Hh_core - -let (hint_hooks: (Pos.t * string -> unit) list ref) = ref [] - -let attach_hint_hook hook = - hint_hooks := hook :: !hint_hooks - -let dispatch_hint_hook id = - List.iter !hint_hooks begin fun hook -> hook id end - -let remove_all_hooks () = - hint_hooks := []; -- 2.11.4.GIT