Closed
Description
I'm referring to this particular line
Even though in no_std
environments Global as a structure exists and is defined, and it only shows up in PhantomData, the use of the structure is most likely undefined if #[global_allocator]
attribute is never used. Yes, there will be no calls to Global as it's only a phantom, and execution will not be affected, but just seems ill-defined at least.
For completeness: compilation of code that uses alloc::collection::BTreeMap
with custom allocator under #![feature(btreemap_alloc)]
is not affected, and there is no sign of runtime bugs.