diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index e96ac349733..1422d77eade 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -1907,11 +1907,11 @@ public:
     return std::move (item);
   }
 
-  std::unique_ptr<TraitItem> take_trait_item ()
+  std::unique_ptr<AssociatedItem> take_trait_item ()
   {
     rust_assert (!is_error ());
-    return std::unique_ptr<TraitItem> (
-      static_cast<TraitItem *> (assoc_item.release ()));
+    return std::unique_ptr<AssociatedItem> (
+      static_cast<AssociatedItem *> (assoc_item.release ()));
   }
 
   std::unique_ptr<ExternalItem> take_external_item ()
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index 1553f29ad2d..1defecc4452 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -3140,7 +3140,7 @@ class Trait : public VisItem
   std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds;
   WhereClause where_clause;
   std::vector<Attribute> inner_attrs;
-  std::vector<std::unique_ptr<TraitItem>> trait_items;
+  std::vector<std::unique_ptr<AssociatedItem>> trait_items;
   location_t locus;
 
 public:
@@ -3171,9 +3171,9 @@ public:
 	 std::vector<std::unique_ptr<GenericParam>> generic_params,
 	 std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
 	 WhereClause where_clause,
-	 std::vector<std::unique_ptr<TraitItem>> trait_items, Visibility vis,
-	 std::vector<Attribute> outer_attrs, std::vector<Attribute> inner_attrs,
-	 location_t locus)
+	 std::vector<std::unique_ptr<AssociatedItem>> trait_items,
+	 Visibility vis, std::vector<Attribute> outer_attrs,
+	 std::vector<Attribute> inner_attrs, location_t locus)
     : VisItem (std::move (vis), std::move (outer_attrs)),
       has_unsafe (is_unsafe), has_auto (is_auto), name (std::move (name)),
       generic_params (std::move (generic_params)),
@@ -3199,7 +3199,7 @@ public:
 
     trait_items.reserve (other.trait_items.size ());
     for (const auto &e : other.trait_items)
-      trait_items.push_back (e->clone_trait_item ());
+      trait_items.push_back (e->clone_associated_item ());
   }
 
   // Overloaded assignment operator with vector clone
@@ -3223,7 +3223,7 @@ public:
 
     trait_items.reserve (other.trait_items.size ());
     for (const auto &e : other.trait_items)
-      trait_items.push_back (e->clone_trait_item ());
+      trait_items.push_back (e->clone_associated_item ());
 
     return *this;
   }
@@ -3244,11 +3244,11 @@ public:
   const std::vector<Attribute> &get_inner_attrs () const { return inner_attrs; }
   std::vector<Attribute> &get_inner_attrs () { return inner_attrs; }
 
-  const std::vector<std::unique_ptr<TraitItem>> &get_trait_items () const
+  const std::vector<std::unique_ptr<AssociatedItem>> &get_trait_items () const
   {
     return trait_items;
   }
-  std::vector<std::unique_ptr<TraitItem>> &get_trait_items ()
+  std::vector<std::unique_ptr<AssociatedItem>> &get_trait_items ()
   {
     return trait_items;
   }
diff --git a/gcc/rust/expand/rust-expand-visitor.cc b/gcc/rust/expand/rust-expand-visitor.cc
index dad2417eac4..bc0149ca99d 100644
--- a/gcc/rust/expand/rust-expand-visitor.cc
+++ b/gcc/rust/expand/rust-expand-visitor.cc
@@ -903,7 +903,8 @@ ExpandVisitor::visit (AST::Trait &trait)
 
   expander.push_context (MacroExpander::ContextType::TRAIT);
 
-  std::function<std::unique_ptr<AST::TraitItem> (AST::SingleASTNode)> extractor
+  std::function<std::unique_ptr<AST::AssociatedItem> (AST::SingleASTNode)>
+    extractor
     = [] (AST::SingleASTNode node) { return node.take_trait_item (); };
 
   expand_macro_children (MacroExpander::ContextType::TRAIT,
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index 89e3731a898..a7de948006b 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -5045,12 +5045,12 @@ Parser<ManagedTokenSource>::parse_trait (AST::Visibility vis,
   AST::AttrVec inner_attrs = parse_inner_attributes ();
 
   // parse trait items
-  std::vector<std::unique_ptr<AST::TraitItem>> trait_items;
+  std::vector<std::unique_ptr<AST::AssociatedItem>> trait_items;
 
   const_TokenPtr t = lexer.peek_token ();
   while (t->get_id () != RIGHT_CURLY)
     {
-      std::unique_ptr<AST::TraitItem> trait_item = parse_trait_item ();
+      std::unique_ptr<AST::AssociatedItem> trait_item = parse_trait_item ();
 
       if (trait_item == nullptr)
 	{
@@ -5082,7 +5082,7 @@ Parser<ManagedTokenSource>::parse_trait (AST::Visibility vis,
 
 // Parses a trait item used inside traits (not trait, the Item).
 template <typename ManagedTokenSource>
-std::unique_ptr<AST::TraitItem>
+std::unique_ptr<AST::AssociatedItem>
 Parser<ManagedTokenSource>::parse_trait_item ()
 {
   // parse outer attributes (if they exist)
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 34397540321..1614d19e4a5 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -169,7 +169,7 @@ public:
 					 = ParseRestrictions ());
   std::unique_ptr<AST::Type> parse_type (bool save_errors = true);
   std::unique_ptr<AST::ExternalItem> parse_external_item ();
-  std::unique_ptr<AST::TraitItem> parse_trait_item ();
+  std::unique_ptr<AST::AssociatedItem> parse_trait_item ();
   std::unique_ptr<AST::AssociatedItem> parse_inherent_impl_item ();
   std::unique_ptr<AST::AssociatedItem> parse_trait_impl_item ();
   AST::PathInExpression parse_path_in_expression ();
