]> git.lizzy.rs Git - rust.git/blob - src/doc/unstable-book/src/compiler-flags/src-hash-algorithm.md
Auto merge of #85421 - Smittyvb:rm_pushpop_unsafe, r=matthewjasper
[rust.git] / src / doc / unstable-book / src / compiler-flags / src-hash-algorithm.md
1 # `src-hash-algorithm`
2
3 The tracking issue for this feature is: [#70401](https://github.com/rust-lang/rust/issues/70401).
4
5 ------------------------
6
7 The `-Z src-hash-algorithm` compiler flag controls which algorithm is used when hashing each source file. The hash is stored in the debug info and can be used by a debugger to verify the source code matches the executable.
8
9 Supported hash algorithms are: `md5`, `sha1`, and `sha256`. Note that not all hash algorithms are supported by all debug info formats.
10
11 By default, the compiler chooses the hash algorithm based on the target specification.