mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Add f16
and f128
support
This commit is contained in:
parent
da27b89ca5
commit
d5db933f9d
28 changed files with 384 additions and 73 deletions
|
@ -2622,6 +2622,13 @@ impl BuiltinType {
|
|||
matches!(self.inner, hir_def::builtin_type::BuiltinType::Float(_))
|
||||
}
|
||||
|
||||
pub fn is_f16(&self) -> bool {
|
||||
matches!(
|
||||
self.inner,
|
||||
hir_def::builtin_type::BuiltinType::Float(hir_def::builtin_type::BuiltinFloat::F16)
|
||||
)
|
||||
}
|
||||
|
||||
pub fn is_f32(&self) -> bool {
|
||||
matches!(
|
||||
self.inner,
|
||||
|
@ -2636,6 +2643,13 @@ impl BuiltinType {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn is_f128(&self) -> bool {
|
||||
matches!(
|
||||
self.inner,
|
||||
hir_def::builtin_type::BuiltinType::Float(hir_def::builtin_type::BuiltinFloat::F128)
|
||||
)
|
||||
}
|
||||
|
||||
pub fn is_char(&self) -> bool {
|
||||
matches!(self.inner, hir_def::builtin_type::BuiltinType::Char)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue