mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
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:
parent
9eaddf5bff
commit
2ed112c14e
@ -17,6 +17,8 @@ pub fn parse_unstable_flag(value: Option<&str>) -> Vec<String> {
|
|||||||
let mut crates: HashSet<&str> = value.split(',').collect();
|
let mut crates: HashSet<&str> = value.split(',').collect();
|
||||||
if crates.contains("std") {
|
if crates.contains("std") {
|
||||||
crates.insert("core");
|
crates.insert("core");
|
||||||
|
crates.insert("alloc");
|
||||||
|
crates.insert("proc_macro");
|
||||||
crates.insert("panic_unwind");
|
crates.insert("panic_unwind");
|
||||||
crates.insert("compiler_builtins");
|
crates.insert("compiler_builtins");
|
||||||
} else if crates.contains("core") {
|
} else if crates.contains("core") {
|
||||||
|
@ -237,7 +237,15 @@ fn doc() {
|
|||||||
|
|
||||||
fn check_std() {
|
fn check_std() {
|
||||||
let p = project()
|
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("src/main.rs", "fn main() {}")
|
||||||
.file(
|
.file(
|
||||||
"tests/t1.rs",
|
"tests/t1.rs",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user