aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-fnparam.h
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-10-13 09:50:13 -0700
committerDavid Faust <david.faust@oracle.com>2021-10-13 13:49:25 -0700
commitc0669ceb147179448b280744ab94120b56639d45 (patch)
tree2b448df48a9790b1ddc335809e40cb52434a16bd /gcc/rust/backend/rust-compile-fnparam.h
parent3057d98a4e3fc777b06e51cd678723f5c5b4c898 (diff)
downloadgcc-c0669ceb147179448b280744ab94120b56639d45.zip
gcc-c0669ceb147179448b280744ab94120b56639d45.tar.gz
gcc-c0669ceb147179448b280744ab94120b56639d45.tar.bz2
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
Diffstat (limited to 'gcc/rust/backend/rust-compile-fnparam.h')
-rw-r--r--gcc/rust/backend/rust-compile-fnparam.h2
1 files changed, 1 insertions, 1 deletions
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