rust/compiler/rustc_interface/src
bors 657bc01888 Auto merge of #85702 - Aaron1011:no-vec-sort, r=michaelwoerister
Don't sort a `Vec` before computing its `DepTrackingHash`

Previously, we sorted the vec prior to hashing, making the hash
independent of the original (command-line argument) order. However, the
original vec was still always kept in the original order, so we were
relying on the rest of the compiler always working with it in an
'order-independent' way.

This assumption was not being upheld by the `native_libraries` query -
the order of the entires in its result depends on the order of entries
in `Options.libs`. This lead to an 'unstable fingerprint' ICE when the
`-l` arguments were re-ordered.

This PR removes the sorting logic entirely. Re-ordering command-line
arguments (without adding/removing/changing any arguments) seems like a
really niche use case, and correctly optimizing for it would require
additional work. By always hashing arguments in their original order, we
can entirely avoid a cause of 'unstable fingerprint' errors.
2021-05-31 20:03:18 +00:00
..
callbacks.rs Fix outdated crate names in rustc_interface::callbacks 2021-04-07 11:45:27 -05:00
interface.rs Change the .unwrap to .expect with a helpful message 2021-03-15 20:45:45 +08:00
lib.rs Box the biggest ast::ItemKind variants 2021-02-01 09:23:39 +01:00
passes.rs Merge CrateDisambiguator into StableCrateId 2021-05-30 12:51:34 +02:00
proc_macro_decls.rs Use () for proc_macro_decls_static. 2021-05-12 13:58:43 +02:00
queries.rs Don't panic when failing to initialize incremental directory. 2021-05-25 14:40:33 -07:00
tests.rs Don't sort a Vec before computing its DepTrackingHash 2021-05-25 22:11:39 -05:00
util.rs Merge CrateDisambiguator into StableCrateId 2021-05-30 12:51:34 +02:00