about summary refs log tree commit diff
path: root/compiler/rustc_span/src/hygiene.rs
diff options
context:
space:
mode:
authordianne <diannes.gm@gmail.com>2025-06-29 22:09:30 -0700
committerdianne <diannes.gm@gmail.com>2025-07-05 17:14:06 -0700
commit68d860f8be6ce5de68cb0e9969e8426ceb3ad532 (patch)
tree58023e901dcd46bc464086f4e5016f7d92d0f690 /compiler/rustc_span/src/hygiene.rs
parentfc557bc5a5686ba3330c64b8187d883d94ac163f (diff)
downloadrust-68d860f8be6ce5de68cb0e9969e8426ceb3ad532.tar.gz
rust-68d860f8be6ce5de68cb0e9969e8426ceb3ad532.zip
remove `DesugaringKind::CondTemporary`
Diffstat (limited to 'compiler/rustc_span/src/hygiene.rs')
-rw-r--r--compiler/rustc_span/src/hygiene.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs
index 29be3b73ee9..c3080875da8 100644
--- a/compiler/rustc_span/src/hygiene.rs
+++ b/compiler/rustc_span/src/hygiene.rs
@@ -1191,11 +1191,6 @@ impl AstPass {
 /// The kind of compiler desugaring.
 #[derive(Clone, Copy, PartialEq, Debug, Encodable, Decodable, HashStable_Generic)]
 pub enum DesugaringKind {
-    /// We desugar `if c { i } else { e }` to `match $ExprKind::Use(c) { true => i, _ => e }`.
-    /// However, we do not want to blame `c` for unreachability but rather say that `i`
-    /// is unreachable. This desugaring kind allows us to avoid blaming `c`.
-    /// This also applies to `while` loops.
-    CondTemporary,
     QuestionMark,
     TryBlock,
     YeetExpr,
@@ -1230,7 +1225,6 @@ impl DesugaringKind {
     /// The description wording should combine well with "desugaring of {}".
     pub fn descr(self) -> &'static str {
         match self {
-            DesugaringKind::CondTemporary => "`if` or `while` condition",
             DesugaringKind::Async => "`async` block or function",
             DesugaringKind::Await => "`await` expression",
             DesugaringKind::QuestionMark => "operator `?`",
@@ -1253,7 +1247,6 @@ impl DesugaringKind {
     /// like `from_desugaring = "QuestionMark"`
     pub fn matches(&self, value: &str) -> bool {
         match self {
-            DesugaringKind::CondTemporary => value == "CondTemporary",
             DesugaringKind::Async => value == "Async",
             DesugaringKind::Await => value == "Await",
             DesugaringKind::QuestionMark => value == "QuestionMark",