Rollup merge of #66276 - Mark-Simulacrum:sess-code-stats, r=nikomatsakis

Move lock into CodeStats

Prevent (theoretical) accidental too-long borrows by ensuring only encapsulated locking.
This commit is contained in:
Yuki Okushi 2019-11-12 16:36:12 +09:00 committed by GitHub
commit dfd11229b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 14 deletions

View file

@ -393,7 +393,7 @@ pub fn run_compiler(
mem::drop(compiler.global_ctxt()?.take());
if sess.opts.debugging_opts.print_type_sizes {
sess.code_stats.borrow().print_type_sizes();
sess.code_stats.print_type_sizes();
}
compiler.link()?;