]> git.lizzy.rs Git - rust.git/commitdiff
Prevent compile parts of rustc when using `cargo dev ra-setup`
authorDmitry Murzin <diralik@yandex.ru>
Sun, 9 Aug 2020 17:21:09 +0000 (22:21 +0500)
committerDmitry Murzin <diralik@yandex.ru>
Sun, 9 Aug 2020 17:21:09 +0000 (22:21 +0500)
clippy_dev/src/ra_setup.rs

index 8617445c8a60030147556c0e221fe9155a09287e..f2bd651ab253c6419ce6395e22d7d5a18562dd78 100644 (file)
@@ -68,10 +68,11 @@ fn inject_deps_into_manifest(
     });
 
     // format a new [dependencies]-block with the new deps we need to inject
-    let mut all_deps = String::from("[dependencies]\n");
+    let mut all_deps = String::from("[target.'cfg(NOT_A_PLATFORM)'.dependencies]\n");
     new_deps.for_each(|dep_line| {
         all_deps.push_str(&dep_line);
     });
+    all_deps.push_str("\n[dependencies]\n");
 
     // replace "[dependencies]" with
     // [dependencies]