alloc crate

版本新特性 / Rust 1.36

// *** before: ***
// without std there was no Vec and no String: you wrote them yourself
// or took them from third party crates
#![no_std]

// *** in version 1.36: ***
// alloc gives Vec, String and Box wherever an allocator alone is available
#![no_std]
extern crate alloc;

use alloc::string::String;
use alloc::vec::Vec;

fn join(parts: Vec<&str>) -> String {
    parts.concat()
}