From 43132b6030bd31770c1a0ecc938c7c589ed5ce31 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Dec 2024 14:23:59 +0100 Subject: [PATCH] Don't publish rustc_macros and rustc_serialize --- Cargo.lock | 2 +- src/main.rs | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f39895..0bde031 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "adler" diff --git a/src/main.rs b/src/main.rs index 96d9e63..525682b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,6 +49,11 @@ fn main() { dir: "compiler/rustc_pattern_analysis".to_owned(), in_tree_feature_name: "rustc".to_owned(), }, + RustcApCrate { + name: "rustc_index".to_owned(), + dir: "compiler/rustc_index".to_owned(), + in_tree_feature_name: "nightly".to_owned(), + }, ]; eprintln!("learning about the dependency graph"); @@ -163,13 +168,13 @@ fn get_rustc_packages(target_crates: &[RustcApCrate], dst: &Path) -> Vec().unwrap(); (|| { - let item = &toml + let item = toml .get_mut("features")? .as_table_like_mut()? - .remove(in_tree_feature_name)?; - let deps = item.as_array()?; + .get_mut(in_tree_feature_name)?; + let deps = item.as_array_mut()?; let mut res = vec![]; - for ele in deps.into_iter() { + for ele in deps.iter() { if let Some(s) = ele.as_str() { if s.contains('/') { // this just toggles something, skip it @@ -178,10 +183,14 @@ fn get_rustc_packages(target_crates: &[RustcApCrate], dst: &Path) -> Vec