@@ -258,13 +258,11 @@ top_level_options!(
258258 lint_cap: Option <lint:: Level > [ TRACKED ] ,
259259 describe_lints: bool [ UNTRACKED ] ,
260260 output_types: OutputTypes [ TRACKED ] ,
261- // FIXME(mw): I'm not entirely sure if this can have any influence on
262- // incremental compilation apart from what is already handled
263- // by crate metadata hashes. Better track it .
261+ // FIXME(mw): We track this for now but it actually doesn't make too
262+ // much sense: The search path can stay the same while the
263+ // things discovered there might have changed on disk .
264264 search_paths: SearchPaths [ TRACKED ] ,
265- // FIXME(mw): Might not need to do dep-tracking for `libs`?
266265 libs: Vec <( String , cstore:: NativeLibraryKind ) > [ TRACKED ] ,
267- // FIXME(mw): Might not need to do dep-tracking for `maybe_sysroot`?
268266 maybe_sysroot: Option <PathBuf > [ TRACKED ] ,
269267
270268 target_triple: String [ TRACKED ] ,
@@ -280,8 +278,9 @@ top_level_options!(
280278 debugging_opts: DebuggingOptions [ TRACKED ] ,
281279 prints: Vec <PrintRequest > [ UNTRACKED ] ,
282280 cg: CodegenOptions [ TRACKED ] ,
283- // FIXME(mw): `externs` might not need to be tracked but let's err on
284- // the side of caution for now.
281+ // FIXME(mw): We track this for now but it actually doesn't make too
282+ // much sense: The value of this option can stay the same
283+ // while the files they refer to might have changed on disk.
285284 externs: Externs [ TRACKED ] ,
286285 crate_name: Option <String > [ TRACKED ] ,
287286 // An optional name to use as the crate for std during std injection,
@@ -1692,11 +1691,12 @@ mod dep_tracking {
16921691 ( $t: ty) => (
16931692 impl DepTrackingHash for Vec <$t> {
16941693 fn hash( & self , hasher: & mut SipHasher , error_format: ErrorOutputType ) {
1695- let mut elems = self . clone ( ) ;
1694+ let mut elems: Vec < & $t> = self . iter ( ) . collect ( ) ;
16961695 elems. sort( ) ;
1697- for ( i, e) in elems. iter( ) . enumerate( ) {
1698- Hash :: hash( & i, hasher) ;
1699- DepTrackingHash :: hash( e, hasher, error_format) ;
1696+ Hash :: hash( & elems. len( ) , hasher) ;
1697+ for ( index, elem) in elems. iter( ) . enumerate( ) {
1698+ Hash :: hash( & index, hasher) ;
1699+ DepTrackingHash :: hash( * elem, hasher, error_format) ;
17001700 }
17011701 }
17021702 }
0 commit comments