482a67d20f
Fixes #80336 Due to macro expansion, we may end up with spans with an invalid location and non-root `SyntaxContext`. This commits preserves the `SyntaxContext` of such spans in the incremental cache, and ensures that we always hash the `SyntaxContext` when computing the `Fingerprint` of a `Span` Previously, we would discard the `SyntaxContext` during serialization to the incremental cache, causing the span's `Fingerprint` to change across compilation sessions.
11 lines
274 B
Rust
11 lines
274 B
Rust
// Regression test for issue #80336
|
|
// Test that we properly handle encoding, decoding, and hashing
|
|
// of spans with an invalid location and non-root `SyntaxContext`
|
|
|
|
// revisions:rpass1 rpass2
|
|
// only-x86_64
|
|
|
|
pub fn main() {
|
|
let _ = is_x86_feature_detected!("avx2");
|
|
}
|