Skip to content

Commit 1625d13

Browse files
committed
tidy
1 parent a61b924 commit 1625d13

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

compiler/rustc_lint/messages.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ lint_identifier_non_ascii_char = identifier contains non-ASCII characters
242242
243243
lint_identifier_uncommon_codepoints = identifier contains {$codepoints_len ->
244244
[one] { $identifier_type ->
245-
[Exclusion] a Unicode codepoint that is no longer used
245+
[Exclusion] a Unicode codepoint that its corresponding script is no longer used
246246
[Technical] a Unicode codepoint that has specialized usage
247247
[Limited_Use] a Unicode codepoint that is in limited use
248248
[Not_NFKC] a Unicode codepoint that is not used in normalized strings
249249
*[other] an uncommon Unicode codepoint
250250
}
251251
*[other] { $identifier_type ->
252-
[Exclusion] {$codepoints_len} Unicode codepoints that are no longer used
252+
[Exclusion] {$codepoints_len} Unicode codepoints that their corresponding scripts are no longer used
253253
[Technical] {$codepoints_len} Unicode codepoints that have specialized usage
254254
[Limited_Use] {$codepoints_len} Unicode codepoints that are in limited use
255255
[Not_NFKC] {$codepoints_len} Unicode codepoints that are not used in normalized strings

compiler/rustc_lint/src/non_ascii_idents.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ impl EarlyLintPass for NonAsciiIdents {
190190
if check_uncommon_codepoints
191191
&& !symbol_str.chars().all(GeneralSecurityProfile::identifier_allowed)
192192
{
193-
let mut chars: Vec<_> = symbol_str.chars()
193+
let mut chars: Vec<_> = symbol_str
194+
.chars()
194195
.map(|c| (c, GeneralSecurityProfile::identifier_type(c)))
195196
.collect();
196197

@@ -200,7 +201,8 @@ impl EarlyLintPass for NonAsciiIdents {
200201
(IdentifierType::Limited_Use, "Limited_Use"),
201202
(IdentifierType::Not_NFKC, "Not_NFKC"),
202203
] {
203-
let codepoints: Vec<_> = chars.extract_if(|(_, ty)| *ty == Some(id_ty)).collect();
204+
let codepoints: Vec<_> =
205+
chars.extract_if(|(_, ty)| *ty == Some(id_ty)).collect();
204206
if codepoints.is_empty() {
205207
continue;
206208
}

0 commit comments

Comments
 (0)