about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-07 19:13:22 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-11-14 13:40:42 +0100
commitaa6a72f4a5f53f7e81a5cb15f1f129e697667964 (patch)
treeb13844576d0b4c66105335773659959e6d8bce3a /src/libsyntax
parent0e8e176b69d7f96da6c9832acf11ca9c95271815 (diff)
TAIT: use hack in ->HIR to avoid more changes
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 4cfa9988570..d358efbe543 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -1815,6 +1815,15 @@ impl TyKind {
             false
         }
     }
+
+    /// HACK(type_alias_impl_trait, Centril): A temporary crutch used
+    /// in lowering to avoid making larger changes there and beyond.
+    pub fn opaque_top_hack(&self) -> Option<&GenericBounds> {
+        match self {
+            Self::ImplTrait(_, bounds) => Some(bounds),
+            _ => None,
+        }
+    }
 }
 
 /// Syntax used to declare a trait object.