aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-tree.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-11-15 16:16:01 +0000
committerGitHub <noreply@github.com>2022-11-15 16:16:01 +0000
commit4c565999541c60ac5d1b5af618963e701b384fdd (patch)
treefca6e243cd4901ff8847206ab25ebb5dde10bb91 /gcc/rust/backend/rust-tree.cc
parent815a57351a33491e534cc1b6c6ddfa17eaf2b500 (diff)
parent9657c328d0cdda49b7985c3ee727781a387e128b (diff)
downloadgcc-4c565999541c60ac5d1b5af618963e701b384fdd.zip
gcc-4c565999541c60ac5d1b5af618963e701b384fdd.tar.gz
gcc-4c565999541c60ac5d1b5af618963e701b384fdd.tar.bz2
Merge #1635
1635: rust: Remove unused variables and fix dangling references r=CohenArthur a=CohenArthur This should make the bootstrap build green again. This commit contains some aggressive refactoring which either removes unused arguments altogether or removes the argument name in some cases where it might get used later on or cannot change due to implementing a virtual method or something like that. Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-tree.cc')
-rw-r--r--gcc/rust/backend/rust-tree.cc38
1 files changed, 7 insertions, 31 deletions
diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc
index 0c393d9..fb6ff0f 100644
--- a/gcc/rust/backend/rust-tree.cc
+++ b/gcc/rust/backend/rust-tree.cc
@@ -2059,11 +2059,7 @@ rs_tree_equal (tree t1, tree t2)
/* TRUE iff TYPE is publicly & uniquely derived from PARENT. */
-bool
-publicly_uniquely_derived_p (tree parent, tree type)
-{
- return false;
-}
+bool publicly_uniquely_derived_p (tree, tree) { return false; }
// forked from gcc/cp/typeck.cc comp_except_types
@@ -3343,11 +3339,7 @@ release_tree_vector (vec<tree, va_gc> *vec)
/* As above, but also check value-dependence of the expression as a whole. */
-bool
-instantiation_dependent_expression_p (tree expression)
-{
- return false;
-}
+bool instantiation_dependent_expression_p (tree) { return false; }
// forked from gcc/cp/cvt.cc cp_get_callee
@@ -3397,11 +3389,7 @@ scalarish_type_p (const_tree t)
constructors are deleted. This function implements the ABI notion of
non-trivial copy, which has diverged from the one in the standard. */
-bool
-type_has_nontrivial_copy_init (const_tree type)
-{
- return false;
-}
+bool type_has_nontrivial_copy_init (const_tree) { return false; }
// forked from gcc/cp/tree.cc build_local_temp
@@ -3424,11 +3412,7 @@ build_local_temp (tree type)
/* Returns true iff DECL is a capture proxy for a normal capture
(i.e. without explicit initializer). */
-bool
-is_normal_capture_proxy (tree decl)
-{
- return false;
-}
+bool is_normal_capture_proxy (tree) { return false; }
// forked from gcc/cp/c-common.cc reject_gcc_builtin
@@ -3693,7 +3677,7 @@ char_type_p (tree type)
lvalue for the function template specialization. */
tree
-resolve_nondeduced_context (tree orig_expr, tsubst_flags_t complain)
+resolve_nondeduced_context (tree orig_expr, tsubst_flags_t)
{
return orig_expr;
}
@@ -3972,21 +3956,13 @@ decl_constant_var_p (tree decl)
/* Returns true iff DECL is a variable or function declared with an auto type
that has not yet been deduced to a real type. */
-bool
-undeduced_auto_decl (tree decl)
-{
- return false;
-}
+bool undeduced_auto_decl (tree) { return false; }
// forked from gcc/cp/decl.cc require_deduced_type
/* Complain if DECL has an undeduced return type. */
-bool
-require_deduced_type (tree decl, tsubst_flags_t complain)
-{
- return true;
-}
+bool require_deduced_type (tree, tsubst_flags_t) { return true; }
/* Return the location of a tree passed to %+ formats. */