diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-06 07:03:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-06 07:03:14 +0100 |
| commit | 4f9651b85409a1e6ad5199211947d124ebbab935 (patch) | |
| tree | 4d022868d407cf1bed36883037e4e97d1fa5094a /src/librustc_errors | |
| parent | 7f7218fd2102a084b0fbfd08abe6e200c9da4409 (diff) | |
| parent | ad550b8ef32e336ad74a87669de041eba9f7d1c6 (diff) | |
| download | rust-4f9651b85409a1e6ad5199211947d124ebbab935.tar.gz rust-4f9651b85409a1e6ad5199211947d124ebbab935.zip | |
Rollup merge of #66139 - euclio:pluralize, r=nagisa
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 5f74df13fae..291920f17f6 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; @@ -1581,7 +1581,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 { "" } }; |
