diff options
author | Keith Yeung <kungfukeith11@gmail.com> | 2016-10-29 21:06:30 -0700 |
---|---|---|
committer | Keith Yeung <kungfukeith11@gmail.com> | 2016-10-29 21:06:30 -0700 |
commit | 76f649640607ffb5e727f59e442ffabef240f09c (patch) | |
tree | 14d4f2f169fee4086233329aaeea5e9d5947155a | |
parent | 6ff1c1d90efc1da0529a3d4ef9e457eee97f768d (diff) |
Implement Drop for Diagnostic
-rwxr-xr-x | src/clang.rs | 4 |
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); } |