There was a mismatch between a manual discriminant test and the static cast.
gcc/rust/ChangeLog:
* backend/rust-compile.cc (HIRCompileBase::coercion_site1): Fix wrong cast
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
if (!valid_coercion)
return error_mark_node;
- const TyTy::ReferenceType *exp
- = static_cast<const TyTy::ReferenceType *> (expected);
+ const TyTy::PointerType *exp
+ = static_cast<const TyTy::PointerType *> (expected);
TyTy::BaseType *actual_base = nullptr;
if (actual->get_kind () == TyTy::TypeKind::REF)