Add alloc and proc_macro to libstd crates

These two have been stabilized for all targets like `std` so if `std` is
requested let's be sure to make them available to other crates as well.
This commit is contained in:
Alex Crichton 2019-09-06 13:49:48 -07:00
parent 9eaddf5bff
commit 2ed112c14e
2 changed files with 11 additions and 1 deletions

View File

@ -17,6 +17,8 @@ pub fn parse_unstable_flag(value: Option<&str>) -> Vec<String> {
let mut crates: HashSet<&str> = value.split(',').collect();
if crates.contains("std") {
crates.insert("core");
crates.insert("alloc");
crates.insert("proc_macro");
crates.insert("panic_unwind");
crates.insert("compiler_builtins");
} else if crates.contains("core") {

View File

@ -237,7 +237,15 @@ fn doc() {
fn check_std() {
let p = project()
.file("src/lib.rs", "pub fn f() {}")
.file(
"src/lib.rs",
"
extern crate core;
extern crate alloc;
extern crate proc_macro;
pub fn f() {}
",
)
.file("src/main.rs", "fn main() {}")
.file(
"tests/t1.rs",