smartstring 1.0.1

Compact inlined strings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use version_check as rustc;

fn main() {
    let ac = autocfg::new();
    let has_feature = Some(true) == rustc::supports_feature("allocator_api");
    let has_api = ac.probe_trait("alloc::alloc::Allocator");
    if has_feature || has_api {
        autocfg::emit("has_allocator");
    }
    if has_feature {
        autocfg::emit("needs_allocator_feature");
    }
    autocfg::rerun_path("build.rs");
}