aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-10-20 16:17:13 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-10-22 10:13:06 +0100
commite59ec1a592e7733900725c0e853850b1937badb5 (patch)
tree7cd81666903f560ec6eecde943513c6e0cf37e9d /gcc
parent9cdaff9f5aa4174bad954df3b186865e3b73918b (diff)
downloadgcc-e59ec1a592e7733900725c0e853850b1937badb5.zip
gcc-e59ec1a592e7733900725c0e853850b1937badb5.tar.gz
gcc-e59ec1a592e7733900725c0e853850b1937badb5.tar.bz2
Constify autoderef ajustments expected type field
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-autoderef.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/typecheck/rust-autoderef.h b/gcc/rust/typecheck/rust-autoderef.h
index 7a9083d..3604910 100644
--- a/gcc/rust/typecheck/rust-autoderef.h
+++ b/gcc/rust/typecheck/rust-autoderef.h
@@ -34,13 +34,13 @@ public:
DEREF_REF
};
- Adjustment (AdjustmentType type, TyTy::BaseType *expected)
+ Adjustment (AdjustmentType type, const TyTy::BaseType *expected)
: type (type), expected (expected)
{}
AdjustmentType get_type () const { return type; }
- TyTy::BaseType *get_expected () const { return expected; }
+ const TyTy::BaseType *get_expected () const { return expected; }
std::string as_string () const
{
@@ -65,7 +65,7 @@ public:
private:
AdjustmentType type;
- TyTy::BaseType *expected;
+ const TyTy::BaseType *expected;
};
} // namespace Resolver