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:
commit
f8539221d0
6 changed files with 18 additions and 9 deletions
1
src/test/ui/auxiliary/rustc-rust-log-aux.rs
Normal file
1
src/test/ui/auxiliary/rustc-rust-log-aux.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
// rustc-env:RUSTC_LOG=debug
|
||||
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue