diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-10-31 16:48:23 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-12-25 18:48:53 +0000 |
| commit | 7b6ead2027d073613ff3f160f221f5d3a5941b0b (patch) | |
| tree | 67ba3d00c6ca93c5f23baad5525179a9a88d55a9 | |
| parent | 5b9360bb1e0ca80831ef80d521aaf0815ea6e303 (diff) | |
| download | rust-7b6ead2027d073613ff3f160f221f5d3a5941b0b.tar.gz rust-7b6ead2027d073613ff3f160f221f5d3a5941b0b.zip | |
Explain disabled span hashing.
| -rw-r--r-- | compiler/rustc_span/src/hygiene.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs index c2d8287f243..8d81d44df5b 100644 --- a/compiler/rustc_span/src/hygiene.rs +++ b/compiler/rustc_span/src/hygiene.rs @@ -104,6 +104,10 @@ fn assert_default_hashing_controls<CTX: HashStableContext>(ctx: &CTX, msg: &str) // `-Z incremental-ignore-spans` option. Normally, this option is disabled, // which will cause us to require that this method always be called with `Span` hashing // enabled. + // + // Span hashing can also be disabled without `-Z incremental-ignore-spans`. + // This is the case for instance when building a hash for name mangling. + // Such configuration must not be used for metadata. HashingControls { hash_spans } if hash_spans == !ctx.unstable_opts_incremental_ignore_spans() => {} other => panic!("Attempted hashing of {msg} with non-default HashingControls: {:?}", other), |
