You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clippy_dev/src/ra_setup.rs
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ use std::path::PathBuf;
11
11
// code. See https://github.com/rust-analyzer/rust-analyzer/issues/3517 and https://github.com/rust-lang/rust-clippy/issues/5514 for details
12
12
13
13
pubfnrun(rustc_path:Option<&str>){
14
-
// we can unwrap here because the arg is required here
14
+
// we can unwrap here because the arg is required by clap
15
15
let rustc_path = PathBuf::from(rustc_path.unwrap());
16
16
assert!(rustc_path.is_dir(),"path is not a directory");
17
17
let rustc_source_basedir = rustc_path.join("compiler");
@@ -49,6 +49,15 @@ fn inject_deps_into_manifest(
49
49
cargo_toml:&str,
50
50
lib_rs:&str,
51
51
) -> std::io::Result<()>{
52
+
// do not inject deps if we have aleady done so
53
+
if cargo_toml.contains("[target.'cfg(NOT_A_PLATFORM)'.dependencies]"){
54
+
eprintln!(
55
+
"cargo dev ra-setup: warning: deps already found inside {}, doing nothing.",
0 commit comments