Make Diagnostic::is_error
return false for Level::FailureNote
.
It doesn't affect behaviour, but makes sense with (a) `FailureNote` having `()` as its emission guarantee, and (b) in `Level` the `is_error` levels now are all listed before the non-`is_error` levels.
This commit is contained in:
parent
4e3eed4892
commit
e8c3cbf44b
2 changed files with 6 additions and 3 deletions
|
@ -238,8 +238,7 @@ impl Diagnostic {
|
||||||
Level::Bug
|
Level::Bug
|
||||||
| Level::DelayedBug(DelayedBugKind::Normal)
|
| Level::DelayedBug(DelayedBugKind::Normal)
|
||||||
| Level::Fatal
|
| Level::Fatal
|
||||||
| Level::Error
|
| Level::Error => true,
|
||||||
| Level::FailureNote => true,
|
|
||||||
|
|
||||||
Level::ForceWarning(_)
|
Level::ForceWarning(_)
|
||||||
| Level::Warning
|
| Level::Warning
|
||||||
|
@ -248,6 +247,7 @@ impl Diagnostic {
|
||||||
| Level::OnceNote
|
| Level::OnceNote
|
||||||
| Level::Help
|
| Level::Help
|
||||||
| Level::OnceHelp
|
| Level::OnceHelp
|
||||||
|
| Level::FailureNote
|
||||||
| Level::Allow
|
| Level::Allow
|
||||||
| Level::Expect(_) => false,
|
| Level::Expect(_) => false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1541,6 +1541,8 @@ pub enum Level {
|
||||||
///
|
///
|
||||||
/// The [`LintExpectationId`] is used for expected lint diagnostics. In all other cases this
|
/// The [`LintExpectationId`] is used for expected lint diagnostics. In all other cases this
|
||||||
/// should be `None`.
|
/// should be `None`.
|
||||||
|
///
|
||||||
|
/// Its `EmissionGuarantee` is `()`.
|
||||||
ForceWarning(Option<LintExpectationId>),
|
ForceWarning(Option<LintExpectationId>),
|
||||||
|
|
||||||
/// A warning about the code being compiled. Does not prevent compilation from finishing.
|
/// A warning about the code being compiled. Does not prevent compilation from finishing.
|
||||||
|
@ -1570,7 +1572,8 @@ pub enum Level {
|
||||||
/// Its `EmissionGuarantee` is `()`.
|
/// Its `EmissionGuarantee` is `()`.
|
||||||
OnceHelp,
|
OnceHelp,
|
||||||
|
|
||||||
/// Similar to `Note`, but used in cases where compilation has failed. Rare.
|
/// Similar to `Note`, but used in cases where compilation has failed. When printed for human
|
||||||
|
/// consumption, it doesn't have any kind of `note:` label. Rare.
|
||||||
///
|
///
|
||||||
/// Its `EmissionGuarantee` is `()`.
|
/// Its `EmissionGuarantee` is `()`.
|
||||||
FailureNote,
|
FailureNote,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue