diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-04 17:35:28 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-26 18:02:47 +0000 |
| commit | d7e9a30941e6591a4671c3df59c815dc984fd786 (patch) | |
| tree | f276d24fc3b2c37b16c8cb61a75d31bdb43f69fe /compiler/rustc_driver_impl/src | |
| parent | 365a580bc44ea63d28ce10778d73f91e0b0f4c15 (diff) | |
| download | rust-d7e9a30941e6591a4671c3df59c815dc984fd786.tar.gz rust-d7e9a30941e6591a4671c3df59c815dc984fd786.zip | |
Turn write_dep_info into a regular function
It has side-effects and as such can't be cached.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 6c8b0a6e769..6af11ce8479 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -401,9 +401,7 @@ fn run_compiler( Ok(()) })?; - // Make sure the `write_dep_info` query is run for its side - // effects of writing the dep-info and reporting errors. - queries.global_ctxt()?.enter(|tcx| tcx.write_dep_info(())); + queries.write_dep_info()?; } else { let krate = queries.parse()?; pretty::print( @@ -431,9 +429,7 @@ fn run_compiler( return early_exit(); } - // Make sure the `write_dep_info` query is run for its side - // effects of writing the dep-info and reporting errors. - queries.global_ctxt()?.enter(|tcx| tcx.write_dep_info(())); + queries.write_dep_info()?; if sess.opts.output_types.contains_key(&OutputType::DepInfo) && sess.opts.output_types.len() == 1 |
