about summary refs log tree commit diff
path: root/src/librustc/middle/astencode.rs
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2015-07-01 23:07:26 +0300
committerAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2015-07-01 23:08:40 +0300
commit2fc85718615a4261eba5ef0e696e1d995cdfd375 (patch)
tree48aa7e1b48ec5dc1ff3a56cbc3b9b5a346ad2e2a /src/librustc/middle/astencode.rs
parent40db46c6ba0d59e5ad9aa056a73055d2d3b83d04 (diff)
Fix deadlocks with RUST_LOG=rustc::middle::ty
These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.
Diffstat (limited to 'src/librustc/middle/astencode.rs')
-rw-r--r--src/librustc/middle/astencode.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs
index d2c79e1d820..a0efc50d0d7 100644
--- a/src/librustc/middle/astencode.rs
+++ b/src/librustc/middle/astencode.rs
@@ -1656,7 +1656,7 @@ fn decode_side_tables(dcx: &DecodeContext,
                     c::tag_table_tcache => {
                         let type_scheme = val_dsr.read_type_scheme(dcx);
                         let lid = ast::DefId { krate: ast::LOCAL_CRATE, node: id };
-                        dcx.tcx.tcache.borrow_mut().insert(lid, type_scheme);
+                        dcx.tcx.register_item_type(lid, type_scheme);
                     }
                     c::tag_table_param_defs => {
                         let bounds = val_dsr.read_type_param_def(dcx);