@@ -231,16 +231,14 @@ where
231
231
let pool = pool. clone ( ) ;
232
232
let cwd = cwd. to_owned ( ) ;
233
233
let crate_name = crate_name. to_owned ( ) ;
234
- let cargo_toml = cwd. join ( "Cargo.toml" ) ;
235
- trace ! ( "[{}]: add cargo_toml: {:?}" , crate_name, cargo_toml. display( ) ) ;
236
234
237
235
Box :: new ( dep_info. and_then ( move |_| -> SFuture < _ > {
238
236
let name2 = crate_name. clone ( ) ;
239
237
let parsed = pool. spawn_fn ( move || {
240
238
parse_dep_file ( & dep_file, & cwd)
241
239
. chain_err ( || format ! ( "Failed to parse dep info for {}" , name2) )
242
240
} ) ;
243
- Box :: new ( parsed. map ( move |mut files| {
241
+ Box :: new ( parsed. map ( move |files| {
244
242
trace ! (
245
243
"[{}]: got {} source files from dep-info in {}" ,
246
244
crate_name,
@@ -249,7 +247,6 @@ where
249
247
) ;
250
248
// Just to make sure we capture temp_dir.
251
249
drop ( temp_dir) ;
252
- files. push ( cargo_toml) ;
253
250
files
254
251
} ) )
255
252
} ) )
@@ -1291,6 +1288,11 @@ where
1291
1288
hash_all ( & source_files, & source_hashes_pool)
1292
1289
. map ( |source_hashes| ( source_files, source_hashes) )
1293
1290
} ) ;
1291
+
1292
+ let crate_name = crate_name. to_owned ( ) ;
1293
+ let cargo_toml = cwd. join ( "Cargo.toml" ) ;
1294
+ trace ! ( "[{}]: add cargo_toml: {:?}" , & crate_name, cargo_toml. display( ) ) ;
1295
+
1294
1296
// Hash the contents of the externs listed on the commandline.
1295
1297
trace ! ( "[{}]: hashing {} externs" , crate_name, externs. len( ) ) ;
1296
1298
let abs_externs = externs. iter ( ) . map ( |e| cwd. join ( e) ) . collect :: < Vec < _ > > ( ) ;
@@ -1463,6 +1465,7 @@ where
1463
1465
. into_iter ( )
1464
1466
. chain ( abs_externs)
1465
1467
. chain ( abs_staticlibs)
1468
+ . chain ( vec ! [ cargo_toml] )
1466
1469
. collect ( ) ;
1467
1470
1468
1471
HashResult {
@@ -2981,8 +2984,6 @@ c:/foo/bar.rs:
2981
2984
m. update ( empty_digest. as_bytes ( ) ) ;
2982
2985
// libbaz.a (static library, from staticlibs)
2983
2986
m. update ( empty_digest. as_bytes ( ) ) ;
2984
- // Cargo.toml
2985
- m. update ( empty_digest. as_bytes ( ) ) ;
2986
2987
// Env vars
2987
2988
OsStr :: new ( "CARGO_BLAH" ) . hash ( & mut HashToDigest { digest : & mut m } ) ;
2988
2989
m. update ( b"=" ) ;
0 commit comments