From: bors Date: Mon, 25 Jun 2018 08:54:16 +0000 (+0000) Subject: Auto merge of #51335 - mark-i-m:allocator, r=oli-obk X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=446aef691e7223f31b18236fb9bf2d08bc25ba46;p=rust.git Auto merge of #51335 - mark-i-m:allocator, r=oli-obk Prohibit `global_allocator` in submodules Background: #44113 is caused by weird interactions with hygiene. Hygiene is hard. After a lot of playing around, we decided that the best path forward would be to prohibit `global_allocator`s from being in submodules for now. When somebody gets it working, we can re-enable it. This PR contains the following - Some hygiene "fixes" -- things I suspect are the correct thing to do that will make life easier in the future. This includes using call_site hygiene for the generated module and passing the correct crate name to the expansion config. - Comments and minor formatting fixes - Some debugging code - Code to prohibit `global_allocator` in submodules - Test checking that the proper error occurs. cc #44113 #49320 #51241 r? @alexcrichton --- 446aef691e7223f31b18236fb9bf2d08bc25ba46