diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2021-08-12 15:11:21 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2021-08-12 15:11:39 -0500 |
| commit | 77b02eed7b4d15e5395019d02e8c60fdfdf3ee9c (patch) | |
| tree | 9aeab22760b343459620094603a28e829dd3ea2a /compiler/rustc_query_system/src/lib.rs | |
| parent | 4498e300e41f47c75abe4e49ec91ae949aaeea5f (diff) | |
| download | rust-77b02eed7b4d15e5395019d02e8c60fdfdf3ee9c.tar.gz rust-77b02eed7b4d15e5395019d02e8c60fdfdf3ee9c.zip | |
Prevent double panic when handling incremental fingerprint mismatch
When an incremental fingerprint mismatch occurs, we debug-print our `DepNode` and query result. Unfortunately, the debug printing process may cause us to run additional queries, which can result in a re-entrant fingerprint mismatch error. To avoid a double panic, this commit adds a thread-local variable to detect re-entrant calls.
Diffstat (limited to 'compiler/rustc_query_system/src/lib.rs')
| -rw-r--r-- | compiler/rustc_query_system/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs index 0d4fb34265c..c205f0fb531 100644 --- a/compiler/rustc_query_system/src/lib.rs +++ b/compiler/rustc_query_system/src/lib.rs @@ -3,6 +3,7 @@ #![feature(hash_raw_entry)] #![feature(iter_zip)] #![feature(min_specialization)] +#![feature(thread_local_const_init)] #[macro_use] extern crate tracing; |
