aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-item.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-item.h')
-rw-r--r--gcc/rust/ast/rust-item.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index 0ee1313..02b305d 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -3264,6 +3264,13 @@ public:
return *trait_path;
}
+ Type &get_trait_path_type ()
+ {
+ rust_assert (trait_path->get_path_kind () == Path::Kind::Type);
+
+ return (AST::Type &) static_cast<AST::TypePath &> (*trait_path);
+ }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */