summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Yeung <kungfukeith11@gmail.com>2016-10-29 21:06:30 -0700
committerKeith Yeung <kungfukeith11@gmail.com>2016-10-29 21:06:30 -0700
commit76f649640607ffb5e727f59e442ffabef240f09c (patch)
tree14d4f2f169fee4086233329aaeea5e9d5947155a
parent6ff1c1d90efc1da0529a3d4ef9e457eee97f768d (diff)
Implement Drop for Diagnostic
-rwxr-xr-xsrc/clang.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clang.rs b/src/clang.rs
index c0934055..8e1ec258 100755
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -1042,9 +1042,11 @@ impl Diagnostic {
clang_getDiagnosticSeverity(self.x)
}
}
+}
+impl Drop for Diagnostic {
/// Destroy this diagnostic message.
- pub fn dispose(&self) {
+ fn drop(&mut self) {
unsafe {
clang_disposeDiagnostic(self.x);
}