Implement BeginPanic for mir eval

This commit is contained in:
Lukas Wirth 2024-04-19 12:42:32 +02:00
parent a9140e197c
commit 6de838c255
4 changed files with 44 additions and 7 deletions

View file

@ -27,6 +27,7 @@ pub trait TyExt {
fn is_scalar(&self) -> bool;
fn is_floating_point(&self) -> bool;
fn is_never(&self) -> bool;
fn is_str(&self) -> bool;
fn is_unknown(&self) -> bool;
fn contains_unknown(&self) -> bool;
fn is_ty_var(&self) -> bool;
@ -87,6 +88,10 @@ impl TyExt for Ty {
matches!(self.kind(Interner), TyKind::Never)
}
fn is_str(&self) -> bool {
matches!(self.kind(Interner), TyKind::Str)
}
fn is_unknown(&self) -> bool {
matches!(self.kind(Interner), TyKind::Error)
}