about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2025-03-04 19:37:03 -0800
committerGitHub <noreply@github.com>2025-03-04 19:37:03 -0800
commitdfbd9b2d810e9a46c1be84e5c63228b7cbebbfe5 (patch)
tree55d1ca379d06d1e7427309f2a7c9fcaf4b711794
parent48a0d5217f1fd8d6c156add27839eef9ecabe233 (diff)
parent12cc2b969d4f45423bff1771af7dcbd2f97707ff (diff)
downloadrust-dfbd9b2d810e9a46c1be84e5c63228b7cbebbfe5.tar.gz
rust-dfbd9b2d810e9a46c1be84e5c63228b7cbebbfe5.zip
Rollup merge of #137975 - Zalathar:needs-hir, r=compiler-errors
Remove unused `PpMode::needs_hir`

This method was added in #99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in #136603, which presumably avoids the problem in a more principled way.
-rw-r--r--compiler/rustc_session/src/config.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 2f67660a46b..e62a8fc0fc3 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -2887,14 +2887,6 @@ impl PpMode {
             | StableMir => true,
         }
     }
-    pub fn needs_hir(&self) -> bool {
-        use PpMode::*;
-        match *self {
-            Source(_) | AstTree | AstTreeExpanded => false,
-
-            Hir(_) | HirTree | ThirTree | ThirFlat | Mir | MirCFG | StableMir => true,
-        }
-    }
 
     pub fn needs_analysis(&self) -> bool {
         use PpMode::*;