Fix plural mistake in emitter.rs
This commit is contained in:
parent
e5b8c118a3
commit
f042687959
2 changed files with 5 additions and 4 deletions
|
@ -12,7 +12,7 @@ use Destination::*;
|
|||
use syntax_pos::{SourceFile, Span, MultiSpan};
|
||||
|
||||
use crate::{
|
||||
Level, CodeSuggestion, Diagnostic, SubDiagnostic,
|
||||
Level, CodeSuggestion, Diagnostic, SubDiagnostic, pluralise,
|
||||
SuggestionStyle, SourceMapper, SourceMapperDyn, DiagnosticId,
|
||||
};
|
||||
use crate::Level::Error;
|
||||
|
@ -1572,7 +1572,8 @@ impl EmitterWriter {
|
|||
}
|
||||
}
|
||||
if suggestions.len() > MAX_SUGGESTIONS {
|
||||
let msg = format!("and {} other candidates", suggestions.len() - MAX_SUGGESTIONS);
|
||||
let others = suggestions.len() - MAX_SUGGESTIONS;
|
||||
let msg = format!("and {} other candidate{}", others, pluralise!(others));
|
||||
buffer.puts(row_num, max_line_num_len + 3, &msg, Style::NoStyle);
|
||||
} else if notice_capitalization {
|
||||
let msg = "notice the capitalization difference";
|
||||
|
|
|
@ -27,7 +27,7 @@ LL | use std::prelude::v1::Result;
|
|||
|
|
||||
LL | use std::result::Result;
|
||||
|
|
||||
and 1 other candidates
|
||||
and 1 other candidate
|
||||
|
||||
error[E0573]: expected type, found variant `Result`
|
||||
--> $DIR/issue-17546.rs:28:13
|
||||
|
@ -44,7 +44,7 @@ LL | use std::prelude::v1::Result;
|
|||
|
|
||||
LL | use std::result::Result;
|
||||
|
|
||||
and 1 other candidates
|
||||
and 1 other candidate
|
||||
|
||||
error[E0573]: expected type, found variant `NoResult`
|
||||
--> $DIR/issue-17546.rs:33:15
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue