Rollup merge of #78524 - tmiasko:source-files-borrow, r=Aaron1011

Avoid BorrowMutError with RUSTC_LOG=debug

```console
$ touch empty.rs
$ env RUSTC_LOG=debug rustc +stage1 --crate-type=lib empty.rs
```

Fails with a `BorrowMutError` because source map files are already
borrowed while `features_query` attempts to format a log message
containing a span.

Release the borrow before the query to avoid the issue.
This commit is contained in:
Yuki Okushi 2020-10-30 18:00:54 +09:00 committed by GitHub
commit f8539221d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 9 deletions

View file

@ -0,0 +1 @@
// rustc-env:RUSTC_LOG=debug

View file

@ -8,7 +8,7 @@
// dont-check-compiler-stdout
// dont-check-compiler-stderr
// compile-flags: --error-format human
// aux-build: rustc-rust-log-aux.rs
// rustc-env:RUSTC_LOG=debug
fn main() {}