diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-11-05 15:10:24 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-11-05 15:10:24 -0500 |
| commit | ad550b8ef32e336ad74a87669de041eba9f7d1c6 (patch) | |
| tree | 9846d3ad950c864884df163aa6feae07d8b97e01 /src/librustc_errors | |
| parent | 1423bec54cf2db283b614e527cfd602b481485d1 (diff) | |
| download | rust-ad550b8ef32e336ad74a87669de041eba9f7d1c6.tar.gz rust-ad550b8ef32e336ad74a87669de041eba9f7d1c6.zip | |
use American spelling for `pluralize!`
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 4 | ||||
| -rw-r--r-- | src/librustc_errors/lib.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index b153f0f0e82..de00df2765a 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -12,7 +12,7 @@ use Destination::*; use syntax_pos::{SourceFile, Span, MultiSpan}; use crate::{ - Level, CodeSuggestion, Diagnostic, SubDiagnostic, pluralise, + Level, CodeSuggestion, Diagnostic, SubDiagnostic, pluralize, SuggestionStyle, SourceMapper, SourceMapperDyn, DiagnosticId, }; use crate::Level::Error; @@ -1573,7 +1573,7 @@ impl EmitterWriter { } if suggestions.len() > MAX_SUGGESTIONS { let others = suggestions.len() - MAX_SUGGESTIONS; - let msg = format!("and {} other candidate{}", others, pluralise!(others)); + let msg = format!("and {} other candidate{}", others, pluralize!(others)); buffer.puts(row_num, max_line_num_len + 3, &msg, Style::NoStyle); } else if notice_capitalization { let msg = "notice the capitalization difference"; diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 9743cf0d805..67c180a05e9 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -1027,7 +1027,7 @@ impl Level { } #[macro_export] -macro_rules! pluralise { +macro_rules! pluralize { ($x:expr) => { if $x != 1 { "s" } else { "" } }; |
