diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-20 14:13:52 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-22 13:20:56 +1100 |
| commit | 09c807ed829b58a67a4e4612279b5832d969b9fa (patch) | |
| tree | 28255639958f19275e340f25c5f82601b86ed7e5 /compiler | |
| parent | cf561904dbf4c2d8be6547b827af3a7387212580 (diff) | |
| download | rust-09c807ed829b58a67a4e4612279b5832d969b9fa.tar.gz rust-09c807ed829b58a67a4e4612279b5832d969b9fa.zip | |
Add two useful comments.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 6ee7213a19d..1a59d72b441 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -455,6 +455,8 @@ fn run_compiler( let ongoing_codegen = queries.ongoing_codegen()?; + // This must run after monomorphization so that all generic types + // have been instantiated. if sess.opts.unstable_opts.print_type_sizes { sess.code_stats.print_type_sizes(); } @@ -469,6 +471,8 @@ fn run_compiler( Ok(Some(linker)) })?; + // Linking is done outside the `compiler.enter()` so that the + // `GlobalCtxt` within `Queries` can be freed as early as possible. if let Some(linker) = linker { let _timer = sess.timer("link"); linker.link(sess, codegen_backend)? |
