Rename HandlerInner::failure
as HandlerInner::failure_note
.
To match the `FailureNote` variant of `Level`.
This commit is contained in:
parent
7138845f61
commit
c3628bb970
1 changed files with 4 additions and 4 deletions
|
@ -1502,18 +1502,18 @@ impl HandlerInner {
|
||||||
error_codes.sort();
|
error_codes.sort();
|
||||||
if error_codes.len() > 1 {
|
if error_codes.len() > 1 {
|
||||||
let limit = if error_codes.len() > 9 { 9 } else { error_codes.len() };
|
let limit = if error_codes.len() > 9 { 9 } else { error_codes.len() };
|
||||||
self.failure(format!(
|
self.failure_note(format!(
|
||||||
"Some errors have detailed explanations: {}{}",
|
"Some errors have detailed explanations: {}{}",
|
||||||
error_codes[..limit].join(", "),
|
error_codes[..limit].join(", "),
|
||||||
if error_codes.len() > 9 { "..." } else { "." }
|
if error_codes.len() > 9 { "..." } else { "." }
|
||||||
));
|
));
|
||||||
self.failure(format!(
|
self.failure_note(format!(
|
||||||
"For more information about an error, try \
|
"For more information about an error, try \
|
||||||
`rustc --explain {}`.",
|
`rustc --explain {}`.",
|
||||||
&error_codes[0]
|
&error_codes[0]
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
self.failure(format!(
|
self.failure_note(format!(
|
||||||
"For more information about this error, try \
|
"For more information about this error, try \
|
||||||
`rustc --explain {}`.",
|
`rustc --explain {}`.",
|
||||||
&error_codes[0]
|
&error_codes[0]
|
||||||
|
@ -1633,7 +1633,7 @@ impl HandlerInner {
|
||||||
self.delayed_good_path_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
|
self.delayed_good_path_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn failure(&mut self, msg: impl Into<DiagnosticMessage>) {
|
fn failure_note(&mut self, msg: impl Into<DiagnosticMessage>) {
|
||||||
self.emit_diagnostic(&mut Diagnostic::new(FailureNote, msg));
|
self.emit_diagnostic(&mut Diagnostic::new(FailureNote, msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue