Skip to content

Commit 76f6496

Browse files
committed
Implement Drop for Diagnostic
1 parent 6ff1c1d commit 76f6496

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/clang.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,9 +1042,11 @@ impl Diagnostic {
10421042
clang_getDiagnosticSeverity(self.x)
10431043
}
10441044
}
1045+
}
10451046

1047+
impl Drop for Diagnostic {
10461048
/// Destroy this diagnostic message.
1047-
pub fn dispose(&self) {
1049+
fn drop(&mut self) {
10481050
unsafe {
10491051
clang_disposeDiagnostic(self.x);
10501052
}

0 commit comments

Comments
 (0)