aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-01-17 22:45:52 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2023-04-06 10:47:20 +0200
commit1019fd6337b32394c016cb23d722eb1f514a66e5 (patch)
tree90a9cd0d5e19025d0f4d4703b53a2e4ce64e91f4
parent6c4fa22d38492d9d80255b6d2e52370bde6e8749 (diff)
downloadgcc-1019fd6337b32394c016cb23d722eb1f514a66e5.zip
gcc-1019fd6337b32394c016cb23d722eb1f514a66e5.tar.gz
gcc-1019fd6337b32394c016cb23d722eb1f514a66e5.tar.bz2
gccrs: Rename header rust-hir-trait-ref.h to rust-hir-trait-reference.h
Signed-off-by: Philip Herron <herron.philip@googlemail.com> gcc/rust/ChangeLog: * typecheck/rust-hir-trait-ref.h: Moved to... * typecheck/rust-hir-trait-reference.h: ...here. * typecheck/rust-hir-trait-resolve.cc: refactor * typecheck/rust-hir-trait-resolve.h (RUST_HIR_TRAIT_RESOLVE_H): likewise * typecheck/rust-hir-type-check.h: likewise * typecheck/rust-tyty.cc: likewise
-rw-r--r--gcc/rust/typecheck/rust-hir-trait-reference.h (renamed from gcc/rust/typecheck/rust-hir-trait-ref.h)0
-rw-r--r--gcc/rust/typecheck/rust-hir-trait-resolve.cc10
-rw-r--r--gcc/rust/typecheck/rust-hir-trait-resolve.h9
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check.h2
-rw-r--r--gcc/rust/typecheck/rust-tyty.cc2
5 files changed, 13 insertions, 10 deletions
diff --git a/gcc/rust/typecheck/rust-hir-trait-ref.h b/gcc/rust/typecheck/rust-hir-trait-reference.h
index 0df3526..0df3526 100644
--- a/gcc/rust/typecheck/rust-hir-trait-ref.h
+++ b/gcc/rust/typecheck/rust-hir-trait-reference.h
diff --git a/gcc/rust/typecheck/rust-hir-trait-resolve.cc b/gcc/rust/typecheck/rust-hir-trait-resolve.cc
index 19f95ca..e2d0cf2 100644
--- a/gcc/rust/typecheck/rust-hir-trait-resolve.cc
+++ b/gcc/rust/typecheck/rust-hir-trait-resolve.cc
@@ -22,6 +22,16 @@
namespace Rust {
namespace Resolver {
+TraitItemReference
+ResolveTraitItemToRef::Resolve (
+ HIR::TraitItem &item, TyTy::BaseType *self,
+ std::vector<TyTy::SubstitutionParamMapping> substitutions)
+{
+ ResolveTraitItemToRef resolver (self, std::move (substitutions));
+ item.accept_vis (resolver);
+ return std::move (resolver.resolved);
+}
+
void
ResolveTraitItemToRef::visit (HIR::TraitItemType &type)
{
diff --git a/gcc/rust/typecheck/rust-hir-trait-resolve.h b/gcc/rust/typecheck/rust-hir-trait-resolve.h
index ca23d48..da8e2c0 100644
--- a/gcc/rust/typecheck/rust-hir-trait-resolve.h
+++ b/gcc/rust/typecheck/rust-hir-trait-resolve.h
@@ -19,9 +19,7 @@
#ifndef RUST_HIR_TRAIT_RESOLVE_H
#define RUST_HIR_TRAIT_RESOLVE_H
-#include "rust-hir-type-check-base.h"
#include "rust-hir-type-check-type.h"
-#include "rust-hir-trait-ref.h"
namespace Rust {
namespace Resolver {
@@ -32,12 +30,7 @@ class ResolveTraitItemToRef : public TypeCheckBase,
public:
static TraitItemReference
Resolve (HIR::TraitItem &item, TyTy::BaseType *self,
- std::vector<TyTy::SubstitutionParamMapping> substitutions)
- {
- ResolveTraitItemToRef resolver (self, std::move (substitutions));
- item.accept_vis (resolver);
- return std::move (resolver.resolved);
- }
+ std::vector<TyTy::SubstitutionParamMapping> substitutions);
void visit (HIR::TraitItemType &type) override;
diff --git a/gcc/rust/typecheck/rust-hir-type-check.h b/gcc/rust/typecheck/rust-hir-type-check.h
index d1eb750..5124539 100644
--- a/gcc/rust/typecheck/rust-hir-type-check.h
+++ b/gcc/rust/typecheck/rust-hir-type-check.h
@@ -22,7 +22,7 @@
#include "rust-hir-full-decls.h"
#include "rust-hir-map.h"
#include "rust-tyty.h"
-#include "rust-hir-trait-ref.h"
+#include "rust-hir-trait-reference.h"
#include "rust-autoderef.h"
namespace Rust {
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc
index 61c02a8..4c324c6 100644
--- a/gcc/rust/typecheck/rust-tyty.cc
+++ b/gcc/rust/typecheck/rust-tyty.cc
@@ -27,7 +27,7 @@
#include "rust-linemap.h"
#include "rust-substitution-mapper.h"
-#include "rust-hir-trait-ref.h"
+#include "rust-hir-trait-reference.h"
#include "rust-hir-type-bounds.h"
#include "rust-hir-trait-resolve.h"
#include "rust-tyty-rules.h"