diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-10-20 16:20:03 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-10-22 10:13:06 +0100 |
commit | 5f19fb535c95f2afef30f8eb976907d5f0986041 (patch) | |
tree | 0832484163bd82af8d688196e7d62549df6281e4 /gcc | |
parent | e59ec1a592e7733900725c0e853850b1937badb5 (diff) | |
download | gcc-5f19fb535c95f2afef30f8eb976907d5f0986041.zip gcc-5f19fb535c95f2afef30f8eb976907d5f0986041.tar.gz gcc-5f19fb535c95f2afef30f8eb976907d5f0986041.tar.bz2 |
Constify SubstitutionArgumentMappings::solve_mappings_from_receiver_for_self
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/typecheck/rust-tyty.cc | 4 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-tyty.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc index f08d8cb..22255d9 100644 --- a/gcc/rust/typecheck/rust-tyty.cc +++ b/gcc/rust/typecheck/rust-tyty.cc @@ -480,14 +480,14 @@ SubstitutionRef::adjust_mappings_for_this ( // this new substitution reference so ordering matters here SubstitutionArgumentMappings SubstitutionRef::solve_mappings_from_receiver_for_self ( - SubstitutionArgumentMappings &mappings) + SubstitutionArgumentMappings &mappings) const { std::vector<SubstitutionArg> resolved_mappings; rust_assert (mappings.size () == get_num_substitutions ()); for (size_t i = 0; i < get_num_substitutions (); i++) { - SubstitutionParamMapping ¶m_mapping = substitutions.at (i); + const SubstitutionParamMapping ¶m_mapping = substitutions.at (i); SubstitutionArg &arg = mappings.get_mappings ().at (i); if (param_mapping.needs_substitution ()) diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h index 7cd99f2..0e74d49 100644 --- a/gcc/rust/typecheck/rust-tyty.h +++ b/gcc/rust/typecheck/rust-tyty.h @@ -943,7 +943,7 @@ public: // we need to figure out relevant generic arguemts for self to apply to the // fntype SubstitutionArgumentMappings solve_mappings_from_receiver_for_self ( - SubstitutionArgumentMappings &mappings); + SubstitutionArgumentMappings &mappings) const; BaseType *infer_substitions (Location locus) { |