Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 2d73168727..ac81b8140b 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -1780,6 +1780,10 @@ impl BuiltinType { matches!(self.inner, hir_def::builtin_type::BuiltinType::Char) } + pub fn is_bool(&self) -> bool { + matches!(self.inner, hir_def::builtin_type::BuiltinType::Bool) + } + pub fn is_str(&self) -> bool { matches!(self.inner, hir_def::builtin_type::BuiltinType::Str) } |