aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-11-25 15:01:01 +0000
committerGitHub <noreply@github.com>2021-11-25 15:01:01 +0000
commit295f0ae16613b44c13a15ae5ada080761b62ff54 (patch)
tree0b3be7ed250e3cd25605ee7ce656b385c1c0d6b5 /gcc/rust/hir
parentbdfe6abe2b11e2ddad0b8c8a92b57297fdd73f6b (diff)
parente7e65bbdf3a06a7d00ed7da4ff8ebb16031ed6c3 (diff)
downloadgcc-295f0ae16613b44c13a15ae5ada080761b62ff54.zip
gcc-295f0ae16613b44c13a15ae5ada080761b62ff54.tar.gz
gcc-295f0ae16613b44c13a15ae5ada080761b62ff54.tar.bz2
Merge #817
817: Remove bad mutability check pass r=philberty a=philberty This was an initial pass to try and ensure all assignments were valid with respect to the binding mutability. This pass cannot be done at the name resolution level and in rustc is achieved on mir as part of the borrow checker. This patch removes this pass and associated test cases. This set of patches also adds support for indirection around array index expressions. Fixes #815 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r--gcc/rust/hir/rust-ast-lower-implitem.h6
-rw-r--r--gcc/rust/hir/rust-ast-lower-item.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-implitem.h b/gcc/rust/hir/rust-ast-lower-implitem.h
index 8f9c5d5..3613df5 100644
--- a/gcc/rust/hir/rust-ast-lower-implitem.h
+++ b/gcc/rust/hir/rust-ast-lower-implitem.h
@@ -153,7 +153,7 @@ public:
= HIR::FunctionParam (mapping, std::move (translated_pattern),
std::move (translated_type),
param.get_locus ());
- function_params.push_back (hir_param);
+ function_params.push_back (std::move (hir_param));
}
bool terminated = false;
@@ -239,7 +239,7 @@ public:
= HIR::FunctionParam (mapping, std::move (translated_pattern),
std::move (translated_type),
param.get_locus ());
- function_params.push_back (hir_param);
+ function_params.push_back (std::move (hir_param));
}
bool terminated = false;
@@ -345,7 +345,7 @@ public:
= HIR::FunctionParam (mapping, std::move (translated_pattern),
std::move (translated_type),
param.get_locus ());
- function_params.push_back (hir_param);
+ function_params.push_back (std::move (hir_param));
}
HIR::TraitFunctionDecl decl (ref.get_identifier (), std::move (qualifiers),
diff --git a/gcc/rust/hir/rust-ast-lower-item.h b/gcc/rust/hir/rust-ast-lower-item.h
index 65a4921..697e98a 100644
--- a/gcc/rust/hir/rust-ast-lower-item.h
+++ b/gcc/rust/hir/rust-ast-lower-item.h
@@ -465,7 +465,7 @@ public:
= HIR::FunctionParam (mapping, std::move (translated_pattern),
std::move (translated_type),
param.get_locus ());
- function_params.push_back (hir_param);
+ function_params.push_back (std::move (hir_param));
}
bool terminated = false;