allocator_api 0.3.0

This is a copy of the unstable allocator_api (https://github.com/rust-lang/rust/issues/32838) and of parts of the unstable alloc feature. Usable with stable rust, but requires 1.26.
Documentation
1
2
3
4
5
6
7
8
9
10
11
extern crate rustc_version;

use rustc_version::{version, Version};

fn main() {
    if version().unwrap() >= Version::parse("1.26.0-alpha").unwrap() {
        println!("cargo:rustc-cfg=feature=\"i128\"");
        println!("cargo:rustc-cfg=feature=\"fused\"");
        println!("cargo:rustc-cfg=feature=\"unstable_name_collision\"");
    }
}