diff options
| author | bors <bors@rust-lang.org> | 2023-02-21 01:19:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-21 01:19:25 +0000 |
| commit | 2deff71719a32af76eb4493ddb1dc4653fb88cad (patch) | |
| tree | 40f0c67b323ffca820dd9ddeec89d864e7159591 /compiler/rustc_driver_impl/src | |
| parent | 8f55d6025fec5fb648948fbe4fb6dcb4184c67bc (diff) | |
| parent | 0847b79adaf209e9d174e315e3b49127643312c6 (diff) | |
| download | rust-2deff71719a32af76eb4493ddb1dc4653fb88cad.tar.gz rust-2deff71719a32af76eb4493ddb1dc4653fb88cad.zip | |
Auto merge of #105462 - oli-obk:feeding_full, r=cjgillot,petrochenkov
give the resolver access to TyCtxt The resolver is now created after TyCtxt is created. Then macro expansion and name resolution are run and the results fed into queries just like before this PR. Since the resolver had (before this PR) mutable access to the `CStore` and the source span table, these two datastructures are now behind a `RwLock`. To ensure that these are not mutated anymore after the resolver is done, a read lock to them is leaked right after the resolver finishes. ### PRs split out of this one and leading up to it: * https://github.com/rust-lang/rust/pull/105423 * https://github.com/rust-lang/rust/pull/105357 * https://github.com/rust-lang/rust/pull/105603 * https://github.com/rust-lang/rust/pull/106776 * https://github.com/rust-lang/rust/pull/106810 * https://github.com/rust-lang/rust/pull/106812 * https://github.com/rust-lang/rust/pull/108032
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 1a4fe07b476..d7e9e00f3b6 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -320,7 +320,7 @@ fn run_compiler( } // Make sure name resolution and macro expansion is run. - queries.global_ctxt()?; + queries.global_ctxt()?.enter(|tcx| tcx.resolver_for_lowering(())); if callbacks.after_expansion(compiler, queries) == Compilation::Stop { return early_exit(); |
