summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-23 09:41:30 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-25 16:18:57 +0000
commit268ec72839a2152c012bac9418f2c041e13d1aab (patch)
tree0ec90b12f14c13c2b3fd9fa5ead33bb59dd58b13 /compiler/rustc_interface/src
parentb66fe58f68d84cf422ff50c362ac5ad245cd9ce7 (diff)
downloadrust-268ec72839a2152c012bac9418f2c041e13d1aab.tar.gz
rust-268ec72839a2152c012bac9418f2c041e13d1aab.zip
Make `Iterator` a lang item
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 998e2686005..884afae23d8 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -856,6 +856,11 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
         // This check has to be run after all lints are done processing. We don't
         // define a lint filter, as all lint checks should have finished at this point.
         sess.time("check_lint_expectations", || tcx.ensure().check_expectations(None));
+
+        // This query is only invoked normally if a diagnostic is emitted that needs any
+        // diagnostic item. If the crate compiles without checking any diagnostic items,
+        // we will fail to emit overlap diagnostics. Thus we invoke it here unconditionally.
+        let _ = tcx.all_diagnostic_items(());
     });
 
     if sess.opts.unstable_opts.print_vtable_sizes {