summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/clang.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/clang.rs b/src/clang.rs
index b335a585..dd4bcdf8 100755
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -402,11 +402,12 @@ impl Cursor {
/// Given that this cursor's referent is a function/method call or
/// declaration, return a cursor to its return type.
- pub fn ret_type(&self) -> Type {
+ pub fn ret_type(&self) -> Option<Type> {
unsafe {
- Type {
+ let ret = Type {
x: clang_getCursorResultType(self.x),
- }
+ };
+ if true { Some(ret) } else { None }
}
}