Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
14e59bb317c3c901bce83deb16ee9bfa5cc90e28
rust/tests/incremental/issue-80336-invalid-span.rs

11 lines
274 B
Rust
Raw Normal View History

Properly handle `SyntaxContext` of dummy spans in incr comp 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.
2021-01-03 10:09:32 -05:00
// 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");
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 515ms Template: 12ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API