[][src]Module pre::alloc

Precondition definitions for unsafe functions in the alloc library.

It can be used as a drop-in replacement for it. For more information about it, you can read its documentation.

Is this complete?

No, currently only a subset of unsafe functions actually have preconditions defined here. More may be added in the future. If you're missing something, please file an issue.

Nevertheless, all of the alloc library is still usable through this module, but not all of the unsafe functions will have preconditions added to them.

As a workaround, you can add the preconditions locally in your own crate using the extern_crate attribute.

Why is it named alloc_lib in the documentation?

If it were simply named alloc there would be a naming conflict with this module, so either of them had to have a different name.

Re-exports

pub use alloc_lib::*;

Modules

str

pre definitions for the alloc_lib::str module.

string

pre definitions for the alloc_lib::string module.

vec

pre definitions for the alloc_lib::vec module.