Skip to content

Commit da84889

Browse files
committed
Rust: Use @diagnostic_error, @diagnostic_warning rather than constants.
1 parent 88abc8f commit da84889

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

rust/ql/lib/codeql/rust/Diagnostics.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ class Diagnostic extends @diagnostic {
4949
}
5050

5151
/** A diagnostic that is error severity. */
52-
class ExtractionError extends Diagnostic {
53-
ExtractionError() { this.getSeverity() = 40 }
54-
}
52+
class ExtractionError extends Diagnostic, @diagnostic_error { }
5553

5654
/** A diagnostic that is warning severity. */
57-
class ExtractionWarning extends Diagnostic {
58-
ExtractionWarning() { this.getSeverity() = 30 }
59-
}
55+
class ExtractionWarning extends Diagnostic, @diagnostic_warning { }

0 commit comments

Comments
 (0)