gccrs: Fix type confusion in coercion
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>
This commit is contained in:
parent
5757c304b5
commit
982f93fe13
1 changed files with 2 additions and 2 deletions
|
@ -115,8 +115,8 @@ HIRCompileBase::coercion_site1 (tree rvalue, TyTy::BaseType *rval,
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue