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

@ -1138,7 +1138,7 @@ impl Evaluator<'_> {
let mut ty = self.operand_ty(lhs, locals)?;
while let TyKind::Ref(_, _, z) = ty.kind(Interner) {
ty = z.clone();
let size = if ty.kind(Interner) == &TyKind::Str {
let size = if ty.is_str() {
if *op != BinOp::Eq {
never!("Only eq is builtin for `str`");
}