aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/tree/rust-hir-generic-param.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir-generic-param.h')
-rw-r--r--gcc/rust/hir/tree/rust-hir-generic-param.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/rust/hir/tree/rust-hir-generic-param.h b/gcc/rust/hir/tree/rust-hir-generic-param.h
index 73b93d4..a1c59bf 100644
--- a/gcc/rust/hir/tree/rust-hir-generic-param.h
+++ b/gcc/rust/hir/tree/rust-hir-generic-param.h
@@ -156,7 +156,11 @@ public:
bool has_default_expression () { return default_expression != nullptr; }
std::string get_name () { return name; }
- Type &get_type () { return *type; }
+ Type &get_type ()
+ {
+ rust_assert (type);
+ return *type;
+ }
Expr &get_default_expression () { return *default_expression; }
protected: