From c0669ceb147179448b280744ab94120b56639d45 Mon Sep 17 00:00:00 2001 From: David Faust Date: Wed, 13 Oct 2021 09:50:13 -0700 Subject: Refactor HIR to use new Mutability enum Introduce a new header rust/util/rust-common.h and move the enum previously Rust::TyTy::TypeMutability there as Rust::Mutability. Update the following objects to use Mutability enum rather than a bool: - HIR::IdentifierPattern - HIR::ReferencePattern - HIR::StructPatternFieldIdent - HIR::BorrowExpr - HIR::RawPointerType - HIR::ReferenceType - HIR::StaticItem - HIR::ExternalStaticItem Also add a HIR::SelfParam::get_mut () helper, mapping its internal custom mutability to the common Rust::Mutability. Fixes: #731 --- gcc/rust/backend/rust-compile-fnparam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust/backend/rust-compile-fnparam.h') diff --git a/gcc/rust/backend/rust-compile-fnparam.h b/gcc/rust/backend/rust-compile-fnparam.h index e3f9558..9ef72ef 100644 --- a/gcc/rust/backend/rust-compile-fnparam.h +++ b/gcc/rust/backend/rust-compile-fnparam.h @@ -40,7 +40,7 @@ public: void visit (HIR::IdentifierPattern &pattern) override { - if (!pattern.is_mut) + if (!pattern.is_mut ()) decl_type = ctx->get_backend ()->immutable_type (decl_type); translated -- cgit v1.1