[−][src]Macro alloc::setup_imports
Create the alloc
api facade
This will add the extern crate
declaration for the alloc crate and
set up the facade module at crate::alloc
. It should contain an identical API
surface for both std
and alloc
uses.
Example
ⓘThis example is not tested
#![cfg_attr(not(feature = "std"), no_std)] // Each of std, alloc, and futures should be followed by a "meta" item. // This will be used for the proper #[cfg(...)] attributes. // They can be in any order. futures is optional, and will default to // "always disabled". You can use "all()" for "always enabled" on any of them. alloc::setup_imports! { std: feature = "std", alloc: feature = "alloc", futures: feature = "futures", }