[committed,100/103] gccrs: Cleanup unused parameters to fix the bootstrap build

Message ID 20230221120230.596966-101-arthur.cohen@embecosm.com
State Unresolved
Headers
Series [committed,001/103] gccrs: Fix missing dead code analysis ICE on local enum definition |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Arthur Cohen Feb. 21, 2023, 12:02 p.m. UTC
  From: Philip Herron <herron.philip@googlemail.com>

gcc/rust/ChangeLog:

	* backend/rust-compile-type.cc (TyTyResolveCompile::visit): Remove unused parameters.
	* backend/rust-constexpr.cc (constant_value_1): Likewise.
	(fold_non_dependent_init): Likewise.
	* backend/rust-tree.cc (publicly_uniquely_derived_p): Likewise.
	(instantiation_dependent_expression_p): Likewise.
	(type_has_nontrivial_copy_init): Likewise.
	(is_normal_capture_proxy): Likewise.
	(resolve_nondeduced_context): Likewise.
	(undeduced_auto_decl): Likewise.
	(require_deduced_type): Likewise.
	* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
	* checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit): Likewise.
	* checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::visit): Likewise.
	* checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
	* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
	* checks/lints/rust-lint-marklive.cc (MarkLive::go): Likewise.
	* checks/lints/rust-lint-unused-var.cc (unused_var_walk_fn): Likewise.
	* expand/rust-macro-builtins.cc (try_expand_single_string_literal): Likewise.
	(try_expand_many_expr): Likewise.
	(parse_single_string_literal): Likewise.
	(MacroBuiltin::assert_handler): Likewise.
	(MacroBuiltin::file_handler): Likewise.
	(MacroBuiltin::column_handler): Likewise.
	(MacroBuiltin::concat_handler): Likewise.
	(MacroBuiltin::env_handler): Likewise.
	(MacroBuiltin::line_handler): Likewise.
	* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
	(ASTLoweringBase::handle_doc_item_attribute): Likewise.
	* hir/rust-hir-dump.cc (Dump::visit): Likewise.
	* hir/tree/rust-hir-full-test.cc (ConstGenericParam::accept_vis): Likewise.
	* lex/rust-lex.cc (Lexer::parse_utf8_escape): Likewise.
	(Lexer::parse_string): Likewise.
	(Lexer::parse_char_or_lifetime): Likewise.
	* lex/rust-lex.h: Likewise.
	* metadata/rust-export-metadata.cc: Likewise.
	* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
	* resolve/rust-ast-resolve-type.cc (ResolveType::visit): Likewise.
	(ResolveTypeToCanonicalPath::visit): Likewise.
	* resolve/rust-ast-verify-assignee.h: Likewise.
	* resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
	* typecheck/rust-hir-type-check-expr.h: Likewise.
	* typecheck/rust-hir-type-check-item.h: Likewise.
	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
	* typecheck/rust-tyty-rules.h: Likewise.
	* util/rust-attributes.cc (AttributeChecker::visit): Likewise.
---
 gcc/rust/backend/rust-compile-type.cc         |   8 +-
 gcc/rust/backend/rust-constexpr.cc            |   6 +-
 gcc/rust/backend/rust-tree.cc                 |  38 +-
 .../errors/privacy/rust-privacy-reporter.cc   |  58 +--
 .../errors/privacy/rust-reachability.cc       |   4 +-
 .../privacy/rust-visibility-resolver.cc       |   8 +-
 gcc/rust/checks/errors/rust-const-checker.cc  | 132 +++----
 gcc/rust/checks/errors/rust-unsafe-checker.cc | 142 +++----
 gcc/rust/checks/lints/rust-lint-marklive.cc   |   2 +-
 gcc/rust/checks/lints/rust-lint-unused-var.cc |   2 +-
 gcc/rust/expand/rust-macro-builtins.cc        |  20 +-
 gcc/rust/hir/rust-ast-lower-base.cc           | 352 +++++++++---------
 gcc/rust/hir/rust-hir-dump.cc                 |   4 +-
 gcc/rust/hir/tree/rust-hir-full-test.cc       |   2 +-
 gcc/rust/lex/rust-lex.cc                      |   6 +-
 gcc/rust/lex/rust-lex.h                       |   2 +-
 gcc/rust/metadata/rust-export-metadata.cc     |  24 +-
 gcc/rust/resolve/rust-ast-resolve-expr.cc     |   6 +-
 gcc/rust/resolve/rust-ast-resolve-type.cc     |   6 +-
 gcc/rust/resolve/rust-ast-verify-assignee.h   |   8 +-
 gcc/rust/resolve/rust-early-name-resolver.cc  | 120 +++---
 gcc/rust/typecheck/rust-hir-type-check-expr.h |  32 +-
 gcc/rust/typecheck/rust-hir-type-check-item.h |   4 +-
 .../typecheck/rust-hir-type-check-pattern.cc  |  10 +-
 gcc/rust/typecheck/rust-tyty-rules.h          |  48 +--
 gcc/rust/util/rust-attributes.cc              | 312 ++++++++--------
 26 files changed, 661 insertions(+), 695 deletions(-)
  

Patch

diff --git a/gcc/rust/backend/rust-compile-type.cc b/gcc/rust/backend/rust-compile-type.cc
index c8e1d3b4036..a1db6ade9fb 100644
--- a/gcc/rust/backend/rust-compile-type.cc
+++ b/gcc/rust/backend/rust-compile-type.cc
@@ -428,7 +428,7 @@  TyTyResolveCompile::visit (const TyTy::SliceType &type)
 }
 
 void
-TyTyResolveCompile::visit (const TyTy::BoolType &type)
+TyTyResolveCompile::visit (const TyTy::BoolType &)
 {
   translated
     = ctx->get_backend ()->named_type ("bool",
@@ -532,7 +532,7 @@  TyTyResolveCompile::visit (const TyTy::FloatType &type)
 }
 
 void
-TyTyResolveCompile::visit (const TyTy::USizeType &type)
+TyTyResolveCompile::visit (const TyTy::USizeType &)
 {
   translated = ctx->get_backend ()->named_type (
     "usize",
@@ -542,7 +542,7 @@  TyTyResolveCompile::visit (const TyTy::USizeType &type)
 }
 
 void
-TyTyResolveCompile::visit (const TyTy::ISizeType &type)
+TyTyResolveCompile::visit (const TyTy::ISizeType &)
 {
   translated = ctx->get_backend ()->named_type (
     "isize",
@@ -552,7 +552,7 @@  TyTyResolveCompile::visit (const TyTy::ISizeType &type)
 }
 
 void
-TyTyResolveCompile::visit (const TyTy::CharType &type)
+TyTyResolveCompile::visit (const TyTy::CharType &)
 {
   translated
     = ctx->get_backend ()->named_type ("char",
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc
index 23d940d04ce..912d73b5d7c 100644
--- a/gcc/rust/backend/rust-constexpr.cc
+++ b/gcc/rust/backend/rust-constexpr.cc
@@ -3996,8 +3996,7 @@  constexpr_fn_retval (const constexpr_ctx *ctx, tree body)
 // return an aggregate constant.  If UNSHARE_P, return an unshared
 // copy of the initializer.
 static tree
-constant_value_1 (tree decl, bool strict_p, bool return_aggregate_cst_ok_p,
-		  bool unshare_p)
+constant_value_1 (tree decl, bool, bool, bool unshare_p)
 {
   while (TREE_CODE (decl) == CONST_DECL)
     {
@@ -6478,8 +6477,7 @@  potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
 /* Like maybe_constant_init but first fully instantiate the argument.  */
 
 tree
-fold_non_dependent_init (tree t,
-			 tsubst_flags_t complain /*=tf_warning_or_error*/,
+fold_non_dependent_init (tree t, tsubst_flags_t /*=tf_warning_or_error*/,
 			 bool manifestly_const_eval /*=false*/,
 			 tree object /* = NULL_TREE */)
 {
diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc
index d2d170c23f1..8243d4cf5c6 100644
--- a/gcc/rust/backend/rust-tree.cc
+++ b/gcc/rust/backend/rust-tree.cc
@@ -2060,11 +2060,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
 
@@ -3344,11 +3340,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
 
@@ -3398,11 +3390,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
 
@@ -3425,11 +3413,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
 
@@ -3694,7 +3678,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;
 }
@@ -3973,21 +3957,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.  */
 
diff --git a/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc b/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
index a126e7b4462..7417f31b510 100644
--- a/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
+++ b/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
@@ -226,7 +226,7 @@  PrivacyReporter::visit (HIR::PathInExpression &path)
 }
 
 void
-PrivacyReporter::visit (HIR::TypePathSegmentFunction &segment)
+PrivacyReporter::visit (HIR::TypePathSegmentFunction &)
 {
   // FIXME: Do we need to do anything for this?
 }
@@ -253,7 +253,7 @@  PrivacyReporter::visit (HIR::QualifiedPathInType &path)
 }
 
 void
-PrivacyReporter::visit (HIR::LiteralExpr &expr)
+PrivacyReporter::visit (HIR::LiteralExpr &)
 {
   // Literals cannot contain any sort of privacy violation
 }
@@ -371,13 +371,13 @@  PrivacyReporter::visit (HIR::TupleIndexExpr &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::StructExprStruct &expr)
+PrivacyReporter::visit (HIR::StructExprStruct &)
 {
   // FIXME: We need to check the visibility of the type it refers to here
 }
 
 void
-PrivacyReporter::visit (HIR::StructExprFieldIdentifier &field)
+PrivacyReporter::visit (HIR::StructExprFieldIdentifier &)
 {}
 
 void
@@ -426,7 +426,7 @@  PrivacyReporter::visit (HIR::FieldAccessExpr &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::ClosureExpr &expr)
+PrivacyReporter::visit (HIR::ClosureExpr &)
 {
   // Not handled yet
 }
@@ -443,7 +443,7 @@  PrivacyReporter::visit (HIR::BlockExpr &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::ContinueExpr &expr)
+PrivacyReporter::visit (HIR::ContinueExpr &)
 {}
 
 void
@@ -474,7 +474,7 @@  PrivacyReporter::visit (HIR::RangeToExpr &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::RangeFullExpr &expr)
+PrivacyReporter::visit (HIR::RangeFullExpr &)
 {}
 
 void
@@ -485,7 +485,7 @@  PrivacyReporter::visit (HIR::RangeFromToInclExpr &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::RangeToInclExpr &expr)
+PrivacyReporter::visit (HIR::RangeToInclExpr &)
 {
   // Not handled yet
 }
@@ -564,14 +564,14 @@  PrivacyReporter::visit (HIR::IfExprConseqIfLet &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::IfLetExpr &expr)
+PrivacyReporter::visit (HIR::IfLetExpr &)
 {
   // TODO: We need to visit the if_let_expr
   // TODO: We need to visit the block as well
 }
 
 void
-PrivacyReporter::visit (HIR::IfLetExprConseqElse &expr)
+PrivacyReporter::visit (HIR::IfLetExprConseqElse &)
 {
   // TODO: We need to visit the if_let_expr
   // TODO: We need to visit the if_block as well
@@ -579,7 +579,7 @@  PrivacyReporter::visit (HIR::IfLetExprConseqElse &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::IfLetExprConseqIf &expr)
+PrivacyReporter::visit (HIR::IfLetExprConseqIf &)
 {
   // TODO: We need to visit the if_let_expr
   // TODO: We need to visit the if_block as well
@@ -587,7 +587,7 @@  PrivacyReporter::visit (HIR::IfLetExprConseqIf &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::IfLetExprConseqIfLet &expr)
+PrivacyReporter::visit (HIR::IfLetExprConseqIfLet &)
 {
   // TODO: We need to visit the if_let_expr
   // TODO: We need to visit the if_block as well
@@ -601,13 +601,13 @@  PrivacyReporter::visit (HIR::MatchExpr &expr)
 }
 
 void
-PrivacyReporter::visit (HIR::AwaitExpr &expr)
+PrivacyReporter::visit (HIR::AwaitExpr &)
 {
   // Not handled yet
 }
 
 void
-PrivacyReporter::visit (HIR::AsyncBlockExpr &expr)
+PrivacyReporter::visit (HIR::AsyncBlockExpr &)
 {
   // Not handled yet
 }
@@ -628,11 +628,11 @@  PrivacyReporter::visit (HIR::Module &module)
 }
 
 void
-PrivacyReporter::visit (HIR::ExternCrate &crate)
+PrivacyReporter::visit (HIR::ExternCrate &)
 {}
 
 void
-PrivacyReporter::visit (HIR::UseDeclaration &use_decl)
+PrivacyReporter::visit (HIR::UseDeclaration &)
 {
   // FIXME: Is there anything we need to do here?
 }
@@ -647,51 +647,51 @@  PrivacyReporter::visit (HIR::Function &function)
 }
 
 void
-PrivacyReporter::visit (HIR::TypeAlias &type_alias)
+PrivacyReporter::visit (HIR::TypeAlias &)
 {
   // TODO: Check the type here
 }
 
 void
-PrivacyReporter::visit (HIR::StructStruct &struct_item)
+PrivacyReporter::visit (HIR::StructStruct &)
 {
   // TODO: Check the type of all fields
 }
 
 void
-PrivacyReporter::visit (HIR::TupleStruct &tuple_struct)
+PrivacyReporter::visit (HIR::TupleStruct &)
 {
   // TODO: Check the type of all fields
 }
 
 void
-PrivacyReporter::visit (HIR::EnumItem &item)
+PrivacyReporter::visit (HIR::EnumItem &)
 {
   // TODO: Check the type of all variants
 }
 
 void
-PrivacyReporter::visit (HIR::EnumItemTuple &item)
+PrivacyReporter::visit (HIR::EnumItemTuple &)
 {
   // TODO: Check the type
 }
 
 void
-PrivacyReporter::visit (HIR::EnumItemStruct &item)
+PrivacyReporter::visit (HIR::EnumItemStruct &)
 {
   // TODO: Check the type
 }
 
 void
-PrivacyReporter::visit (HIR::EnumItemDiscriminant &item)
+PrivacyReporter::visit (HIR::EnumItemDiscriminant &)
 {}
 
 void
-PrivacyReporter::visit (HIR::Enum &enum_item)
+PrivacyReporter::visit (HIR::Enum &)
 {}
 
 void
-PrivacyReporter::visit (HIR::Union &union_item)
+PrivacyReporter::visit (HIR::Union &)
 {
   // TODO: Check the type
 }
@@ -711,7 +711,7 @@  PrivacyReporter::visit (HIR::StaticItem &static_item)
 }
 
 void
-PrivacyReporter::visit (HIR::Trait &trait)
+PrivacyReporter::visit (HIR::Trait &)
 {
   // FIXME: We need to be an ItemVisitor as well
   // for (auto &item : trait.get_trait_items ())
@@ -726,15 +726,15 @@  PrivacyReporter::visit (HIR::ImplBlock &impl)
 }
 
 void
-PrivacyReporter::visit (HIR::ExternBlock &block)
+PrivacyReporter::visit (HIR::ExternBlock &)
 {
   // FIXME: We need to be an ItemVisitor as well
-  // for (auto &item : block.get_extern_items ())
+  // for (auto &block: block.get_extern_items ())
   //   item->accept_vis (*this);
 }
 
 void
-PrivacyReporter::visit (HIR::EmptyStmt &stmt)
+PrivacyReporter::visit (HIR::EmptyStmt &)
 {}
 
 void
diff --git a/gcc/rust/checks/errors/privacy/rust-reachability.cc b/gcc/rust/checks/errors/privacy/rust-reachability.cc
index d61193ec139..b9a2b363708 100644
--- a/gcc/rust/checks/errors/privacy/rust-reachability.cc
+++ b/gcc/rust/checks/errors/privacy/rust-reachability.cc
@@ -140,7 +140,7 @@  ReachabilityVisitor::visit (HIR::StructStruct &struct_item)
 }
 
 void
-ReachabilityVisitor::visit (HIR::TupleStruct &tuple_struct)
+ReachabilityVisitor::visit (HIR::TupleStruct &)
 {}
 
 void
@@ -227,7 +227,7 @@  ReachabilityVisitor::visit (HIR::ImplBlock &impl)
 }
 
 void
-ReachabilityVisitor::visit (HIR::ExternBlock &block)
+ReachabilityVisitor::visit (HIR::ExternBlock &)
 {}
 
 // FIXME: How can we visit Blocks in the current configuration? Have a full
diff --git a/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc b/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
index c27bf791b28..becb9fd93a7 100644
--- a/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
+++ b/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
@@ -141,11 +141,11 @@  VisibilityResolver::visit (HIR::Module &mod)
 }
 
 void
-VisibilityResolver::visit (HIR::ExternCrate &crate)
+VisibilityResolver::visit (HIR::ExternCrate &)
 {}
 
 void
-VisibilityResolver::visit (HIR::UseDeclaration &use_decl)
+VisibilityResolver::visit (HIR::UseDeclaration &)
 {}
 
 void
@@ -185,7 +185,7 @@  VisibilityResolver::visit (HIR::Enum &enum_item)
 }
 
 void
-VisibilityResolver::visit (HIR::Union &union_item)
+VisibilityResolver::visit (HIR::Union &)
 {}
 
 void
@@ -238,7 +238,7 @@  VisibilityResolver::visit (HIR::ImplBlock &impl)
 }
 
 void
-VisibilityResolver::visit (HIR::ExternBlock &block)
+VisibilityResolver::visit (HIR::ExternBlock &)
 {}
 
 } // namespace Privacy
diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc
index 9161fa1ea2a..576c1b170d6 100644
--- a/gcc/rust/checks/errors/rust-const-checker.cc
+++ b/gcc/rust/checks/errors/rust-const-checker.cc
@@ -114,43 +114,43 @@  ConstChecker::check_default_const_generics (
 }
 
 void
-ConstChecker::visit (Lifetime &lifetime)
+ConstChecker::visit (Lifetime &)
 {}
 
 void
-ConstChecker::visit (LifetimeParam &lifetime_param)
+ConstChecker::visit (LifetimeParam &)
 {}
 
 void
-ConstChecker::visit (PathInExpression &path)
+ConstChecker::visit (PathInExpression &)
 {}
 
 void
-ConstChecker::visit (TypePathSegment &segment)
+ConstChecker::visit (TypePathSegment &)
 {}
 
 void
-ConstChecker::visit (TypePathSegmentGeneric &segment)
+ConstChecker::visit (TypePathSegmentGeneric &)
 {}
 
 void
-ConstChecker::visit (TypePathSegmentFunction &segment)
+ConstChecker::visit (TypePathSegmentFunction &)
 {}
 
 void
-ConstChecker::visit (TypePath &path)
+ConstChecker::visit (TypePath &)
 {}
 
 void
-ConstChecker::visit (QualifiedPathInExpression &path)
+ConstChecker::visit (QualifiedPathInExpression &)
 {}
 
 void
-ConstChecker::visit (QualifiedPathInType &path)
+ConstChecker::visit (QualifiedPathInType &)
 {}
 
 void
-ConstChecker::visit (LiteralExpr &expr)
+ConstChecker::visit (LiteralExpr &)
 {}
 
 void
@@ -270,11 +270,11 @@  ConstChecker::visit (TupleIndexExpr &expr)
 }
 
 void
-ConstChecker::visit (StructExprStruct &expr)
+ConstChecker::visit (StructExprStruct &)
 {}
 
 void
-ConstChecker::visit (StructExprFieldIdentifier &field)
+ConstChecker::visit (StructExprFieldIdentifier &)
 {}
 
 void
@@ -297,7 +297,7 @@  ConstChecker::visit (StructExprStructFields &expr)
 }
 
 void
-ConstChecker::visit (StructExprStructBase &expr)
+ConstChecker::visit (StructExprStructBase &)
 {}
 
 void
@@ -398,7 +398,7 @@  ConstChecker::visit (BlockExpr &expr)
 }
 
 void
-ConstChecker::visit (ContinueExpr &expr)
+ConstChecker::visit (ContinueExpr &)
 {}
 
 void
@@ -428,7 +428,7 @@  ConstChecker::visit (RangeToExpr &expr)
 }
 
 void
-ConstChecker::visit (RangeFullExpr &expr)
+ConstChecker::visit (RangeFullExpr &)
 {}
 
 void
@@ -439,7 +439,7 @@  ConstChecker::visit (RangeFromToInclExpr &expr)
 }
 
 void
-ConstChecker::visit (RangeToInclExpr &expr)
+ConstChecker::visit (RangeToInclExpr &)
 {
   // FIXME: Visit to_expr
 }
@@ -558,31 +558,31 @@  ConstChecker::visit (MatchExpr &expr)
 }
 
 void
-ConstChecker::visit (AwaitExpr &expr)
+ConstChecker::visit (AwaitExpr &)
 {
   // TODO: Visit expression
 }
 
 void
-ConstChecker::visit (AsyncBlockExpr &expr)
+ConstChecker::visit (AsyncBlockExpr &)
 {
   // TODO: Visit block expression
 }
 
 void
-ConstChecker::visit (TypeParam &param)
+ConstChecker::visit (TypeParam &)
 {}
 
 void
-ConstChecker::visit (ConstGenericParam &param)
+ConstChecker::visit (ConstGenericParam &)
 {}
 
 void
-ConstChecker::visit (LifetimeWhereClauseItem &item)
+ConstChecker::visit (LifetimeWhereClauseItem &)
 {}
 
 void
-ConstChecker::visit (TypeBoundWhereClauseItem &item)
+ConstChecker::visit (TypeBoundWhereClauseItem &)
 {}
 
 void
@@ -593,23 +593,23 @@  ConstChecker::visit (Module &module)
 }
 
 void
-ConstChecker::visit (ExternCrate &crate)
+ConstChecker::visit (ExternCrate &)
 {}
 
 void
-ConstChecker::visit (UseTreeGlob &use_tree)
+ConstChecker::visit (UseTreeGlob &)
 {}
 
 void
-ConstChecker::visit (UseTreeList &use_tree)
+ConstChecker::visit (UseTreeList &)
 {}
 
 void
-ConstChecker::visit (UseTreeRebind &use_tree)
+ConstChecker::visit (UseTreeRebind &)
 {}
 
 void
-ConstChecker::visit (UseDeclaration &use_decl)
+ConstChecker::visit (UseDeclaration &)
 {}
 
 void
@@ -653,15 +653,15 @@  ConstChecker::visit (TupleStruct &tuple_struct)
 }
 
 void
-ConstChecker::visit (EnumItem &enum_item)
+ConstChecker::visit (EnumItem &)
 {}
 
 void
-ConstChecker::visit (EnumItemTuple &item)
+ConstChecker::visit (EnumItemTuple &)
 {}
 
 void
-ConstChecker::visit (EnumItemStruct &item)
+ConstChecker::visit (EnumItemStruct &)
 {}
 
 void
@@ -723,7 +723,7 @@  ConstChecker::visit (TraitItemConst &item)
 }
 
 void
-ConstChecker::visit (TraitItemType &item)
+ConstChecker::visit (TraitItemType &)
 {}
 
 void
@@ -747,11 +747,11 @@  ConstChecker::visit (ImplBlock &impl)
 }
 
 void
-ConstChecker::visit (ExternalStaticItem &item)
+ConstChecker::visit (ExternalStaticItem &)
 {}
 
 void
-ConstChecker::visit (ExternalFunctionItem &item)
+ConstChecker::visit (ExternalFunctionItem &)
 {}
 
 void
@@ -763,87 +763,87 @@  ConstChecker::visit (ExternBlock &block)
 }
 
 void
-ConstChecker::visit (LiteralPattern &pattern)
+ConstChecker::visit (LiteralPattern &)
 {}
 
 void
-ConstChecker::visit (IdentifierPattern &pattern)
+ConstChecker::visit (IdentifierPattern &)
 {}
 
 void
-ConstChecker::visit (WildcardPattern &pattern)
+ConstChecker::visit (WildcardPattern &)
 {}
 
 void
-ConstChecker::visit (RangePatternBoundLiteral &bound)
+ConstChecker::visit (RangePatternBoundLiteral &)
 {}
 
 void
-ConstChecker::visit (RangePatternBoundPath &bound)
+ConstChecker::visit (RangePatternBoundPath &)
 {}
 
 void
-ConstChecker::visit (RangePatternBoundQualPath &bound)
+ConstChecker::visit (RangePatternBoundQualPath &)
 {}
 
 void
-ConstChecker::visit (RangePattern &pattern)
+ConstChecker::visit (RangePattern &)
 {}
 
 void
-ConstChecker::visit (ReferencePattern &pattern)
+ConstChecker::visit (ReferencePattern &)
 {}
 
 void
-ConstChecker::visit (StructPatternFieldTuplePat &field)
+ConstChecker::visit (StructPatternFieldTuplePat &)
 {}
 
 void
-ConstChecker::visit (StructPatternFieldIdentPat &field)
+ConstChecker::visit (StructPatternFieldIdentPat &)
 {}
 
 void
-ConstChecker::visit (StructPatternFieldIdent &field)
+ConstChecker::visit (StructPatternFieldIdent &)
 {}
 
 void
-ConstChecker::visit (StructPattern &pattern)
+ConstChecker::visit (StructPattern &)
 {}
 
 void
-ConstChecker::visit (TupleStructItemsNoRange &tuple_items)
+ConstChecker::visit (TupleStructItemsNoRange &)
 {}
 
 void
-ConstChecker::visit (TupleStructItemsRange &tuple_items)
+ConstChecker::visit (TupleStructItemsRange &)
 {}
 
 void
-ConstChecker::visit (TupleStructPattern &pattern)
+ConstChecker::visit (TupleStructPattern &)
 {}
 
 void
-ConstChecker::visit (TuplePatternItemsMultiple &tuple_items)
+ConstChecker::visit (TuplePatternItemsMultiple &)
 {}
 
 void
-ConstChecker::visit (TuplePatternItemsRanged &tuple_items)
+ConstChecker::visit (TuplePatternItemsRanged &)
 {}
 
 void
-ConstChecker::visit (TuplePattern &pattern)
+ConstChecker::visit (TuplePattern &)
 {}
 
 void
-ConstChecker::visit (GroupedPattern &pattern)
+ConstChecker::visit (GroupedPattern &)
 {}
 
 void
-ConstChecker::visit (SlicePattern &pattern)
+ConstChecker::visit (SlicePattern &)
 {}
 
 void
-ConstChecker::visit (EmptyStmt &stmt)
+ConstChecker::visit (EmptyStmt &)
 {}
 
 void
@@ -866,39 +866,39 @@  ConstChecker::visit (ExprStmtWithBlock &stmt)
 }
 
 void
-ConstChecker::visit (TraitBound &bound)
+ConstChecker::visit (TraitBound &)
 {}
 
 void
-ConstChecker::visit (ImplTraitType &type)
+ConstChecker::visit (ImplTraitType &)
 {}
 
 void
-ConstChecker::visit (TraitObjectType &type)
+ConstChecker::visit (TraitObjectType &)
 {}
 
 void
-ConstChecker::visit (ParenthesisedType &type)
+ConstChecker::visit (ParenthesisedType &)
 {}
 
 void
-ConstChecker::visit (ImplTraitTypeOneBound &type)
+ConstChecker::visit (ImplTraitTypeOneBound &)
 {}
 
 void
-ConstChecker::visit (TupleType &type)
+ConstChecker::visit (TupleType &)
 {}
 
 void
-ConstChecker::visit (NeverType &type)
+ConstChecker::visit (NeverType &)
 {}
 
 void
-ConstChecker::visit (RawPointerType &type)
+ConstChecker::visit (RawPointerType &)
 {}
 
 void
-ConstChecker::visit (ReferenceType &type)
+ConstChecker::visit (ReferenceType &)
 {}
 
 void
@@ -912,15 +912,15 @@  ConstChecker::visit (ArrayType &type)
 }
 
 void
-ConstChecker::visit (SliceType &type)
+ConstChecker::visit (SliceType &)
 {}
 
 void
-ConstChecker::visit (InferredType &type)
+ConstChecker::visit (InferredType &)
 {}
 
 void
-ConstChecker::visit (BareFunctionType &type)
+ConstChecker::visit (BareFunctionType &)
 {}
 
 } // namespace HIR
diff --git a/gcc/rust/checks/errors/rust-unsafe-checker.cc b/gcc/rust/checks/errors/rust-unsafe-checker.cc
index 3d534743eeb..94808632c04 100644
--- a/gcc/rust/checks/errors/rust-unsafe-checker.cc
+++ b/gcc/rust/checks/errors/rust-unsafe-checker.cc
@@ -180,11 +180,11 @@  UnsafeChecker::check_function_call (HirId node_id, Location locus)
 }
 
 void
-UnsafeChecker::visit (Lifetime &lifetime)
+UnsafeChecker::visit (Lifetime &)
 {}
 
 void
-UnsafeChecker::visit (LifetimeParam &lifetime_param)
+UnsafeChecker::visit (LifetimeParam &)
 {}
 
 void
@@ -203,31 +203,31 @@  UnsafeChecker::visit (PathInExpression &path)
 }
 
 void
-UnsafeChecker::visit (TypePathSegment &segment)
+UnsafeChecker::visit (TypePathSegment &)
 {}
 
 void
-UnsafeChecker::visit (TypePathSegmentGeneric &segment)
+UnsafeChecker::visit (TypePathSegmentGeneric &)
 {}
 
 void
-UnsafeChecker::visit (TypePathSegmentFunction &segment)
+UnsafeChecker::visit (TypePathSegmentFunction &)
 {}
 
 void
-UnsafeChecker::visit (TypePath &path)
+UnsafeChecker::visit (TypePath &)
 {}
 
 void
-UnsafeChecker::visit (QualifiedPathInExpression &path)
+UnsafeChecker::visit (QualifiedPathInExpression &)
 {}
 
 void
-UnsafeChecker::visit (QualifiedPathInType &path)
+UnsafeChecker::visit (QualifiedPathInType &)
 {}
 
 void
-UnsafeChecker::visit (LiteralExpr &expr)
+UnsafeChecker::visit (LiteralExpr &)
 {}
 
 void
@@ -349,11 +349,11 @@  UnsafeChecker::visit (TupleIndexExpr &expr)
 }
 
 void
-UnsafeChecker::visit (StructExprStruct &expr)
+UnsafeChecker::visit (StructExprStruct &)
 {}
 
 void
-UnsafeChecker::visit (StructExprFieldIdentifier &field)
+UnsafeChecker::visit (StructExprFieldIdentifier &)
 {}
 
 void
@@ -376,7 +376,7 @@  UnsafeChecker::visit (StructExprStructFields &expr)
 }
 
 void
-UnsafeChecker::visit (StructExprStructBase &expr)
+UnsafeChecker::visit (StructExprStructBase &)
 {}
 
 void
@@ -469,7 +469,7 @@  UnsafeChecker::visit (BlockExpr &expr)
 }
 
 void
-UnsafeChecker::visit (ContinueExpr &expr)
+UnsafeChecker::visit (ContinueExpr &)
 {}
 
 void
@@ -499,7 +499,7 @@  UnsafeChecker::visit (RangeToExpr &expr)
 }
 
 void
-UnsafeChecker::visit (RangeFullExpr &expr)
+UnsafeChecker::visit (RangeFullExpr &)
 {}
 
 void
@@ -633,31 +633,31 @@  UnsafeChecker::visit (MatchExpr &expr)
 }
 
 void
-UnsafeChecker::visit (AwaitExpr &expr)
+UnsafeChecker::visit (AwaitExpr &)
 {
   // TODO: Visit expression
 }
 
 void
-UnsafeChecker::visit (AsyncBlockExpr &expr)
+UnsafeChecker::visit (AsyncBlockExpr &)
 {
   // TODO: Visit block expression
 }
 
 void
-UnsafeChecker::visit (TypeParam &param)
+UnsafeChecker::visit (TypeParam &)
 {}
 
 void
-UnsafeChecker::visit (ConstGenericParam &param)
+UnsafeChecker::visit (ConstGenericParam &)
 {}
 
 void
-UnsafeChecker::visit (LifetimeWhereClauseItem &item)
+UnsafeChecker::visit (LifetimeWhereClauseItem &)
 {}
 
 void
-UnsafeChecker::visit (TypeBoundWhereClauseItem &item)
+UnsafeChecker::visit (TypeBoundWhereClauseItem &)
 {}
 
 void
@@ -668,23 +668,23 @@  UnsafeChecker::visit (Module &module)
 }
 
 void
-UnsafeChecker::visit (ExternCrate &crate)
+UnsafeChecker::visit (ExternCrate &)
 {}
 
 void
-UnsafeChecker::visit (UseTreeGlob &use_tree)
+UnsafeChecker::visit (UseTreeGlob &)
 {}
 
 void
-UnsafeChecker::visit (UseTreeList &use_tree)
+UnsafeChecker::visit (UseTreeList &)
 {}
 
 void
-UnsafeChecker::visit (UseTreeRebind &use_tree)
+UnsafeChecker::visit (UseTreeRebind &)
 {}
 
 void
-UnsafeChecker::visit (UseDeclaration &use_decl)
+UnsafeChecker::visit (UseDeclaration &)
 {}
 
 void
@@ -702,42 +702,42 @@  UnsafeChecker::visit (Function &function)
 }
 
 void
-UnsafeChecker::visit (TypeAlias &type_alias)
+UnsafeChecker::visit (TypeAlias &)
 {
   // FIXME: What do we need to do to handle type aliasing? Is it possible to
   // have unsafe types? Type aliases on unsafe functions?
 }
 
 void
-UnsafeChecker::visit (StructStruct &struct_item)
+UnsafeChecker::visit (StructStruct &)
 {}
 
 void
-UnsafeChecker::visit (TupleStruct &tuple_struct)
+UnsafeChecker::visit (TupleStruct &)
 {}
 
 void
-UnsafeChecker::visit (EnumItem &item)
+UnsafeChecker::visit (EnumItem &)
 {}
 
 void
-UnsafeChecker::visit (EnumItemTuple &item)
+UnsafeChecker::visit (EnumItemTuple &)
 {}
 
 void
-UnsafeChecker::visit (EnumItemStruct &item)
+UnsafeChecker::visit (EnumItemStruct &)
 {}
 
 void
-UnsafeChecker::visit (EnumItemDiscriminant &item)
+UnsafeChecker::visit (EnumItemDiscriminant &)
 {}
 
 void
-UnsafeChecker::visit (Enum &enum_item)
+UnsafeChecker::visit (Enum &)
 {}
 
 void
-UnsafeChecker::visit (Union &union_item)
+UnsafeChecker::visit (Union &)
 {}
 
 void
@@ -767,7 +767,7 @@  UnsafeChecker::visit (TraitItemConst &item)
 }
 
 void
-UnsafeChecker::visit (TraitItemType &item)
+UnsafeChecker::visit (TraitItemType &)
 {}
 
 void
@@ -787,11 +787,11 @@  UnsafeChecker::visit (ImplBlock &impl)
 }
 
 void
-UnsafeChecker::visit (ExternalStaticItem &item)
+UnsafeChecker::visit (ExternalStaticItem &)
 {}
 
 void
-UnsafeChecker::visit (ExternalFunctionItem &item)
+UnsafeChecker::visit (ExternalFunctionItem &)
 {}
 
 void
@@ -803,87 +803,87 @@  UnsafeChecker::visit (ExternBlock &block)
 }
 
 void
-UnsafeChecker::visit (LiteralPattern &pattern)
+UnsafeChecker::visit (LiteralPattern &)
 {}
 
 void
-UnsafeChecker::visit (IdentifierPattern &pattern)
+UnsafeChecker::visit (IdentifierPattern &)
 {}
 
 void
-UnsafeChecker::visit (WildcardPattern &pattern)
+UnsafeChecker::visit (WildcardPattern &)
 {}
 
 void
-UnsafeChecker::visit (RangePatternBoundLiteral &bound)
+UnsafeChecker::visit (RangePatternBoundLiteral &)
 {}
 
 void
-UnsafeChecker::visit (RangePatternBoundPath &bound)
+UnsafeChecker::visit (RangePatternBoundPath &)
 {}
 
 void
-UnsafeChecker::visit (RangePatternBoundQualPath &bound)
+UnsafeChecker::visit (RangePatternBoundQualPath &)
 {}
 
 void
-UnsafeChecker::visit (RangePattern &pattern)
+UnsafeChecker::visit (RangePattern &)
 {}
 
 void
-UnsafeChecker::visit (ReferencePattern &pattern)
+UnsafeChecker::visit (ReferencePattern &)
 {}
 
 void
-UnsafeChecker::visit (StructPatternFieldTuplePat &field)
+UnsafeChecker::visit (StructPatternFieldTuplePat &)
 {}
 
 void
-UnsafeChecker::visit (StructPatternFieldIdentPat &field)
+UnsafeChecker::visit (StructPatternFieldIdentPat &)
 {}
 
 void
-UnsafeChecker::visit (StructPatternFieldIdent &field)
+UnsafeChecker::visit (StructPatternFieldIdent &)
 {}
 
 void
-UnsafeChecker::visit (StructPattern &pattern)
+UnsafeChecker::visit (StructPattern &)
 {}
 
 void
-UnsafeChecker::visit (TupleStructItemsNoRange &tuple_items)
+UnsafeChecker::visit (TupleStructItemsNoRange &)
 {}
 
 void
-UnsafeChecker::visit (TupleStructItemsRange &tuple_items)
+UnsafeChecker::visit (TupleStructItemsRange &)
 {}
 
 void
-UnsafeChecker::visit (TupleStructPattern &pattern)
+UnsafeChecker::visit (TupleStructPattern &)
 {}
 
 void
-UnsafeChecker::visit (TuplePatternItemsMultiple &tuple_items)
+UnsafeChecker::visit (TuplePatternItemsMultiple &)
 {}
 
 void
-UnsafeChecker::visit (TuplePatternItemsRanged &tuple_items)
+UnsafeChecker::visit (TuplePatternItemsRanged &)
 {}
 
 void
-UnsafeChecker::visit (TuplePattern &pattern)
+UnsafeChecker::visit (TuplePattern &)
 {}
 
 void
-UnsafeChecker::visit (GroupedPattern &pattern)
+UnsafeChecker::visit (GroupedPattern &)
 {}
 
 void
-UnsafeChecker::visit (SlicePattern &pattern)
+UnsafeChecker::visit (SlicePattern &)
 {}
 
 void
-UnsafeChecker::visit (EmptyStmt &stmt)
+UnsafeChecker::visit (EmptyStmt &)
 {}
 
 void
@@ -906,55 +906,55 @@  UnsafeChecker::visit (ExprStmtWithBlock &stmt)
 }
 
 void
-UnsafeChecker::visit (TraitBound &bound)
+UnsafeChecker::visit (TraitBound &)
 {}
 
 void
-UnsafeChecker::visit (ImplTraitType &type)
+UnsafeChecker::visit (ImplTraitType &)
 {}
 
 void
-UnsafeChecker::visit (TraitObjectType &type)
+UnsafeChecker::visit (TraitObjectType &)
 {}
 
 void
-UnsafeChecker::visit (ParenthesisedType &type)
+UnsafeChecker::visit (ParenthesisedType &)
 {}
 
 void
-UnsafeChecker::visit (ImplTraitTypeOneBound &type)
+UnsafeChecker::visit (ImplTraitTypeOneBound &)
 {}
 
 void
-UnsafeChecker::visit (TupleType &type)
+UnsafeChecker::visit (TupleType &)
 {}
 
 void
-UnsafeChecker::visit (NeverType &type)
+UnsafeChecker::visit (NeverType &)
 {}
 
 void
-UnsafeChecker::visit (RawPointerType &type)
+UnsafeChecker::visit (RawPointerType &)
 {}
 
 void
-UnsafeChecker::visit (ReferenceType &type)
+UnsafeChecker::visit (ReferenceType &)
 {}
 
 void
-UnsafeChecker::visit (ArrayType &type)
+UnsafeChecker::visit (ArrayType &)
 {}
 
 void
-UnsafeChecker::visit (SliceType &type)
+UnsafeChecker::visit (SliceType &)
 {}
 
 void
-UnsafeChecker::visit (InferredType &type)
+UnsafeChecker::visit (InferredType &)
 {}
 
 void
-UnsafeChecker::visit (BareFunctionType &type)
+UnsafeChecker::visit (BareFunctionType &)
 {}
 
 } // namespace HIR
diff --git a/gcc/rust/checks/lints/rust-lint-marklive.cc b/gcc/rust/checks/lints/rust-lint-marklive.cc
index c914b549257..63927811149 100644
--- a/gcc/rust/checks/lints/rust-lint-marklive.cc
+++ b/gcc/rust/checks/lints/rust-lint-marklive.cc
@@ -78,7 +78,7 @@  MarkLive::Analysis (HIR::Crate &crate)
 //    visited first time
 // 2. save all the live symbols in liveSymbols
 void
-MarkLive::go (HIR::Crate &crate)
+MarkLive::go (HIR::Crate &)
 {
   while (!worklist.empty ())
     {
diff --git a/gcc/rust/checks/lints/rust-lint-unused-var.cc b/gcc/rust/checks/lints/rust-lint-unused-var.cc
index dff9c269962..ba5ffb9372b 100644
--- a/gcc/rust/checks/lints/rust-lint-unused-var.cc
+++ b/gcc/rust/checks/lints/rust-lint-unused-var.cc
@@ -53,7 +53,7 @@  check_decl (tree *t)
 }
 
 static tree
-unused_var_walk_fn (tree *t, int *walk_subtrees, void *closure)
+unused_var_walk_fn (tree *t, int *, void *)
 {
   switch (TREE_CODE (*t))
     {
diff --git a/gcc/rust/expand/rust-macro-builtins.cc b/gcc/rust/expand/rust-macro-builtins.cc
index 9bed3ddbe79..11334409fe3 100644
--- a/gcc/rust/expand/rust-macro-builtins.cc
+++ b/gcc/rust/expand/rust-macro-builtins.cc
@@ -99,7 +99,6 @@  try_extract_string_literal_from_fragment (const Location &parent_locus,
 
 static std::unique_ptr<AST::LiteralExpr>
 try_expand_single_string_literal (AST::Expr *input_expr,
-				  const Location &invoc_locus,
 				  MacroExpander *expander)
 {
   auto nodes = try_expand_macro_expression (input_expr, expander);
@@ -116,8 +115,8 @@  try_expand_single_string_literal (AST::Expr *input_expr,
 
 static std::vector<std::unique_ptr<AST::Expr>>
 try_expand_many_expr (Parser<MacroInvocLexer> &parser,
-		      const Location &invoc_locus, const TokenId last_token_id,
-		      MacroExpander *expander, bool &has_error)
+		      const TokenId last_token_id, MacroExpander *expander,
+		      bool &has_error)
 {
   auto restrictions = Rust::ParseRestrictions ();
   // stop parsing when encountered a braces/brackets
@@ -204,8 +203,7 @@  parse_single_string_literal (AST::DelimTokenTree &invoc_token_tree,
       // when the expression does not seem to be a string literal, we then try
       // to parse/expand it as macro to see if it expands to a string literal
       auto expr = parser.parse_expr ();
-      lit_expr
-	= try_expand_single_string_literal (expr.get (), invoc_locus, expander);
+      lit_expr = try_expand_single_string_literal (expr.get (), expander);
     }
 
   parser.skip_token (last_token_id);
@@ -265,7 +263,7 @@  load_file_bytes (const char *filename)
 } // namespace
 
 AST::Fragment
-MacroBuiltin::assert_handler (Location invoc_locus, AST::MacroInvocData &invoc)
+MacroBuiltin::assert_handler (Location, AST::MacroInvocData &)
 {
   rust_debug ("assert!() called");
 
@@ -273,7 +271,7 @@  MacroBuiltin::assert_handler (Location invoc_locus, AST::MacroInvocData &invoc)
 }
 
 AST::Fragment
-MacroBuiltin::file_handler (Location invoc_locus, AST::MacroInvocData &invoc)
+MacroBuiltin::file_handler (Location invoc_locus, AST::MacroInvocData &)
 {
   auto current_file
     = Session::get_instance ().linemap->location_file (invoc_locus);
@@ -283,7 +281,7 @@  MacroBuiltin::file_handler (Location invoc_locus, AST::MacroInvocData &invoc)
 }
 
 AST::Fragment
-MacroBuiltin::column_handler (Location invoc_locus, AST::MacroInvocData &invoc)
+MacroBuiltin::column_handler (Location invoc_locus, AST::MacroInvocData &)
 {
   auto current_column
     = Session::get_instance ().linemap->location_to_column (invoc_locus);
@@ -401,7 +399,7 @@  MacroBuiltin::concat_handler (Location invoc_locus, AST::MacroInvocData &invoc)
   auto last_token_id = macro_end_token (invoc_token_tree, parser);
 
   /* NOTE: concat! could accept no argument, so we don't have any checks here */
-  auto expanded_expr = try_expand_many_expr (parser, invoc_locus, last_token_id,
+  auto expanded_expr = try_expand_many_expr (parser, last_token_id,
 					     invoc.get_expander (), has_error);
   for (auto &expr : expanded_expr)
     {
@@ -451,7 +449,7 @@  MacroBuiltin::env_handler (Location invoc_locus, AST::MacroInvocData &invoc)
   std::unique_ptr<AST::LiteralExpr> lit_expr = nullptr;
   bool has_error = false;
 
-  auto expanded_expr = try_expand_many_expr (parser, invoc_locus, last_token_id,
+  auto expanded_expr = try_expand_many_expr (parser, last_token_id,
 					     invoc.get_expander (), has_error);
   if (has_error)
     return AST::Fragment::create_error ();
@@ -591,7 +589,7 @@  MacroBuiltin::include_handler (Location invoc_locus, AST::MacroInvocData &invoc)
 }
 
 AST::Fragment
-MacroBuiltin::line_handler (Location invoc_locus, AST::MacroInvocData &invoc)
+MacroBuiltin::line_handler (Location invoc_locus, AST::MacroInvocData &)
 {
   auto current_line
     = Session::get_instance ().linemap->location_to_line (invoc_locus);
diff --git a/gcc/rust/hir/rust-ast-lower-base.cc b/gcc/rust/hir/rust-ast-lower-base.cc
index f5402efe066..33795726b2f 100644
--- a/gcc/rust/hir/rust-ast-lower-base.cc
+++ b/gcc/rust/hir/rust-ast-lower-base.cc
@@ -25,499 +25,499 @@  namespace Rust {
 namespace HIR {
 
 void
-ASTLoweringBase::visit (AST::Token &tok)
+ASTLoweringBase::visit (AST::Token &)
 {}
 void
-ASTLoweringBase::visit (AST::DelimTokenTree &delim_tok_tree)
+ASTLoweringBase::visit (AST::DelimTokenTree &)
 {}
 void
-ASTLoweringBase::visit (AST::AttrInputMetaItemContainer &input)
+ASTLoweringBase::visit (AST::AttrInputMetaItemContainer &)
 {}
-//  void ASTLoweringBase::visit(MetaItem& meta_item) {}
-//  void vsit(Stmt& stmt) {}
-//  void ASTLoweringBase::visit(Expr& expr) {}
+//  void ASTLoweringBase::visit(MetaItemmeta_item) {}
+//  void vsit(Stmtstmt) {}
+//  void ASTLoweringBase::visit(Exprexpr) {}
 void
-ASTLoweringBase::visit (AST::IdentifierExpr &ident_expr)
+ASTLoweringBase::visit (AST::IdentifierExpr &)
 {}
-//  void ASTLoweringBase::visit(Pattern& pattern) {}
-//  void ASTLoweringBase::visit(Type& type) {}
-//  void ASTLoweringBase::visit(TypeParamBound& type_param_bound) {}
+//  void ASTLoweringBase::visit(Patternpattern) {}
+//  void ASTLoweringBase::visit(Typetype) {}
+//  void ASTLoweringBase::visit(TypeParamBoundtype_param_bound) {}
 void
-ASTLoweringBase::visit (AST::Lifetime &lifetime)
+ASTLoweringBase::visit (AST::Lifetime &)
 {}
-//  void ASTLoweringBase::visit(GenericParam& generic_param) {}
+//  void ASTLoweringBase::visit(GenericParamgeneric_param) {}
 void
-ASTLoweringBase::visit (AST::LifetimeParam &lifetime_param)
+ASTLoweringBase::visit (AST::LifetimeParam &)
 {}
 void
-ASTLoweringBase::visit (AST::ConstGenericParam &const_param)
+ASTLoweringBase::visit (AST::ConstGenericParam &)
 {}
-//  void ASTLoweringBase::visit(TraitItem& trait_item) {}
-//  void ASTLoweringBase::visit(InherentImplItem& inherent_impl_item) {}
-//  void ASTLoweringBase::visit(TraitImplItem& trait_impl_item) {}
+//  void ASTLoweringBase::visit(TraitItemtrait_item) {}
+//  void ASTLoweringBase::visit(InherentImplIteminherent_impl_item) {}
+//  void ASTLoweringBase::visit(TraitImplItemtrait_impl_item) {}
 
 // rust-path.h
 void
-ASTLoweringBase::visit (AST::PathInExpression &path)
+ASTLoweringBase::visit (AST::PathInExpression &)
 {}
 void
-ASTLoweringBase::visit (AST::TypePathSegment &segment)
+ASTLoweringBase::visit (AST::TypePathSegment &)
 {}
 void
-ASTLoweringBase::visit (AST::TypePathSegmentGeneric &segment)
+ASTLoweringBase::visit (AST::TypePathSegmentGeneric &)
 {}
 void
-ASTLoweringBase::visit (AST::TypePathSegmentFunction &segment)
+ASTLoweringBase::visit (AST::TypePathSegmentFunction &)
 {}
 void
-ASTLoweringBase::visit (AST::TypePath &path)
+ASTLoweringBase::visit (AST::TypePath &)
 {}
 void
-ASTLoweringBase::visit (AST::QualifiedPathInExpression &path)
+ASTLoweringBase::visit (AST::QualifiedPathInExpression &)
 {}
 void
-ASTLoweringBase::visit (AST::QualifiedPathInType &path)
+ASTLoweringBase::visit (AST::QualifiedPathInType &)
 {}
 
 // rust-expr.h
 void
-ASTLoweringBase::visit (AST::LiteralExpr &expr)
+ASTLoweringBase::visit (AST::LiteralExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::AttrInputLiteral &attr_input)
+ASTLoweringBase::visit (AST::AttrInputLiteral &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaItemLitExpr &meta_item)
+ASTLoweringBase::visit (AST::MetaItemLitExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaItemPathLit &meta_item)
+ASTLoweringBase::visit (AST::MetaItemPathLit &)
 {}
 void
-ASTLoweringBase::visit (AST::BorrowExpr &expr)
+ASTLoweringBase::visit (AST::BorrowExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::DereferenceExpr &expr)
+ASTLoweringBase::visit (AST::DereferenceExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ErrorPropagationExpr &expr)
+ASTLoweringBase::visit (AST::ErrorPropagationExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::NegationExpr &expr)
+ASTLoweringBase::visit (AST::NegationExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ArithmeticOrLogicalExpr &expr)
+ASTLoweringBase::visit (AST::ArithmeticOrLogicalExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ComparisonExpr &expr)
+ASTLoweringBase::visit (AST::ComparisonExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::LazyBooleanExpr &expr)
+ASTLoweringBase::visit (AST::LazyBooleanExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::TypeCastExpr &expr)
+ASTLoweringBase::visit (AST::TypeCastExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::AssignmentExpr &expr)
+ASTLoweringBase::visit (AST::AssignmentExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::CompoundAssignmentExpr &expr)
+ASTLoweringBase::visit (AST::CompoundAssignmentExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::GroupedExpr &expr)
+ASTLoweringBase::visit (AST::GroupedExpr &)
 {}
-//  void ASTLoweringBase::visit(ArrayElems& elems) {}
+//  void ASTLoweringBase::visit(ArrayElemselems) {}
 void
-ASTLoweringBase::visit (AST::ArrayElemsValues &elems)
+ASTLoweringBase::visit (AST::ArrayElemsValues &)
 {}
 void
-ASTLoweringBase::visit (AST::ArrayElemsCopied &elems)
+ASTLoweringBase::visit (AST::ArrayElemsCopied &)
 {}
 void
-ASTLoweringBase::visit (AST::ArrayExpr &expr)
+ASTLoweringBase::visit (AST::ArrayExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ArrayIndexExpr &expr)
+ASTLoweringBase::visit (AST::ArrayIndexExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::TupleExpr &expr)
+ASTLoweringBase::visit (AST::TupleExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::TupleIndexExpr &expr)
+ASTLoweringBase::visit (AST::TupleIndexExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::StructExprStruct &expr)
+ASTLoweringBase::visit (AST::StructExprStruct &)
 {}
-//  void ASTLoweringBase::visit(StructExprField& field) {}
+//  void ASTLoweringBase::visit(StructExprFieldfield) {}
 void
-ASTLoweringBase::visit (AST::StructExprFieldIdentifier &field)
+ASTLoweringBase::visit (AST::StructExprFieldIdentifier &)
 {}
 void
-ASTLoweringBase::visit (AST::StructExprFieldIdentifierValue &field)
+ASTLoweringBase::visit (AST::StructExprFieldIdentifierValue &)
 {}
 void
-ASTLoweringBase::visit (AST::StructExprFieldIndexValue &field)
+ASTLoweringBase::visit (AST::StructExprFieldIndexValue &)
 {}
 void
-ASTLoweringBase::visit (AST::StructExprStructFields &expr)
+ASTLoweringBase::visit (AST::StructExprStructFields &)
 {}
 void
-ASTLoweringBase::visit (AST::StructExprStructBase &expr)
+ASTLoweringBase::visit (AST::StructExprStructBase &)
 {}
 void
-ASTLoweringBase::visit (AST::CallExpr &expr)
+ASTLoweringBase::visit (AST::CallExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::MethodCallExpr &expr)
+ASTLoweringBase::visit (AST::MethodCallExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::FieldAccessExpr &expr)
+ASTLoweringBase::visit (AST::FieldAccessExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ClosureExprInner &expr)
+ASTLoweringBase::visit (AST::ClosureExprInner &)
 {}
 void
-ASTLoweringBase::visit (AST::BlockExpr &expr)
+ASTLoweringBase::visit (AST::BlockExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ClosureExprInnerTyped &expr)
+ASTLoweringBase::visit (AST::ClosureExprInnerTyped &)
 {}
 void
-ASTLoweringBase::visit (AST::ContinueExpr &expr)
+ASTLoweringBase::visit (AST::ContinueExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::BreakExpr &expr)
+ASTLoweringBase::visit (AST::BreakExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::RangeFromToExpr &expr)
+ASTLoweringBase::visit (AST::RangeFromToExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::RangeFromExpr &expr)
+ASTLoweringBase::visit (AST::RangeFromExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::RangeToExpr &expr)
+ASTLoweringBase::visit (AST::RangeToExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::RangeFullExpr &expr)
+ASTLoweringBase::visit (AST::RangeFullExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::RangeFromToInclExpr &expr)
+ASTLoweringBase::visit (AST::RangeFromToInclExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::RangeToInclExpr &expr)
+ASTLoweringBase::visit (AST::RangeToInclExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ReturnExpr &expr)
+ASTLoweringBase::visit (AST::ReturnExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::UnsafeBlockExpr &expr)
+ASTLoweringBase::visit (AST::UnsafeBlockExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::LoopExpr &expr)
+ASTLoweringBase::visit (AST::LoopExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::WhileLoopExpr &expr)
+ASTLoweringBase::visit (AST::WhileLoopExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::WhileLetLoopExpr &expr)
+ASTLoweringBase::visit (AST::WhileLetLoopExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::ForLoopExpr &expr)
+ASTLoweringBase::visit (AST::ForLoopExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::IfExpr &expr)
+ASTLoweringBase::visit (AST::IfExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::IfExprConseqElse &expr)
+ASTLoweringBase::visit (AST::IfExprConseqElse &)
 {}
 void
-ASTLoweringBase::visit (AST::IfExprConseqIf &expr)
+ASTLoweringBase::visit (AST::IfExprConseqIf &)
 {}
 void
-ASTLoweringBase::visit (AST::IfExprConseqIfLet &expr)
+ASTLoweringBase::visit (AST::IfExprConseqIfLet &)
 {}
 void
-ASTLoweringBase::visit (AST::IfLetExpr &expr)
+ASTLoweringBase::visit (AST::IfLetExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::IfLetExprConseqElse &expr)
+ASTLoweringBase::visit (AST::IfLetExprConseqElse &)
 {}
 void
-ASTLoweringBase::visit (AST::IfLetExprConseqIf &expr)
+ASTLoweringBase::visit (AST::IfLetExprConseqIf &)
 {}
 void
-ASTLoweringBase::visit (AST::IfLetExprConseqIfLet &expr)
+ASTLoweringBase::visit (AST::IfLetExprConseqIfLet &)
 {}
-//  void ASTLoweringBase::visit(MatchCase& match_case) {}
-// void ASTLoweringBase:: (AST::MatchCaseBlockExpr &match_case) {}
-// void ASTLoweringBase:: (AST::MatchCaseExpr &match_case) {}
+//  void ASTLoweringBase::visit(MatchCasematch_case) {}
+// void ASTLoweringBase:: (AST::MatchCaseBlockExpr &) {}
+// void ASTLoweringBase:: (AST::MatchCaseExpr &) {}
 void
-ASTLoweringBase::visit (AST::MatchExpr &expr)
+ASTLoweringBase::visit (AST::MatchExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::AwaitExpr &expr)
+ASTLoweringBase::visit (AST::AwaitExpr &)
 {}
 void
-ASTLoweringBase::visit (AST::AsyncBlockExpr &expr)
+ASTLoweringBase::visit (AST::AsyncBlockExpr &)
 {}
 
 // rust-item.h
 void
-ASTLoweringBase::visit (AST::TypeParam &param)
+ASTLoweringBase::visit (AST::TypeParam &)
 {}
-//  void ASTLoweringBase::visit(WhereClauseItem& item) {}
+//  void ASTLoweringBase::visit(WhereClauseItemitem) {}
 void
-ASTLoweringBase::visit (AST::LifetimeWhereClauseItem &item)
+ASTLoweringBase::visit (AST::LifetimeWhereClauseItem &)
 {}
 void
-ASTLoweringBase::visit (AST::TypeBoundWhereClauseItem &item)
+ASTLoweringBase::visit (AST::TypeBoundWhereClauseItem &)
 {}
 void
-ASTLoweringBase::visit (AST::Method &method)
+ASTLoweringBase::visit (AST::Method &)
 {}
 void
-ASTLoweringBase::visit (AST::Module &module)
+ASTLoweringBase::visit (AST::Module &)
 {}
 void
-ASTLoweringBase::visit (AST::ExternCrate &crate)
+ASTLoweringBase::visit (AST::ExternCrate &)
 {}
-//  void ASTLoweringBase::visit(UseTree& use_tree) {}
+//  void ASTLoweringBase::visit(UseTreeuse_tree) {}
 void
-ASTLoweringBase::visit (AST::UseTreeGlob &use_tree)
+ASTLoweringBase::visit (AST::UseTreeGlob &)
 {}
 void
-ASTLoweringBase::visit (AST::UseTreeList &use_tree)
+ASTLoweringBase::visit (AST::UseTreeList &)
 {}
 void
-ASTLoweringBase::visit (AST::UseTreeRebind &use_tree)
+ASTLoweringBase::visit (AST::UseTreeRebind &)
 {}
 void
-ASTLoweringBase::visit (AST::UseDeclaration &use_decl)
+ASTLoweringBase::visit (AST::UseDeclaration &)
 {}
 void
-ASTLoweringBase::visit (AST::Function &function)
+ASTLoweringBase::visit (AST::Function &)
 {}
 void
-ASTLoweringBase::visit (AST::TypeAlias &type_alias)
+ASTLoweringBase::visit (AST::TypeAlias &)
 {}
 void
-ASTLoweringBase::visit (AST::StructStruct &struct_item)
+ASTLoweringBase::visit (AST::StructStruct &)
 {}
 void
-ASTLoweringBase::visit (AST::TupleStruct &tuple_struct)
+ASTLoweringBase::visit (AST::TupleStruct &)
 {}
 void
-ASTLoweringBase::visit (AST::EnumItem &item)
+ASTLoweringBase::visit (AST::EnumItem &)
 {}
 void
-ASTLoweringBase::visit (AST::EnumItemTuple &item)
+ASTLoweringBase::visit (AST::EnumItemTuple &)
 {}
 void
-ASTLoweringBase::visit (AST::EnumItemStruct &item)
+ASTLoweringBase::visit (AST::EnumItemStruct &)
 {}
 void
-ASTLoweringBase::visit (AST::EnumItemDiscriminant &item)
+ASTLoweringBase::visit (AST::EnumItemDiscriminant &)
 {}
 void
-ASTLoweringBase::visit (AST::Enum &enum_item)
+ASTLoweringBase::visit (AST::Enum &)
 {}
 void
-ASTLoweringBase::visit (AST::Union &union_item)
+ASTLoweringBase::visit (AST::Union &)
 {}
 void
-ASTLoweringBase::visit (AST::ConstantItem &const_item)
+ASTLoweringBase::visit (AST::ConstantItem &)
 {}
 void
-ASTLoweringBase::visit (AST::StaticItem &static_item)
+ASTLoweringBase::visit (AST::StaticItem &)
 {}
 void
-ASTLoweringBase::visit (AST::TraitItemFunc &item)
+ASTLoweringBase::visit (AST::TraitItemFunc &)
 {}
 void
-ASTLoweringBase::visit (AST::TraitItemMethod &item)
+ASTLoweringBase::visit (AST::TraitItemMethod &)
 {}
 void
-ASTLoweringBase::visit (AST::TraitItemConst &item)
+ASTLoweringBase::visit (AST::TraitItemConst &)
 {}
 void
-ASTLoweringBase::visit (AST::TraitItemType &item)
+ASTLoweringBase::visit (AST::TraitItemType &)
 {}
 void
-ASTLoweringBase::visit (AST::Trait &trait)
+ASTLoweringBase::visit (AST::Trait &)
 {}
 void
-ASTLoweringBase::visit (AST::InherentImpl &impl)
+ASTLoweringBase::visit (AST::InherentImpl &)
 {}
 void
-ASTLoweringBase::visit (AST::TraitImpl &impl)
+ASTLoweringBase::visit (AST::TraitImpl &)
 {}
-//  void ASTLoweringBase::visit(ExternalItem& item) {}
+//  void ASTLoweringBase::visit(ExternalItemitem) {}
 void
-ASTLoweringBase::visit (AST::ExternalStaticItem &item)
+ASTLoweringBase::visit (AST::ExternalStaticItem &)
 {}
 void
-ASTLoweringBase::visit (AST::ExternalFunctionItem &item)
+ASTLoweringBase::visit (AST::ExternalFunctionItem &)
 {}
 void
-ASTLoweringBase::visit (AST::ExternBlock &block)
+ASTLoweringBase::visit (AST::ExternBlock &)
 {}
 
 // rust-macro.h
 void
-ASTLoweringBase::visit (AST::MacroMatchFragment &match)
+ASTLoweringBase::visit (AST::MacroMatchFragment &)
 {}
 void
-ASTLoweringBase::visit (AST::MacroMatchRepetition &match)
+ASTLoweringBase::visit (AST::MacroMatchRepetition &)
 {}
 void
-ASTLoweringBase::visit (AST::MacroMatcher &matcher)
+ASTLoweringBase::visit (AST::MacroMatcher &)
 {}
 void
-ASTLoweringBase::visit (AST::MacroRulesDefinition &rules_def)
+ASTLoweringBase::visit (AST::MacroRulesDefinition &)
 {}
 void
-ASTLoweringBase::visit (AST::MacroInvocation &macro_invoc)
+ASTLoweringBase::visit (AST::MacroInvocation &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaItemPath &meta_item)
+ASTLoweringBase::visit (AST::MetaItemPath &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaItemSeq &meta_item)
+ASTLoweringBase::visit (AST::MetaItemSeq &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaWord &meta_item)
+ASTLoweringBase::visit (AST::MetaWord &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaNameValueStr &meta_item)
+ASTLoweringBase::visit (AST::MetaNameValueStr &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaListPaths &meta_item)
+ASTLoweringBase::visit (AST::MetaListPaths &)
 {}
 void
-ASTLoweringBase::visit (AST::MetaListNameValueStr &meta_item)
+ASTLoweringBase::visit (AST::MetaListNameValueStr &)
 {}
 
 // rust-pattern.h
 void
-ASTLoweringBase::visit (AST::LiteralPattern &pattern)
+ASTLoweringBase::visit (AST::LiteralPattern &)
 {}
 void
-ASTLoweringBase::visit (AST::IdentifierPattern &pattern)
+ASTLoweringBase::visit (AST::IdentifierPattern &)
 {}
 void
-ASTLoweringBase::visit (AST::WildcardPattern &pattern)
+ASTLoweringBase::visit (AST::WildcardPattern &)
 {}
-//  void ASTLoweringBase::visit(RangePatternBound& bound) {}
+//  void ASTLoweringBase::visit(RangePatternBoundbound) {}
 void
-ASTLoweringBase::visit (AST::RangePatternBoundLiteral &bound)
+ASTLoweringBase::visit (AST::RangePatternBoundLiteral &)
 {}
 void
-ASTLoweringBase::visit (AST::RangePatternBoundPath &bound)
+ASTLoweringBase::visit (AST::RangePatternBoundPath &)
 {}
 void
-ASTLoweringBase::visit (AST::RangePatternBoundQualPath &bound)
+ASTLoweringBase::visit (AST::RangePatternBoundQualPath &)
 {}
 void
-ASTLoweringBase::visit (AST::RangePattern &pattern)
+ASTLoweringBase::visit (AST::RangePattern &)
 {}
 void
-ASTLoweringBase::visit (AST::ReferencePattern &pattern)
+ASTLoweringBase::visit (AST::ReferencePattern &)
 {}
-//  void ASTLoweringBase::visit(StructPatternField& field) {}
+//  void ASTLoweringBase::visit(StructPatternFieldfield) {}
 void
-ASTLoweringBase::visit (AST::StructPatternFieldTuplePat &field)
+ASTLoweringBase::visit (AST::StructPatternFieldTuplePat &)
 {}
 void
-ASTLoweringBase::visit (AST::StructPatternFieldIdentPat &field)
+ASTLoweringBase::visit (AST::StructPatternFieldIdentPat &)
 {}
 void
-ASTLoweringBase::visit (AST::StructPatternFieldIdent &field)
+ASTLoweringBase::visit (AST::StructPatternFieldIdent &)
 {}
 void
-ASTLoweringBase::visit (AST::StructPattern &pattern)
+ASTLoweringBase::visit (AST::StructPattern &)
 {}
-//  void ASTLoweringBase::visit(TupleStructItems& tuple_items) {}
+//  void ASTLoweringBase::visit(TupleStructItemstuple_items) {}
 void
-ASTLoweringBase::visit (AST::TupleStructItemsNoRange &tuple_items)
+ASTLoweringBase::visit (AST::TupleStructItemsNoRange &)
 {}
 void
-ASTLoweringBase::visit (AST::TupleStructItemsRange &tuple_items)
+ASTLoweringBase::visit (AST::TupleStructItemsRange &)
 {}
 void
-ASTLoweringBase::visit (AST::TupleStructPattern &pattern)
+ASTLoweringBase::visit (AST::TupleStructPattern &)
 {}
-//  void ASTLoweringBase::visit(TuplePatternItems& tuple_items) {}
+//  void ASTLoweringBase::visit(TuplePatternItemstuple_items) {}
 void
-ASTLoweringBase::visit (AST::TuplePatternItemsMultiple &tuple_items)
+ASTLoweringBase::visit (AST::TuplePatternItemsMultiple &)
 {}
 void
-ASTLoweringBase::visit (AST::TuplePatternItemsRanged &tuple_items)
+ASTLoweringBase::visit (AST::TuplePatternItemsRanged &)
 {}
 void
-ASTLoweringBase::visit (AST::TuplePattern &pattern)
+ASTLoweringBase::visit (AST::TuplePattern &)
 {}
 void
-ASTLoweringBase::visit (AST::GroupedPattern &pattern)
+ASTLoweringBase::visit (AST::GroupedPattern &)
 {}
 void
-ASTLoweringBase::visit (AST::SlicePattern &pattern)
+ASTLoweringBase::visit (AST::SlicePattern &)
 {}
 
 // rust-stmt.h
 void
-ASTLoweringBase::visit (AST::EmptyStmt &stmt)
+ASTLoweringBase::visit (AST::EmptyStmt &)
 {}
 void
-ASTLoweringBase::visit (AST::LetStmt &stmt)
+ASTLoweringBase::visit (AST::LetStmt &)
 {}
 void
-ASTLoweringBase::visit (AST::ExprStmtWithoutBlock &stmt)
+ASTLoweringBase::visit (AST::ExprStmtWithoutBlock &)
 {}
 void
-ASTLoweringBase::visit (AST::ExprStmtWithBlock &stmt)
+ASTLoweringBase::visit (AST::ExprStmtWithBlock &)
 {}
 
 // rust-type.h
 void
-ASTLoweringBase::visit (AST::TraitBound &bound)
+ASTLoweringBase::visit (AST::TraitBound &)
 {}
 void
-ASTLoweringBase::visit (AST::ImplTraitType &type)
+ASTLoweringBase::visit (AST::ImplTraitType &)
 {}
 void
-ASTLoweringBase::visit (AST::TraitObjectType &type)
+ASTLoweringBase::visit (AST::TraitObjectType &)
 {}
 void
-ASTLoweringBase::visit (AST::ParenthesisedType &type)
+ASTLoweringBase::visit (AST::ParenthesisedType &)
 {}
 void
-ASTLoweringBase::visit (AST::ImplTraitTypeOneBound &type)
+ASTLoweringBase::visit (AST::ImplTraitTypeOneBound &)
 {}
 void
-ASTLoweringBase::visit (AST::TraitObjectTypeOneBound &type)
+ASTLoweringBase::visit (AST::TraitObjectTypeOneBound &)
 {}
 void
-ASTLoweringBase::visit (AST::TupleType &type)
+ASTLoweringBase::visit (AST::TupleType &)
 {}
 void
-ASTLoweringBase::visit (AST::NeverType &type)
+ASTLoweringBase::visit (AST::NeverType &)
 {}
 void
-ASTLoweringBase::visit (AST::RawPointerType &type)
+ASTLoweringBase::visit (AST::RawPointerType &)
 {}
 void
-ASTLoweringBase::visit (AST::ReferenceType &type)
+ASTLoweringBase::visit (AST::ReferenceType &)
 {}
 void
-ASTLoweringBase::visit (AST::ArrayType &type)
+ASTLoweringBase::visit (AST::ArrayType &)
 {}
 void
-ASTLoweringBase::visit (AST::SliceType &type)
+ASTLoweringBase::visit (AST::SliceType &)
 {}
 void
-ASTLoweringBase::visit (AST::InferredType &type)
+ASTLoweringBase::visit (AST::InferredType &)
 {}
 void
-ASTLoweringBase::visit (AST::BareFunctionType &type)
+ASTLoweringBase::visit (AST::BareFunctionType &)
 {}
 
 HIR::Lifetime
@@ -742,7 +742,7 @@  ASTLoweringBase::handle_outer_attributes (const ItemWrapper &item)
 }
 
 void
-ASTLoweringBase::handle_doc_item_attribute (const ItemWrapper &item,
+ASTLoweringBase::handle_doc_item_attribute (const ItemWrapper &,
 					    const AST::Attribute &attr)
 {
   auto simple_doc_comment = attr.has_attr_input ()
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc
index 261a36daa05..875e1dd9374 100644
--- a/gcc/rust/hir/rust-hir-dump.cc
+++ b/gcc/rust/hir/rust-hir-dump.cc
@@ -200,7 +200,7 @@  void
 Dump::visit (ClosureExpr &)
 {}
 void
-Dump::visit (BlockExpr &block_expr)
+Dump::visit (BlockExpr &)
 {
   stream << "BlockExpr"
 	 << ":"
@@ -324,7 +324,7 @@  void
 Dump::visit (UseDeclaration &)
 {}
 void
-Dump::visit (Function &function)
+Dump::visit (Function &)
 {
   indent++;
   stream << std::string (indent, indent_char);
diff --git a/gcc/rust/hir/tree/rust-hir-full-test.cc b/gcc/rust/hir/tree/rust-hir-full-test.cc
index f6e27b9a35f..230b7f72a85 100644
--- a/gcc/rust/hir/tree/rust-hir-full-test.cc
+++ b/gcc/rust/hir/tree/rust-hir-full-test.cc
@@ -5256,7 +5256,7 @@  ConstGenericParam::as_string () const
 }
 
 void
-ConstGenericParam::accept_vis (HIRFullVisitor &vis)
+ConstGenericParam::accept_vis (HIRFullVisitor &)
 {}
 
 } // namespace HIR
diff --git a/gcc/rust/lex/rust-lex.cc b/gcc/rust/lex/rust-lex.cc
index 53c7aecd25b..ac7ced540e6 100644
--- a/gcc/rust/lex/rust-lex.cc
+++ b/gcc/rust/lex/rust-lex.cc
@@ -1364,7 +1364,7 @@  Lexer::parse_escape (char opening_char)
 /* Parses an escape (or string continue) in a string or character. Supports
  * unicode escapes. */
 std::tuple<Codepoint, int, bool>
-Lexer::parse_utf8_escape (char opening_char)
+Lexer::parse_utf8_escape ()
 {
   Codepoint output_char;
   int additional_length_offset = 0;
@@ -1964,7 +1964,7 @@  Lexer::parse_string (Location loc)
       if (current_char32.value == '\\')
 	{
 	  // parse escape
-	  auto utf8_escape_pair = parse_utf8_escape ('\'');
+	  auto utf8_escape_pair = parse_utf8_escape ();
 	  current_char32 = std::get<0> (utf8_escape_pair);
 
 	  if (current_char32 == Codepoint (0) && std::get<2> (utf8_escape_pair))
@@ -2365,7 +2365,7 @@  Lexer::parse_char_or_lifetime (Location loc)
   if (current_char32.value == '\\')
     {
       // parse escape
-      auto utf8_escape_pair = parse_utf8_escape ('\'');
+      auto utf8_escape_pair = parse_utf8_escape ();
       current_char32 = std::get<0> (utf8_escape_pair);
       length += std::get<1> (utf8_escape_pair);
 
diff --git a/gcc/rust/lex/rust-lex.h b/gcc/rust/lex/rust-lex.h
index a170e91f2cc..2dd60b365ef 100644
--- a/gcc/rust/lex/rust-lex.h
+++ b/gcc/rust/lex/rust-lex.h
@@ -109,7 +109,7 @@  private:
   std::pair<std::string, int> parse_in_exponent_part ();
   std::pair<PrimitiveCoreType, int> parse_in_type_suffix ();
   std::tuple<char, int, bool> parse_escape (char opening_char);
-  std::tuple<Codepoint, int, bool> parse_utf8_escape (char opening_char);
+  std::tuple<Codepoint, int, bool> parse_utf8_escape ();
   int parse_partial_string_continue ();
   std::pair<long, int> parse_partial_hex_escape ();
   std::pair<Codepoint, int> parse_partial_unicode_escape ();
diff --git a/gcc/rust/metadata/rust-export-metadata.cc b/gcc/rust/metadata/rust-export-metadata.cc
index 56849323e79..49a7226476d 100644
--- a/gcc/rust/metadata/rust-export-metadata.cc
+++ b/gcc/rust/metadata/rust-export-metadata.cc
@@ -157,18 +157,18 @@  class ExportVisItems : public HIR::HIRVisItemVisitor
 public:
   ExportVisItems (ExportContext &context) : ctx (context) {}
 
-  void visit (HIR::Module &module) override {}
-  void visit (HIR::ExternCrate &crate) override {}
-  void visit (HIR::UseDeclaration &use_decl) override {}
-  void visit (HIR::TypeAlias &type_alias) override {}
-  void visit (HIR::StructStruct &struct_item) override {}
-  void visit (HIR::TupleStruct &tuple_struct) override {}
-  void visit (HIR::Enum &enum_item) override {}
-  void visit (HIR::Union &union_item) override {}
-  void visit (HIR::ConstantItem &const_item) override {}
-  void visit (HIR::StaticItem &static_item) override {}
-  void visit (HIR::ImplBlock &impl) override {}
-  void visit (HIR::ExternBlock &block) override {}
+  void visit (HIR::Module &) override {}
+  void visit (HIR::ExternCrate &) override {}
+  void visit (HIR::UseDeclaration &) override {}
+  void visit (HIR::TypeAlias &) override {}
+  void visit (HIR::StructStruct &) override {}
+  void visit (HIR::TupleStruct &) override {}
+  void visit (HIR::Enum &) override {}
+  void visit (HIR::Union &) override {}
+  void visit (HIR::ConstantItem &) override {}
+  void visit (HIR::StaticItem &) override {}
+  void visit (HIR::ImplBlock &) override {}
+  void visit (HIR::ExternBlock &) override {}
 
   void visit (HIR::Trait &trait) override { ctx.emit_trait (trait); }
 
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.cc b/gcc/rust/resolve/rust-ast-resolve-expr.cc
index 536c828beb4..4dfc0833d91 100644
--- a/gcc/rust/resolve/rust-ast-resolve-expr.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-expr.cc
@@ -102,7 +102,7 @@  ResolveExpr::visit (AST::AssignmentExpr &expr)
   ResolveExpr::go (expr.get_right_expr ().get (), prefix, canonical_prefix);
 
   // need to verify the assignee
-  VerifyAsignee::go (expr.get_left_expr ().get (), expr.get_node_id ());
+  VerifyAsignee::go (expr.get_left_expr ().get ());
 }
 
 void
@@ -141,7 +141,7 @@  ResolveExpr::visit (AST::CompoundAssignmentExpr &expr)
   ResolveExpr::go (expr.get_right_expr ().get (), prefix, canonical_prefix);
 
   // need to verify the assignee
-  VerifyAsignee::go (expr.get_left_expr ().get (), expr.get_node_id ());
+  VerifyAsignee::go (expr.get_left_expr ().get ());
 }
 
 void
@@ -553,7 +553,7 @@  ResolveExpr::visit (AST::RangeToExpr &expr)
 }
 
 void
-ResolveExpr::visit (AST::RangeFullExpr &expr)
+ResolveExpr::visit (AST::RangeFullExpr &)
 {
   // nothing to do
 }
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc
index e5c712aba07..16d05f3792b 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-type.cc
@@ -61,13 +61,13 @@  ResolveType::visit (AST::RawPointerType &type)
 }
 
 void
-ResolveType::visit (AST::InferredType &type)
+ResolveType::visit (AST::InferredType &)
 {
   // FIXME
 }
 
 void
-ResolveType::visit (AST::NeverType &type)
+ResolveType::visit (AST::NeverType &)
 {
   // FIXME
 }
@@ -505,7 +505,7 @@  ResolveTypeToCanonicalPath::visit (AST::TraitObjectTypeOneBound &type)
 }
 
 void
-ResolveTypeToCanonicalPath::visit (AST::TraitObjectType &type)
+ResolveTypeToCanonicalPath::visit (AST::TraitObjectType &)
 {
   // FIXME is this actually allowed? dyn A+B
   gcc_unreachable ();
diff --git a/gcc/rust/resolve/rust-ast-verify-assignee.h b/gcc/rust/resolve/rust-ast-verify-assignee.h
index e05a2251bb9..8d09c9b6564 100644
--- a/gcc/rust/resolve/rust-ast-verify-assignee.h
+++ b/gcc/rust/resolve/rust-ast-verify-assignee.h
@@ -30,9 +30,9 @@  class VerifyAsignee : public ResolverBase
   using Rust::Resolver::ResolverBase::visit;
 
 public:
-  static bool go (AST::Expr *assignee, NodeId parent)
+  static bool go (AST::Expr *assignee)
   {
-    VerifyAsignee checker (parent);
+    VerifyAsignee checker;
     assignee->accept_vis (checker);
     if (!checker.ok)
       rust_error_at (assignee->get_locus (),
@@ -70,10 +70,10 @@  public:
     expr.get_dereferenced_expr ()->accept_vis (*this);
   }
 
-  void visit (AST::PathInExpression &expr) override { ok = true; }
+  void visit (AST::PathInExpression &) override { ok = true; }
 
 private:
-  VerifyAsignee (NodeId parent) : ResolverBase (), ok (false) {}
+  VerifyAsignee () : ResolverBase (), ok (false) {}
 
   bool ok;
 };
diff --git a/gcc/rust/resolve/rust-early-name-resolver.cc b/gcc/rust/resolve/rust-early-name-resolver.cc
index 6b1f1e9c52f..8100564dc78 100644
--- a/gcc/rust/resolve/rust-early-name-resolver.cc
+++ b/gcc/rust/resolve/rust-early-name-resolver.cc
@@ -60,31 +60,31 @@  EarlyNameResolver::resolve_qualified_path_type (AST::QualifiedPathType &path)
 }
 
 void
-EarlyNameResolver::visit (AST::Token &tok)
+EarlyNameResolver::visit (AST::Token &)
 {}
 
 void
-EarlyNameResolver::visit (AST::DelimTokenTree &delim_tok_tree)
+EarlyNameResolver::visit (AST::DelimTokenTree &)
 {}
 
 void
-EarlyNameResolver::visit (AST::AttrInputMetaItemContainer &input)
+EarlyNameResolver::visit (AST::AttrInputMetaItemContainer &)
 {}
 
 void
-EarlyNameResolver::visit (AST::IdentifierExpr &ident_expr)
+EarlyNameResolver::visit (AST::IdentifierExpr &)
 {}
 
 void
-EarlyNameResolver::visit (AST::Lifetime &lifetime)
+EarlyNameResolver::visit (AST::Lifetime &)
 {}
 
 void
-EarlyNameResolver::visit (AST::LifetimeParam &lifetime_param)
+EarlyNameResolver::visit (AST::LifetimeParam &)
 {}
 
 void
-EarlyNameResolver::visit (AST::ConstGenericParam &const_param)
+EarlyNameResolver::visit (AST::ConstGenericParam &)
 {}
 
 // FIXME: ARTHUR: Do we need to perform macro resolution for paths as well?
@@ -98,7 +98,7 @@  EarlyNameResolver::visit (AST::PathInExpression &path)
 }
 
 void
-EarlyNameResolver::visit (AST::TypePathSegment &segment)
+EarlyNameResolver::visit (AST::TypePathSegment &)
 {}
 
 void
@@ -144,19 +144,19 @@  EarlyNameResolver::visit (AST::QualifiedPathInType &path)
 }
 
 void
-EarlyNameResolver::visit (AST::LiteralExpr &expr)
+EarlyNameResolver::visit (AST::LiteralExpr &)
 {}
 
 void
-EarlyNameResolver::visit (AST::AttrInputLiteral &attr_input)
+EarlyNameResolver::visit (AST::AttrInputLiteral &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MetaItemLitExpr &meta_item)
+EarlyNameResolver::visit (AST::MetaItemLitExpr &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MetaItemPathLit &meta_item)
+EarlyNameResolver::visit (AST::MetaItemPathLit &)
 {}
 
 void
@@ -271,11 +271,11 @@  EarlyNameResolver::visit (AST::TupleIndexExpr &expr)
 }
 
 void
-EarlyNameResolver::visit (AST::StructExprStruct &expr)
+EarlyNameResolver::visit (AST::StructExprStruct &)
 {}
 
 void
-EarlyNameResolver::visit (AST::StructExprFieldIdentifier &field)
+EarlyNameResolver::visit (AST::StructExprFieldIdentifier &)
 {}
 
 void
@@ -298,7 +298,7 @@  EarlyNameResolver::visit (AST::StructExprStructFields &expr)
 }
 
 void
-EarlyNameResolver::visit (AST::StructExprStructBase &expr)
+EarlyNameResolver::visit (AST::StructExprStructBase &)
 {}
 
 void
@@ -352,7 +352,7 @@  EarlyNameResolver::visit (AST::ClosureExprInnerTyped &expr)
 }
 
 void
-EarlyNameResolver::visit (AST::ContinueExpr &expr)
+EarlyNameResolver::visit (AST::ContinueExpr &)
 {}
 
 void
@@ -382,7 +382,7 @@  EarlyNameResolver::visit (AST::RangeToExpr &expr)
 }
 
 void
-EarlyNameResolver::visit (AST::RangeFullExpr &expr)
+EarlyNameResolver::visit (AST::RangeFullExpr &)
 {}
 
 void
@@ -539,7 +539,7 @@  EarlyNameResolver::visit (AST::TypeParam &param)
 }
 
 void
-EarlyNameResolver::visit (AST::LifetimeWhereClauseItem &item)
+EarlyNameResolver::visit (AST::LifetimeWhereClauseItem &)
 {}
 
 void
@@ -576,23 +576,23 @@  EarlyNameResolver::visit (AST::Module &module)
 }
 
 void
-EarlyNameResolver::visit (AST::ExternCrate &crate)
+EarlyNameResolver::visit (AST::ExternCrate &)
 {}
 
 void
-EarlyNameResolver::visit (AST::UseTreeGlob &use_tree)
+EarlyNameResolver::visit (AST::UseTreeGlob &)
 {}
 
 void
-EarlyNameResolver::visit (AST::UseTreeList &use_tree)
+EarlyNameResolver::visit (AST::UseTreeList &)
 {}
 
 void
-EarlyNameResolver::visit (AST::UseTreeRebind &use_tree)
+EarlyNameResolver::visit (AST::UseTreeRebind &)
 {}
 
 void
-EarlyNameResolver::visit (AST::UseDeclaration &use_decl)
+EarlyNameResolver::visit (AST::UseDeclaration &)
 {}
 
 void
@@ -632,27 +632,27 @@  EarlyNameResolver::visit (AST::TupleStruct &tuple_struct)
 }
 
 void
-EarlyNameResolver::visit (AST::EnumItem &item)
+EarlyNameResolver::visit (AST::EnumItem &)
 {}
 
 void
-EarlyNameResolver::visit (AST::EnumItemTuple &item)
+EarlyNameResolver::visit (AST::EnumItemTuple &)
 {}
 
 void
-EarlyNameResolver::visit (AST::EnumItemStruct &item)
+EarlyNameResolver::visit (AST::EnumItemStruct &)
 {}
 
 void
-EarlyNameResolver::visit (AST::EnumItemDiscriminant &item)
+EarlyNameResolver::visit (AST::EnumItemDiscriminant &)
 {}
 
 void
-EarlyNameResolver::visit (AST::Enum &enum_item)
+EarlyNameResolver::visit (AST::Enum &)
 {}
 
 void
-EarlyNameResolver::visit (AST::Union &union_item)
+EarlyNameResolver::visit (AST::Union &)
 {}
 
 void
@@ -716,7 +716,7 @@  EarlyNameResolver::visit (AST::TraitItemConst &item)
 }
 
 void
-EarlyNameResolver::visit (AST::TraitItemType &item)
+EarlyNameResolver::visit (AST::TraitItemType &)
 {}
 
 void
@@ -777,15 +777,15 @@  EarlyNameResolver::visit (AST::ExternBlock &block)
 }
 
 void
-EarlyNameResolver::visit (AST::MacroMatchFragment &match)
+EarlyNameResolver::visit (AST::MacroMatchFragment &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MacroMatchRepetition &match)
+EarlyNameResolver::visit (AST::MacroMatchRepetition &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MacroMatcher &matcher)
+EarlyNameResolver::visit (AST::MacroMatcher &)
 {}
 
 void
@@ -853,31 +853,31 @@  EarlyNameResolver::visit (AST::MacroInvocation &invoc)
 // FIXME: ARTHUR: Do we need to resolve these as well here?
 
 void
-EarlyNameResolver::visit (AST::MetaItemPath &meta_item)
+EarlyNameResolver::visit (AST::MetaItemPath &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MetaItemSeq &meta_item)
+EarlyNameResolver::visit (AST::MetaItemSeq &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MetaWord &meta_item)
+EarlyNameResolver::visit (AST::MetaWord &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MetaNameValueStr &meta_item)
+EarlyNameResolver::visit (AST::MetaNameValueStr &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MetaListPaths &meta_item)
+EarlyNameResolver::visit (AST::MetaListPaths &)
 {}
 
 void
-EarlyNameResolver::visit (AST::MetaListNameValueStr &meta_item)
+EarlyNameResolver::visit (AST::MetaListNameValueStr &)
 {}
 
 void
-EarlyNameResolver::visit (AST::LiteralPattern &pattern)
+EarlyNameResolver::visit (AST::LiteralPattern &)
 {}
 
 void
@@ -888,19 +888,19 @@  EarlyNameResolver::visit (AST::IdentifierPattern &pattern)
 }
 
 void
-EarlyNameResolver::visit (AST::WildcardPattern &pattern)
+EarlyNameResolver::visit (AST::WildcardPattern &)
 {}
 
 void
-EarlyNameResolver::visit (AST::RangePatternBoundLiteral &bound)
+EarlyNameResolver::visit (AST::RangePatternBoundLiteral &)
 {}
 
 void
-EarlyNameResolver::visit (AST::RangePatternBoundPath &bound)
+EarlyNameResolver::visit (AST::RangePatternBoundPath &)
 {}
 
 void
-EarlyNameResolver::visit (AST::RangePatternBoundQualPath &bound)
+EarlyNameResolver::visit (AST::RangePatternBoundQualPath &)
 {}
 
 void
@@ -929,11 +929,11 @@  EarlyNameResolver::visit (AST::StructPatternFieldIdentPat &field)
 }
 
 void
-EarlyNameResolver::visit (AST::StructPatternFieldIdent &field)
+EarlyNameResolver::visit (AST::StructPatternFieldIdent &)
 {}
 
 void
-EarlyNameResolver::visit (AST::StructPattern &pattern)
+EarlyNameResolver::visit (AST::StructPattern &)
 {}
 
 void
@@ -994,7 +994,7 @@  EarlyNameResolver::visit (AST::SlicePattern &pattern)
 }
 
 void
-EarlyNameResolver::visit (AST::EmptyStmt &stmt)
+EarlyNameResolver::visit (AST::EmptyStmt &)
 {}
 
 void
@@ -1022,55 +1022,55 @@  EarlyNameResolver::visit (AST::ExprStmtWithBlock &stmt)
 }
 
 void
-EarlyNameResolver::visit (AST::TraitBound &bound)
+EarlyNameResolver::visit (AST::TraitBound &)
 {}
 
 void
-EarlyNameResolver::visit (AST::ImplTraitType &type)
+EarlyNameResolver::visit (AST::ImplTraitType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::TraitObjectType &type)
+EarlyNameResolver::visit (AST::TraitObjectType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::ParenthesisedType &type)
+EarlyNameResolver::visit (AST::ParenthesisedType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::ImplTraitTypeOneBound &type)
+EarlyNameResolver::visit (AST::ImplTraitTypeOneBound &)
 {}
 
 void
-EarlyNameResolver::visit (AST::TraitObjectTypeOneBound &type)
+EarlyNameResolver::visit (AST::TraitObjectTypeOneBound &)
 {}
 
 void
-EarlyNameResolver::visit (AST::TupleType &type)
+EarlyNameResolver::visit (AST::TupleType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::NeverType &type)
+EarlyNameResolver::visit (AST::NeverType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::RawPointerType &type)
+EarlyNameResolver::visit (AST::RawPointerType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::ReferenceType &type)
+EarlyNameResolver::visit (AST::ReferenceType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::ArrayType &type)
+EarlyNameResolver::visit (AST::ArrayType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::SliceType &type)
+EarlyNameResolver::visit (AST::SliceType &)
 {}
 
 void
-EarlyNameResolver::visit (AST::InferredType &type)
+EarlyNameResolver::visit (AST::InferredType &)
 {}
 
 void
diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.h b/gcc/rust/typecheck/rust-hir-type-check-expr.h
index d800549dea2..796cc65ba66 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-expr.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-expr.h
@@ -72,27 +72,21 @@  public:
   void visit (HIR::ClosureExpr &expr) override;
 
   // TODO
-  void visit (HIR::ErrorPropagationExpr &expr) override {}
-  void visit (HIR::RangeToInclExpr &expr) override {}
-  void visit (HIR::WhileLetLoopExpr &expr) override {}
-  void visit (HIR::ForLoopExpr &expr) override {}
-  void visit (HIR::IfExprConseqIfLet &expr) override {}
-  void visit (HIR::IfLetExprConseqElse &expr) override {}
-  void visit (HIR::IfLetExprConseqIf &expr) override {}
-  void visit (HIR::IfLetExprConseqIfLet &expr) override {}
-  void visit (HIR::AwaitExpr &expr) override {}
-  void visit (HIR::AsyncBlockExpr &expr) override {}
+  void visit (HIR::ErrorPropagationExpr &) override {}
+  void visit (HIR::RangeToInclExpr &) override {}
+  void visit (HIR::WhileLetLoopExpr &) override {}
+  void visit (HIR::ForLoopExpr &) override {}
+  void visit (HIR::IfExprConseqIfLet &) override {}
+  void visit (HIR::IfLetExprConseqElse &) override {}
+  void visit (HIR::IfLetExprConseqIf &) override {}
+  void visit (HIR::IfLetExprConseqIfLet &) override {}
+  void visit (HIR::AwaitExpr &) override {}
+  void visit (HIR::AsyncBlockExpr &) override {}
 
   // don't need to implement these see rust-hir-type-check-struct-field.h
-  void visit (HIR::StructExprFieldIdentifier &field) override
-  {
-    gcc_unreachable ();
-  }
-  void visit (HIR::StructExprFieldIdentifierValue &field) override
-  {
-    gcc_unreachable ();
-  }
-  void visit (HIR::StructExprFieldIndexValue &field) override
+  void visit (HIR::StructExprFieldIdentifier &) override { gcc_unreachable (); }
+  void visit (HIR::StructExprFieldIndexValue &) override { gcc_unreachable (); }
+  void visit (HIR::StructExprFieldIdentifierValue &) override
   {
     gcc_unreachable ();
   }
diff --git a/gcc/rust/typecheck/rust-hir-type-check-item.h b/gcc/rust/typecheck/rust-hir-type-check-item.h
index 10085c90629..2268fdb6e6c 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-item.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-item.h
@@ -48,8 +48,8 @@  public:
   void visit (HIR::Trait &trait_block) override;
 
   // nothing to do
-  void visit (HIR::ExternCrate &crate) override {}
-  void visit (HIR::UseDeclaration &use_decl) override {}
+  void visit (HIR::ExternCrate &) override {}
+  void visit (HIR::UseDeclaration &) override {}
 
 protected:
   std::vector<TyTy::SubstitutionParamMapping>
diff --git a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
index 82af7294d69..b017a851b5d 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
@@ -381,34 +381,34 @@  TypeCheckPattern::visit (HIR::RangePattern &pattern)
 }
 
 void
-TypeCheckPattern::visit (HIR::IdentifierPattern &pattern)
+TypeCheckPattern::visit (HIR::IdentifierPattern &)
 {
   infered = parent;
 }
 
 void
-TypeCheckPattern::visit (HIR::GroupedPattern &pattern)
+TypeCheckPattern::visit (HIR::GroupedPattern &)
 {
   // TODO
   gcc_unreachable ();
 }
 
 void
-TypeCheckPattern::visit (HIR::QualifiedPathInExpression &pattern)
+TypeCheckPattern::visit (HIR::QualifiedPathInExpression &)
 {
   // TODO
   gcc_unreachable ();
 }
 
 void
-TypeCheckPattern::visit (HIR::ReferencePattern &pattern)
+TypeCheckPattern::visit (HIR::ReferencePattern &)
 {
   // TODO
   gcc_unreachable ();
 }
 
 void
-TypeCheckPattern::visit (HIR::SlicePattern &pattern)
+TypeCheckPattern::visit (HIR::SlicePattern &)
 {
   // TODO
   gcc_unreachable ();
diff --git a/gcc/rust/typecheck/rust-tyty-rules.h b/gcc/rust/typecheck/rust-tyty-rules.h
index 4b1fe4fd418..cfe269221bd 100644
--- a/gcc/rust/typecheck/rust-tyty-rules.h
+++ b/gcc/rust/typecheck/rust-tyty-rules.h
@@ -123,53 +123,53 @@  public:
     return resolved;
   }
 
-  virtual void visit (TupleType &type) override {}
+  virtual void visit (TupleType &) override {}
 
-  virtual void visit (ADTType &type) override {}
+  virtual void visit (ADTType &) override {}
 
-  virtual void visit (InferType &type) override {}
+  virtual void visit (InferType &) override {}
 
-  virtual void visit (FnType &type) override {}
+  virtual void visit (FnType &) override {}
 
-  virtual void visit (FnPtr &type) override {}
+  virtual void visit (FnPtr &) override {}
 
-  virtual void visit (ArrayType &type) override {}
+  virtual void visit (ArrayType &) override {}
 
-  virtual void visit (SliceType &type) override {}
+  virtual void visit (SliceType &) override {}
 
-  virtual void visit (BoolType &type) override {}
+  virtual void visit (BoolType &) override {}
 
-  virtual void visit (IntType &type) override {}
+  virtual void visit (IntType &) override {}
 
-  virtual void visit (UintType &type) override {}
+  virtual void visit (UintType &) override {}
 
-  virtual void visit (USizeType &type) override {}
+  virtual void visit (USizeType &) override {}
 
-  virtual void visit (ISizeType &type) override {}
+  virtual void visit (ISizeType &) override {}
 
-  virtual void visit (FloatType &type) override {}
+  virtual void visit (FloatType &) override {}
 
-  virtual void visit (ErrorType &type) override {}
+  virtual void visit (ErrorType &) override {}
 
-  virtual void visit (CharType &type) override {}
+  virtual void visit (CharType &) override {}
 
-  virtual void visit (ReferenceType &type) override {}
+  virtual void visit (ReferenceType &) override {}
 
-  virtual void visit (PointerType &type) override {}
+  virtual void visit (PointerType &) override {}
 
-  virtual void visit (ParamType &type) override {}
+  virtual void visit (ParamType &) override {}
 
-  virtual void visit (StrType &type) override {}
+  virtual void visit (StrType &) override {}
 
-  virtual void visit (NeverType &type) override {}
+  virtual void visit (NeverType &) override {}
 
-  virtual void visit (PlaceholderType &type) override {}
+  virtual void visit (PlaceholderType &) override {}
 
-  virtual void visit (ProjectionType &type) override {}
+  virtual void visit (ProjectionType &) override {}
 
-  virtual void visit (DynamicObjectType &type) override {}
+  virtual void visit (DynamicObjectType &) override {}
 
-  virtual void visit (ClosureType &type) override {}
+  virtual void visit (ClosureType &) override {}
 
 protected:
   BaseRules (BaseType *base)
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index 1c85273e541..33f2c932d09 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -210,342 +210,342 @@  AttributeChecker::check_attributes (const AST::AttrVec &attributes)
 }
 
 void
-AttributeChecker::visit (AST::Token &tok)
+AttributeChecker::visit (AST::Token &)
 {}
 
 void
-AttributeChecker::visit (AST::DelimTokenTree &delim_tok_tree)
+AttributeChecker::visit (AST::DelimTokenTree &)
 {}
 
 void
-AttributeChecker::visit (AST::AttrInputMetaItemContainer &input)
+AttributeChecker::visit (AST::AttrInputMetaItemContainer &)
 {}
 
 void
-AttributeChecker::visit (AST::IdentifierExpr &ident_expr)
+AttributeChecker::visit (AST::IdentifierExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::Lifetime &lifetime)
+AttributeChecker::visit (AST::Lifetime &)
 {}
 
 void
-AttributeChecker::visit (AST::LifetimeParam &lifetime_param)
+AttributeChecker::visit (AST::LifetimeParam &)
 {}
 
 void
-AttributeChecker::visit (AST::ConstGenericParam &const_param)
+AttributeChecker::visit (AST::ConstGenericParam &)
 {}
 
 // rust-path.h
 void
-AttributeChecker::visit (AST::PathInExpression &path)
+AttributeChecker::visit (AST::PathInExpression &)
 {}
 
 void
-AttributeChecker::visit (AST::TypePathSegment &segment)
+AttributeChecker::visit (AST::TypePathSegment &)
 {}
 
 void
-AttributeChecker::visit (AST::TypePathSegmentGeneric &segment)
+AttributeChecker::visit (AST::TypePathSegmentGeneric &)
 {}
 
 void
-AttributeChecker::visit (AST::TypePathSegmentFunction &segment)
+AttributeChecker::visit (AST::TypePathSegmentFunction &)
 {}
 
 void
-AttributeChecker::visit (AST::TypePath &path)
+AttributeChecker::visit (AST::TypePath &)
 {}
 
 void
-AttributeChecker::visit (AST::QualifiedPathInExpression &path)
+AttributeChecker::visit (AST::QualifiedPathInExpression &)
 {}
 
 void
-AttributeChecker::visit (AST::QualifiedPathInType &path)
+AttributeChecker::visit (AST::QualifiedPathInType &)
 {}
 
 // rust-expr.h
 void
-AttributeChecker::visit (AST::LiteralExpr &expr)
+AttributeChecker::visit (AST::LiteralExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::AttrInputLiteral &attr_input)
+AttributeChecker::visit (AST::AttrInputLiteral &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaItemLitExpr &meta_item)
+AttributeChecker::visit (AST::MetaItemLitExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaItemPathLit &meta_item)
+AttributeChecker::visit (AST::MetaItemPathLit &)
 {}
 
 void
-AttributeChecker::visit (AST::BorrowExpr &expr)
+AttributeChecker::visit (AST::BorrowExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::DereferenceExpr &expr)
+AttributeChecker::visit (AST::DereferenceExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ErrorPropagationExpr &expr)
+AttributeChecker::visit (AST::ErrorPropagationExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::NegationExpr &expr)
+AttributeChecker::visit (AST::NegationExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ArithmeticOrLogicalExpr &expr)
+AttributeChecker::visit (AST::ArithmeticOrLogicalExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ComparisonExpr &expr)
+AttributeChecker::visit (AST::ComparisonExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::LazyBooleanExpr &expr)
+AttributeChecker::visit (AST::LazyBooleanExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::TypeCastExpr &expr)
+AttributeChecker::visit (AST::TypeCastExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::AssignmentExpr &expr)
+AttributeChecker::visit (AST::AssignmentExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::CompoundAssignmentExpr &expr)
+AttributeChecker::visit (AST::CompoundAssignmentExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::GroupedExpr &expr)
+AttributeChecker::visit (AST::GroupedExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ArrayElemsValues &elems)
+AttributeChecker::visit (AST::ArrayElemsValues &)
 {}
 
 void
-AttributeChecker::visit (AST::ArrayElemsCopied &elems)
+AttributeChecker::visit (AST::ArrayElemsCopied &)
 {}
 
 void
-AttributeChecker::visit (AST::ArrayExpr &expr)
+AttributeChecker::visit (AST::ArrayExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ArrayIndexExpr &expr)
+AttributeChecker::visit (AST::ArrayIndexExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::TupleExpr &expr)
+AttributeChecker::visit (AST::TupleExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::TupleIndexExpr &expr)
+AttributeChecker::visit (AST::TupleIndexExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::StructExprStruct &expr)
+AttributeChecker::visit (AST::StructExprStruct &)
 {}
 
 void
-AttributeChecker::visit (AST::StructExprFieldIdentifier &field)
+AttributeChecker::visit (AST::StructExprFieldIdentifier &)
 {}
 
 void
-AttributeChecker::visit (AST::StructExprFieldIdentifierValue &field)
+AttributeChecker::visit (AST::StructExprFieldIdentifierValue &)
 {}
 
 void
-AttributeChecker::visit (AST::StructExprFieldIndexValue &field)
+AttributeChecker::visit (AST::StructExprFieldIndexValue &)
 {}
 
 void
-AttributeChecker::visit (AST::StructExprStructFields &expr)
+AttributeChecker::visit (AST::StructExprStructFields &)
 {}
 
 void
-AttributeChecker::visit (AST::StructExprStructBase &expr)
+AttributeChecker::visit (AST::StructExprStructBase &)
 {}
 
 void
-AttributeChecker::visit (AST::CallExpr &expr)
+AttributeChecker::visit (AST::CallExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::MethodCallExpr &expr)
+AttributeChecker::visit (AST::MethodCallExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::FieldAccessExpr &expr)
+AttributeChecker::visit (AST::FieldAccessExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ClosureExprInner &expr)
+AttributeChecker::visit (AST::ClosureExprInner &)
 {}
 
 void
-AttributeChecker::visit (AST::BlockExpr &expr)
+AttributeChecker::visit (AST::BlockExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ClosureExprInnerTyped &expr)
+AttributeChecker::visit (AST::ClosureExprInnerTyped &)
 {}
 
 void
-AttributeChecker::visit (AST::ContinueExpr &expr)
+AttributeChecker::visit (AST::ContinueExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::BreakExpr &expr)
+AttributeChecker::visit (AST::BreakExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::RangeFromToExpr &expr)
+AttributeChecker::visit (AST::RangeFromToExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::RangeFromExpr &expr)
+AttributeChecker::visit (AST::RangeFromExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::RangeToExpr &expr)
+AttributeChecker::visit (AST::RangeToExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::RangeFullExpr &expr)
+AttributeChecker::visit (AST::RangeFullExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::RangeFromToInclExpr &expr)
+AttributeChecker::visit (AST::RangeFromToInclExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::RangeToInclExpr &expr)
+AttributeChecker::visit (AST::RangeToInclExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ReturnExpr &expr)
+AttributeChecker::visit (AST::ReturnExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::UnsafeBlockExpr &expr)
+AttributeChecker::visit (AST::UnsafeBlockExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::LoopExpr &expr)
+AttributeChecker::visit (AST::LoopExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::WhileLoopExpr &expr)
+AttributeChecker::visit (AST::WhileLoopExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::WhileLetLoopExpr &expr)
+AttributeChecker::visit (AST::WhileLetLoopExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::ForLoopExpr &expr)
+AttributeChecker::visit (AST::ForLoopExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::IfExpr &expr)
+AttributeChecker::visit (AST::IfExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::IfExprConseqElse &expr)
+AttributeChecker::visit (AST::IfExprConseqElse &)
 {}
 
 void
-AttributeChecker::visit (AST::IfExprConseqIf &expr)
+AttributeChecker::visit (AST::IfExprConseqIf &)
 {}
 
 void
-AttributeChecker::visit (AST::IfExprConseqIfLet &expr)
+AttributeChecker::visit (AST::IfExprConseqIfLet &)
 {}
 
 void
-AttributeChecker::visit (AST::IfLetExpr &expr)
+AttributeChecker::visit (AST::IfLetExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::IfLetExprConseqElse &expr)
+AttributeChecker::visit (AST::IfLetExprConseqElse &)
 {}
 
 void
-AttributeChecker::visit (AST::IfLetExprConseqIf &expr)
+AttributeChecker::visit (AST::IfLetExprConseqIf &)
 {}
 
 void
-AttributeChecker::visit (AST::IfLetExprConseqIfLet &expr)
+AttributeChecker::visit (AST::IfLetExprConseqIfLet &)
 {}
 
 void
-AttributeChecker::visit (AST::MatchExpr &expr)
+AttributeChecker::visit (AST::MatchExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::AwaitExpr &expr)
+AttributeChecker::visit (AST::AwaitExpr &)
 {}
 
 void
-AttributeChecker::visit (AST::AsyncBlockExpr &expr)
+AttributeChecker::visit (AST::AsyncBlockExpr &)
 {}
 
 // rust-item.h
 void
-AttributeChecker::visit (AST::TypeParam &param)
+AttributeChecker::visit (AST::TypeParam &)
 {}
 
 void
-AttributeChecker::visit (AST::LifetimeWhereClauseItem &item)
+AttributeChecker::visit (AST::LifetimeWhereClauseItem &)
 {}
 
 void
-AttributeChecker::visit (AST::TypeBoundWhereClauseItem &item)
+AttributeChecker::visit (AST::TypeBoundWhereClauseItem &)
 {}
 
 void
-AttributeChecker::visit (AST::Method &method)
+AttributeChecker::visit (AST::Method &)
 {}
 
 void
-AttributeChecker::visit (AST::Module &module)
+AttributeChecker::visit (AST::Module &)
 {}
 
 void
-AttributeChecker::visit (AST::ExternCrate &crate)
+AttributeChecker::visit (AST::ExternCrate &)
 {}
 
 void
-AttributeChecker::visit (AST::UseTreeGlob &use_tree)
+AttributeChecker::visit (AST::UseTreeGlob &)
 {}
 
 void
-AttributeChecker::visit (AST::UseTreeList &use_tree)
+AttributeChecker::visit (AST::UseTreeList &)
 {}
 
 void
-AttributeChecker::visit (AST::UseTreeRebind &use_tree)
+AttributeChecker::visit (AST::UseTreeRebind &)
 {}
 
 void
-AttributeChecker::visit (AST::UseDeclaration &use_decl)
+AttributeChecker::visit (AST::UseDeclaration &)
 {}
 
 void
-AttributeChecker::visit (AST::Function &function)
+AttributeChecker::visit (AST::Function &)
 {}
 
 void
-AttributeChecker::visit (AST::TypeAlias &type_alias)
+AttributeChecker::visit (AST::TypeAlias &)
 {}
 
 void
@@ -555,287 +555,287 @@  AttributeChecker::visit (AST::StructStruct &struct_item)
 }
 
 void
-AttributeChecker::visit (AST::TupleStruct &tuple_struct)
+AttributeChecker::visit (AST::TupleStruct &)
 {}
 
 void
-AttributeChecker::visit (AST::EnumItem &item)
+AttributeChecker::visit (AST::EnumItem &)
 {}
 
 void
-AttributeChecker::visit (AST::EnumItemTuple &item)
+AttributeChecker::visit (AST::EnumItemTuple &)
 {}
 
 void
-AttributeChecker::visit (AST::EnumItemStruct &item)
+AttributeChecker::visit (AST::EnumItemStruct &)
 {}
 
 void
-AttributeChecker::visit (AST::EnumItemDiscriminant &item)
+AttributeChecker::visit (AST::EnumItemDiscriminant &)
 {}
 
 void
-AttributeChecker::visit (AST::Enum &enum_item)
+AttributeChecker::visit (AST::Enum &)
 {}
 
 void
-AttributeChecker::visit (AST::Union &union_item)
+AttributeChecker::visit (AST::Union &)
 {}
 
 void
-AttributeChecker::visit (AST::ConstantItem &const_item)
+AttributeChecker::visit (AST::ConstantItem &)
 {}
 
 void
-AttributeChecker::visit (AST::StaticItem &static_item)
+AttributeChecker::visit (AST::StaticItem &)
 {}
 
 void
-AttributeChecker::visit (AST::TraitItemFunc &item)
+AttributeChecker::visit (AST::TraitItemFunc &)
 {}
 
 void
-AttributeChecker::visit (AST::TraitItemMethod &item)
+AttributeChecker::visit (AST::TraitItemMethod &)
 {}
 
 void
-AttributeChecker::visit (AST::TraitItemConst &item)
+AttributeChecker::visit (AST::TraitItemConst &)
 {}
 
 void
-AttributeChecker::visit (AST::TraitItemType &item)
+AttributeChecker::visit (AST::TraitItemType &)
 {}
 
 void
-AttributeChecker::visit (AST::Trait &trait)
+AttributeChecker::visit (AST::Trait &)
 {}
 
 void
-AttributeChecker::visit (AST::InherentImpl &impl)
+AttributeChecker::visit (AST::InherentImpl &)
 {}
 
 void
-AttributeChecker::visit (AST::TraitImpl &impl)
+AttributeChecker::visit (AST::TraitImpl &)
 {}
 
 void
-AttributeChecker::visit (AST::ExternalStaticItem &item)
+AttributeChecker::visit (AST::ExternalStaticItem &)
 {}
 
 void
-AttributeChecker::visit (AST::ExternalFunctionItem &item)
+AttributeChecker::visit (AST::ExternalFunctionItem &)
 {}
 
 void
-AttributeChecker::visit (AST::ExternBlock &block)
+AttributeChecker::visit (AST::ExternBlock &)
 {}
 
 // rust-macro.h
 void
-AttributeChecker::visit (AST::MacroMatchFragment &match)
+AttributeChecker::visit (AST::MacroMatchFragment &)
 {}
 
 void
-AttributeChecker::visit (AST::MacroMatchRepetition &match)
+AttributeChecker::visit (AST::MacroMatchRepetition &)
 {}
 
 void
-AttributeChecker::visit (AST::MacroMatcher &matcher)
+AttributeChecker::visit (AST::MacroMatcher &)
 {}
 
 void
-AttributeChecker::visit (AST::MacroRulesDefinition &rules_def)
+AttributeChecker::visit (AST::MacroRulesDefinition &)
 {}
 
 void
-AttributeChecker::visit (AST::MacroInvocation &macro_invoc)
+AttributeChecker::visit (AST::MacroInvocation &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaItemPath &meta_item)
+AttributeChecker::visit (AST::MetaItemPath &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaItemSeq &meta_item)
+AttributeChecker::visit (AST::MetaItemSeq &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaWord &meta_item)
+AttributeChecker::visit (AST::MetaWord &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaNameValueStr &meta_item)
+AttributeChecker::visit (AST::MetaNameValueStr &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaListPaths &meta_item)
+AttributeChecker::visit (AST::MetaListPaths &)
 {}
 
 void
-AttributeChecker::visit (AST::MetaListNameValueStr &meta_item)
+AttributeChecker::visit (AST::MetaListNameValueStr &)
 {}
 
 // rust-pattern.h
 void
-AttributeChecker::visit (AST::LiteralPattern &pattern)
+AttributeChecker::visit (AST::LiteralPattern &)
 {}
 
 void
-AttributeChecker::visit (AST::IdentifierPattern &pattern)
+AttributeChecker::visit (AST::IdentifierPattern &)
 {}
 
 void
-AttributeChecker::visit (AST::WildcardPattern &pattern)
+AttributeChecker::visit (AST::WildcardPattern &)
 {}
 
-// void AttributeChecker::visit(RangePatternBound& bound){}
+// void AttributeChecker::visit(RangePatternBound& ){}
 
 void
-AttributeChecker::visit (AST::RangePatternBoundLiteral &bound)
+AttributeChecker::visit (AST::RangePatternBoundLiteral &)
 {}
 
 void
-AttributeChecker::visit (AST::RangePatternBoundPath &bound)
+AttributeChecker::visit (AST::RangePatternBoundPath &)
 {}
 
 void
-AttributeChecker::visit (AST::RangePatternBoundQualPath &bound)
+AttributeChecker::visit (AST::RangePatternBoundQualPath &)
 {}
 
 void
-AttributeChecker::visit (AST::RangePattern &pattern)
+AttributeChecker::visit (AST::RangePattern &)
 {}
 
 void
-AttributeChecker::visit (AST::ReferencePattern &pattern)
+AttributeChecker::visit (AST::ReferencePattern &)
 {}
 
-// void AttributeChecker::visit(StructPatternField& field){}
+// void AttributeChecker::visit(StructPatternField& ){}
 
 void
-AttributeChecker::visit (AST::StructPatternFieldTuplePat &field)
+AttributeChecker::visit (AST::StructPatternFieldTuplePat &)
 {}
 
 void
-AttributeChecker::visit (AST::StructPatternFieldIdentPat &field)
+AttributeChecker::visit (AST::StructPatternFieldIdentPat &)
 {}
 
 void
-AttributeChecker::visit (AST::StructPatternFieldIdent &field)
+AttributeChecker::visit (AST::StructPatternFieldIdent &)
 {}
 
 void
-AttributeChecker::visit (AST::StructPattern &pattern)
+AttributeChecker::visit (AST::StructPattern &)
 {}
 
-// void AttributeChecker::visit(TupleStructItems& tuple_items){}
+// void AttributeChecker::visit(TupleStructItems& ){}
 
 void
-AttributeChecker::visit (AST::TupleStructItemsNoRange &tuple_items)
+AttributeChecker::visit (AST::TupleStructItemsNoRange &)
 {}
 
 void
-AttributeChecker::visit (AST::TupleStructItemsRange &tuple_items)
+AttributeChecker::visit (AST::TupleStructItemsRange &)
 {}
 
 void
-AttributeChecker::visit (AST::TupleStructPattern &pattern)
+AttributeChecker::visit (AST::TupleStructPattern &)
 {}
 
-// void AttributeChecker::visit(TuplePatternItems& tuple_items){}
+// void AttributeChecker::visit(TuplePatternItems& ){}
 
 void
-AttributeChecker::visit (AST::TuplePatternItemsMultiple &tuple_items)
+AttributeChecker::visit (AST::TuplePatternItemsMultiple &)
 {}
 
 void
-AttributeChecker::visit (AST::TuplePatternItemsRanged &tuple_items)
+AttributeChecker::visit (AST::TuplePatternItemsRanged &)
 {}
 
 void
-AttributeChecker::visit (AST::TuplePattern &pattern)
+AttributeChecker::visit (AST::TuplePattern &)
 {}
 
 void
-AttributeChecker::visit (AST::GroupedPattern &pattern)
+AttributeChecker::visit (AST::GroupedPattern &)
 {}
 
 void
-AttributeChecker::visit (AST::SlicePattern &pattern)
+AttributeChecker::visit (AST::SlicePattern &)
 {}
 
 // rust-stmt.h
 void
-AttributeChecker::visit (AST::EmptyStmt &stmt)
+AttributeChecker::visit (AST::EmptyStmt &)
 {}
 
 void
-AttributeChecker::visit (AST::LetStmt &stmt)
+AttributeChecker::visit (AST::LetStmt &)
 {}
 
 void
-AttributeChecker::visit (AST::ExprStmtWithoutBlock &stmt)
+AttributeChecker::visit (AST::ExprStmtWithoutBlock &)
 {}
 
 void
-AttributeChecker::visit (AST::ExprStmtWithBlock &stmt)
+AttributeChecker::visit (AST::ExprStmtWithBlock &)
 {}
 
 // rust-type.h
 void
-AttributeChecker::visit (AST::TraitBound &bound)
+AttributeChecker::visit (AST::TraitBound &)
 {}
 
 void
-AttributeChecker::visit (AST::ImplTraitType &type)
+AttributeChecker::visit (AST::ImplTraitType &)
 {}
 
 void
-AttributeChecker::visit (AST::TraitObjectType &type)
+AttributeChecker::visit (AST::TraitObjectType &)
 {}
 
 void
-AttributeChecker::visit (AST::ParenthesisedType &type)
+AttributeChecker::visit (AST::ParenthesisedType &)
 {}
 
 void
-AttributeChecker::visit (AST::ImplTraitTypeOneBound &type)
+AttributeChecker::visit (AST::ImplTraitTypeOneBound &)
 {}
 
 void
-AttributeChecker::visit (AST::TraitObjectTypeOneBound &type)
+AttributeChecker::visit (AST::TraitObjectTypeOneBound &)
 {}
 
 void
-AttributeChecker::visit (AST::TupleType &type)
+AttributeChecker::visit (AST::TupleType &)
 {}
 
 void
-AttributeChecker::visit (AST::NeverType &type)
+AttributeChecker::visit (AST::NeverType &)
 {}
 
 void
-AttributeChecker::visit (AST::RawPointerType &type)
+AttributeChecker::visit (AST::RawPointerType &)
 {}
 
 void
-AttributeChecker::visit (AST::ReferenceType &type)
+AttributeChecker::visit (AST::ReferenceType &)
 {}
 
 void
-AttributeChecker::visit (AST::ArrayType &type)
+AttributeChecker::visit (AST::ArrayType &)
 {}
 
 void
-AttributeChecker::visit (AST::SliceType &type)
+AttributeChecker::visit (AST::SliceType &)
 {}
 
 void
-AttributeChecker::visit (AST::InferredType &type)
+AttributeChecker::visit (AST::InferredType &)
 {}
 
 void
-AttributeChecker::visit (AST::BareFunctionType &type)
+AttributeChecker::visit (AST::BareFunctionType &)
 {}
 
 } // namespace Analysis