aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/backend/rust-compile-implitem.cc2
-rw-r--r--gcc/rust/checks/errors/rust-const-checker.cc2
-rw-r--r--gcc/rust/checks/errors/rust-hir-pattern-analysis.cc2
-rw-r--r--gcc/rust/checks/errors/rust-unsafe-checker.cc2
-rw-r--r--gcc/rust/hir/tree/rust-hir-item.h2
-rw-r--r--gcc/rust/typecheck/rust-hir-trait-resolve.cc2
6 files changed, 5 insertions, 7 deletions
diff --git a/gcc/rust/backend/rust-compile-implitem.cc b/gcc/rust/backend/rust-compile-implitem.cc
index 352685e..129e978 100644
--- a/gcc/rust/backend/rust-compile-implitem.cc
+++ b/gcc/rust/backend/rust-compile-implitem.cc
@@ -57,7 +57,7 @@ CompileTraitItem::visit (HIR::TraitItemConst &constant)
void
CompileTraitItem::visit (HIR::TraitItemFunc &func)
{
- rust_assert (func.has_block_defined ());
+ rust_assert (func.has_definition ());
rust_assert (concrete->get_kind () == TyTy::TypeKind::FNDEF);
TyTy::FnType *fntype = static_cast<TyTy::FnType *> (concrete);
diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc
index 420db8f..97b3528 100644
--- a/gcc/rust/checks/errors/rust-const-checker.cc
+++ b/gcc/rust/checks/errors/rust-const-checker.cc
@@ -678,7 +678,7 @@ ConstChecker::visit (StaticItem &static_item)
void
ConstChecker::visit (TraitItemFunc &item)
{
- if (item.has_block_defined ())
+ if (item.has_definition ())
item.get_block_expr ().accept_vis (*this);
}
diff --git a/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc b/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
index db1e727..79416b5 100644
--- a/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
+++ b/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
@@ -522,7 +522,7 @@ PatternChecker::visit (StaticItem &static_item)
void
PatternChecker::visit (TraitItemFunc &item)
{
- if (item.has_block_defined ())
+ if (item.has_definition ())
item.get_block_expr ().accept_vis (*this);
}
diff --git a/gcc/rust/checks/errors/rust-unsafe-checker.cc b/gcc/rust/checks/errors/rust-unsafe-checker.cc
index 6c9141c..fadfd9d 100644
--- a/gcc/rust/checks/errors/rust-unsafe-checker.cc
+++ b/gcc/rust/checks/errors/rust-unsafe-checker.cc
@@ -776,7 +776,7 @@ UnsafeChecker::visit (StaticItem &static_item)
void
UnsafeChecker::visit (TraitItemFunc &item)
{
- if (item.has_block_defined ())
+ if (item.has_definition ())
item.get_block_expr ().accept_vis (*this);
}
diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h
index 0fda167..4744717 100644
--- a/gcc/rust/hir/tree/rust-hir-item.h
+++ b/gcc/rust/hir/tree/rust-hir-item.h
@@ -1991,8 +1991,6 @@ public:
const TraitFunctionDecl &get_decl () const { return decl; }
- bool has_block_defined () const { return block_expr != nullptr; }
-
BlockExpr &get_block_expr () { return *block_expr; }
const std::string trait_identifier () const override final
diff --git a/gcc/rust/typecheck/rust-hir-trait-resolve.cc b/gcc/rust/typecheck/rust-hir-trait-resolve.cc
index 2fbf123..14e26f4 100644
--- a/gcc/rust/typecheck/rust-hir-trait-resolve.cc
+++ b/gcc/rust/typecheck/rust-hir-trait-resolve.cc
@@ -69,7 +69,7 @@ ResolveTraitItemToRef::visit (HIR::TraitItemFunc &fn)
{
// create trait-item-ref
location_t locus = fn.get_locus ();
- bool is_optional = fn.has_block_defined ();
+ bool is_optional = fn.has_definition ();
std::string identifier = fn.get_decl ().get_function_name ().as_string ();
resolved = TraitItemReference (identifier, is_optional,