@@ -169,8 +169,6 @@ pub fn main() {
169
169
return ;
170
170
}
171
171
172
- let dep_path = env:: current_dir ( ) . expect ( "current dir is not readable" ) . join ( "target" ) . join ( "debug" ) . join ( "deps" ) ;
173
-
174
172
if let Some ( "clippy" ) = std:: env:: args ( ) . nth ( 1 ) . as_ref ( ) . map ( AsRef :: as_ref) {
175
173
// this arm is executed on the initial call to `cargo clippy`
176
174
@@ -207,12 +205,11 @@ pub fn main() {
207
205
let args = std:: env:: args ( ) . skip ( 2 ) ;
208
206
if let Some ( first) = target. kind . get ( 0 ) {
209
207
if target. kind . len ( ) > 1 || first. ends_with ( "lib" ) {
210
- if let Err ( code) = process ( std:: iter:: once ( "--lib" . to_owned ( ) ) . chain ( args) , & dep_path ) {
208
+ if let Err ( code) = process ( std:: iter:: once ( "--lib" . to_owned ( ) ) . chain ( args) ) {
211
209
std:: process:: exit ( code) ;
212
210
}
213
211
} else if [ "bin" , "example" , "test" , "bench" ] . contains ( & & * * first) {
214
- if let Err ( code) = process ( vec ! [ format!( "--{}" , first) , target. name] . into_iter ( ) . chain ( args) ,
215
- & dep_path) {
212
+ if let Err ( code) = process ( vec ! [ format!( "--{}" , first) , target. name] . into_iter ( ) . chain ( args) ) {
216
213
std:: process:: exit ( code) ;
217
214
}
218
215
}
@@ -271,9 +268,8 @@ pub fn main() {
271
268
}
272
269
}
273
270
274
- fn process < P , I > ( old_args : I , dep_path : P ) -> Result < ( ) , i32 >
275
- where P : AsRef < Path > ,
276
- I : Iterator < Item = String >
271
+ fn process < I > ( old_args : I ) -> Result < ( ) , i32 >
272
+ where I : Iterator < Item = String >
277
273
{
278
274
279
275
let mut args = vec ! [ "rustc" . to_owned( ) ] ;
@@ -286,8 +282,6 @@ fn process<P, I>(old_args: I, dep_path: P) -> Result<(), i32>
286
282
if !found_dashes {
287
283
args. push ( "--" . to_owned ( ) ) ;
288
284
}
289
- args. push ( "-L" . to_owned ( ) ) ;
290
- args. push ( dep_path. as_ref ( ) . to_string_lossy ( ) . into_owned ( ) ) ;
291
285
args. push ( "-Zno-trans" . to_owned ( ) ) ;
292
286
args. push ( "--cfg" . to_owned ( ) ) ;
293
287
args. push ( r#"feature="cargo-clippy""# . to_owned ( ) ) ;
0 commit comments