Move alloc_decl_defs to the decl_defs module; make entrypoint a From impl
commitf3da50f9c0daf3fd957aae715e0c6556d837c016
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Thu, 3 Mar 2022 01:59:44 +0000 (2 17:59 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 3 Mar 2022 01:59:44 +0000 (2 17:59 -0800)
treefce302397b5a5c86f062255d5cc5981f6d2a3ff6
parentbb8cee73f82d2c1cd64936833c37cc72d999b8e4
Move alloc_decl_defs to the decl_defs module; make entrypoint a From impl

Summary:
Move alloc_decl_defs from lib/alloc to lib/decl_defs. Instead of expressing it as methods on the Allocator type, express it as free functions. Make the entrypoint an impl of From<obr::ShallowClass> for ShallowClass rather than a method on Allocator.

In future: make all these free functions impls of From for the respective oxidized_by_ref type.

Reviewed By: shayne-fletcher

Differential Revision: D34595926

fbshipit-source-id: 1db9b130553b7f9e24e32e2ec05c4f101a73ff23
hphp/hack/src/rupro/lib/alloc/alloc_decl_defs.rs [deleted file]
hphp/hack/src/rupro/lib/alloc/mod.rs
hphp/hack/src/rupro/lib/decl_defs/from_oxidized.rs [new file with mode: 0644]
hphp/hack/src/rupro/lib/decl_defs/mod.rs
hphp/hack/src/rupro/lib/decl_parser.rs