diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-10-30 11:50:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-30 11:50:38 -0500 |
commit | 146078744e486288bd5c97b2a0781fb6107347fc (patch) | |
tree | c711aec0cc06dfc5714cd2cfd108e8b4fdc8e9e1 | |
parent | 3d87789344b33188c786caff67e3882e1aa6f4b8 (diff) | |
parent | 76f649640607ffb5e727f59e442ffabef240f09c (diff) |
Auto merge of #168 - KiChjang:diagnostic-drop, r=emilio
Implement Drop for Diagnostic
I built it and ran the test, and they all pass. Not sure what else there is to test for.
Fixes #145.
-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 77cead95..3d87dccd 100755 --- a/src/clang.rs +++ b/src/clang.rs @@ -1047,9 +1047,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); } |