Skip to content

Commit 67bc030

Browse files
committed
change flt back to ftl
1 parent dd09100 commit 67bc030

File tree

13 files changed

+133
-148
lines changed

13 files changed

+133
-148
lines changed

compiler/rustc_attr_parsing/messages.ftl

Lines changed: 77 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
attr_parsing_as_needed_compatibility =
2+
linking modifier `as-needed` is only compatible with `dylib` and `framework` linking kinds
3+
4+
attr_parsing_bundle_needs_static =
5+
linking modifier `bundle` is only compatible with `static` linking kind
6+
17
attr_parsing_cfg_predicate_identifier =
28
`cfg` predicate key must be an identifier
39
@@ -18,16 +24,12 @@ attr_parsing_empty_attribute =
1824
}
1925
2026
21-
attr_parsing_invalid_target = `#[{$name}]` attribute cannot be used on {$target}
22-
.help = `#[{$name}]` can {$only}be applied to {$applied}
23-
.suggestion = remove the attribute
24-
attr_parsing_invalid_target_lint = `#[{$name}]` attribute cannot be used on {$target}
25-
.warn = {-attr_parsing_previously_accepted}
26-
.help = `#[{$name}]` can {$only}be applied to {$applied}
27-
.suggestion = remove the attribute
28-
2927
attr_parsing_empty_confusables =
3028
expected at least one confusable name
29+
attr_parsing_empty_link_name =
30+
link name must not be empty
31+
.label = empty link name
32+
3133
attr_parsing_expected_one_cfg_pattern =
3234
expected 1 cfg-pattern
3335
@@ -48,6 +50,15 @@ attr_parsing_ill_formed_attribute_input = {$num_suggestions ->
4850
*[other] valid forms for the attribute are {$suggestions}
4951
}
5052
53+
attr_parsing_import_name_type_raw =
54+
import name type can only be used with link kind `raw-dylib`
55+
56+
attr_parsing_import_name_type_x86 =
57+
import name type is only supported on x86
58+
59+
attr_parsing_incompatible_wasm_link =
60+
`wasm_import_module` is incompatible with other arguments in `#[link]` attributes
61+
5162
attr_parsing_incorrect_repr_format_align_one_arg =
5263
incorrect `repr(align)` attribute format: `align` takes exactly one argument in parentheses
5364
@@ -67,6 +78,11 @@ attr_parsing_incorrect_repr_format_packed_one_or_zero_arg =
6778
attr_parsing_invalid_alignment_value =
6879
invalid alignment value: {$error_part}
6980
81+
attr_parsing_invalid_attr_unsafe = `{$name}` is not an unsafe attribute
82+
.label = this is not an unsafe attribute
83+
.suggestion = remove the `unsafe(...)`
84+
.note = extraneous unsafe is not allowed in attributes
85+
7086
attr_parsing_invalid_issue_string =
7187
`issue` must be a non-zero numeric string or "none"
7288
.must_not_be_zero = `issue` must not be "0", use "none" instead
@@ -75,6 +91,13 @@ attr_parsing_invalid_issue_string =
7591
.pos_overflow = number too large to fit in target type
7692
.neg_overflow = number too small to fit in target type
7793
94+
attr_parsing_invalid_link_modifier =
95+
invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed
96+
97+
attr_parsing_invalid_meta_item = expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found {$descr}
98+
.remove_neg_sugg = negative numbers are not literals, try removing the `-` sign
99+
.quote_ident_sugg = surround the identifier with quotation marks to make it into a string literal
100+
78101
attr_parsing_invalid_predicate =
79102
invalid predicate `{$predicate}`
80103
@@ -100,9 +123,36 @@ attr_parsing_invalid_style = {$is_used_as_inner ->
100123
}
101124
.note = This attribute does not have an `!`, which means it is applied to this {$target}
102125
126+
attr_parsing_invalid_target = `#[{$name}]` attribute cannot be used on {$target}
127+
.help = `#[{$name}]` can {$only}be applied to {$applied}
128+
.suggestion = remove the attribute
129+
attr_parsing_invalid_target_lint = `#[{$name}]` attribute cannot be used on {$target}
130+
.warn = {-attr_parsing_previously_accepted}
131+
.help = `#[{$name}]` can {$only}be applied to {$applied}
132+
.suggestion = remove the attribute
133+
134+
attr_parsing_limit_invalid =
135+
`limit` must be a non-negative integer
136+
.label = {$error_str}
137+
attr_parsing_link_arg_unstable =
138+
link kind `link-arg` is unstable
139+
140+
attr_parsing_link_cfg_unstable =
141+
link cfg is unstable
142+
143+
attr_parsing_link_framework_apple =
144+
link kind `framework` is only supported on Apple targets
145+
103146
attr_parsing_link_ordinal_out_of_range = ordinal value in `link_ordinal` is too large: `{$ordinal}`
104147
.note = the value may not exceed `u16::MAX`
105148
149+
attr_parsing_link_requires_name =
150+
`#[link]` attribute requires a `name = "string"` argument
151+
.label = missing `name` argument
152+
153+
attr_parsing_meta_bad_delim = wrong meta list delimiters
154+
attr_parsing_meta_bad_delim_suggestion = the delimiters should be `(` and `)`
155+
106156
attr_parsing_missing_feature =
107157
missing 'feature'
108158
@@ -115,6 +165,9 @@ attr_parsing_missing_note =
115165
attr_parsing_missing_since =
116166
missing 'since'
117167
168+
attr_parsing_multiple_modifiers =
169+
multiple `{$modifier}` modifiers in a single `modifiers` argument
170+
118171
attr_parsing_multiple_stability_levels =
119172
multiple stability levels
120173
@@ -138,6 +191,15 @@ attr_parsing_objc_class_expected_string_literal = `objc::class!` expected a stri
138191
139192
attr_parsing_objc_selector_expected_string_literal = `objc::selector!` expected a string literal
140193
194+
attr_parsing_raw_dylib_elf_unstable =
195+
link kind `raw-dylib` is unstable on ELF platforms
196+
197+
attr_parsing_raw_dylib_no_nul =
198+
link name must not contain NUL characters if link kind is `raw-dylib`
199+
200+
attr_parsing_raw_dylib_only_windows =
201+
link kind `raw-dylib` is only supported on Windows targets
202+
141203
attr_parsing_repr_ident =
142204
meta item in `repr` must be an identifier
143205
@@ -152,6 +214,9 @@ attr_parsing_soft_no_args =
152214
153215
attr_parsing_stability_outside_std = stability attributes may not be used outside of the standard library
154216
217+
attr_parsing_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
218+
.help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
219+
155220
attr_parsing_unknown_meta_item =
156221
unknown meta item '{$item}'
157222
.label = expected one of {$expected}
@@ -164,6 +229,10 @@ attr_parsing_unrecognized_repr_hint =
164229
.help = valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
165230
.note = for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
166231
232+
attr_parsing_unsafe_attr_outside_unsafe = unsafe attribute used without unsafe
233+
.label = usage of unsafe attribute
234+
attr_parsing_unsafe_attr_outside_unsafe_suggestion = wrap the attribute in `unsafe(...)`
235+
167236
attr_parsing_unstable_cfg_target_compact =
168237
compact `cfg(target(..))` is experimental and subject to change
169238
@@ -193,77 +262,5 @@ attr_parsing_unused_multiple =
193262
-attr_parsing_previously_accepted =
194263
this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
195264
196-
attr_parsing_meta_bad_delim = wrong meta list delimiters
197-
attr_parsing_meta_bad_delim_suggestion = the delimiters should be `(` and `)`
198-
199-
attr_parsing_unsafe_attr_outside_unsafe = unsafe attribute used without unsafe
200-
.label = usage of unsafe attribute
201-
attr_parsing_unsafe_attr_outside_unsafe_suggestion = wrap the attribute in `unsafe(...)`
202-
203-
attr_parsing_invalid_attr_unsafe = `{$name}` is not an unsafe attribute
204-
.label = this is not an unsafe attribute
205-
.suggestion = remove the `unsafe(...)`
206-
.note = extraneous unsafe is not allowed in attributes
207-
208-
attr_parsing_invalid_meta_item = expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found {$descr}
209-
.remove_neg_sugg = negative numbers are not literals, try removing the `-` sign
210-
.quote_ident_sugg = surround the identifier with quotation marks to make it into a string literal
211-
212-
attr_parsing_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
213-
.help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
214-
215-
attr_parsing_as_needed_compatibility =
216-
linking modifier `as-needed` is only compatible with `dylib` and `framework` linking kinds
217-
218-
attr_parsing_bundle_needs_static =
219-
linking modifier `bundle` is only compatible with `static` linking kind
220-
221-
attr_parsing_empty_link_name =
222-
link name must not be empty
223-
.label = empty link name
224-
225-
attr_parsing_import_name_type_raw =
226-
import name type can only be used with link kind `raw-dylib`
227-
228-
attr_parsing_import_name_type_x86 =
229-
import name type is only supported on x86
230-
231-
attr_parsing_incompatible_wasm_link =
232-
`wasm_import_module` is incompatible with other arguments in `#[link]` attributes
233-
234-
attr_parsing_invalid_link_modifier =
235-
invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed
236-
237-
attr_parsing_link_arg_unstable =
238-
link kind `link-arg` is unstable
239-
240-
attr_parsing_link_cfg_unstable =
241-
link cfg is unstable
242-
243-
attr_parsing_link_framework_apple =
244-
link kind `framework` is only supported on Apple targets
245-
246-
attr_parsing_link_requires_name =
247-
`#[link]` attribute requires a `name = "string"` argument
248-
.label = missing `name` argument
249-
250-
attr_parsing_multiple_modifiers =
251-
multiple `{$modifier}` modifiers in a single `modifiers` argument
252-
253-
attr_parsing_multiple_renamings =
254-
multiple renamings were specified for library `{$lib_name}`
255-
attr_parsing_raw_dylib_no_nul =
256-
link name must not contain NUL characters if link kind is `raw-dylib`
257-
258-
attr_parsing_raw_dylib_elf_unstable =
259-
link kind `raw-dylib` is unstable on ELF platforms
260-
261-
attr_parsing_raw_dylib_only_windows =
262-
link kind `raw-dylib` is only supported on Windows targets
263-
264265
attr_parsing_whole_archive_needs_static =
265266
linking modifier `whole-archive` is only compatible with `static` linking kind
266-
267-
attr_parsing_limit_invalid =
268-
`limit` must be a non-negative integer
269-
.label = {$error_str}

compiler/rustc_builtin_macros/messages.ftl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ builtin_macros_concat_missing_literal = expected a literal
135135
builtin_macros_default_arg = `#[default]` attribute does not accept a value
136136
.suggestion = try using `#[default]`
137137
138+
builtin_macros_derive_from_usage_note = `#[derive(From)]` can only be used on structs with exactly one field
139+
140+
builtin_macros_derive_from_wrong_field_count = `#[derive(From)]` used on a struct with {$multiple_fields ->
141+
[true] multiple fields
142+
*[false] no fields
143+
}
144+
145+
builtin_macros_derive_from_wrong_target = `#[derive(From)]` used on {$kind}
146+
138147
builtin_macros_derive_macro_call = `derive` cannot be used on items with type macros
139148
140149
builtin_macros_derive_path_args_list = traits in `#[derive(...)]` don't accept arguments
@@ -229,15 +238,6 @@ builtin_macros_format_unused_args = multiple unused formatting arguments
229238
230239
builtin_macros_format_use_positional = consider using a positional formatting argument instead
231240
232-
builtin_macros_derive_from_wrong_target = `#[derive(From)]` used on {$kind}
233-
234-
builtin_macros_derive_from_wrong_field_count = `#[derive(From)]` used on a struct with {$multiple_fields ->
235-
[true] multiple fields
236-
*[false] no fields
237-
}
238-
239-
builtin_macros_derive_from_usage_note = `#[derive(From)]` can only be used on structs with exactly one field
240-
241241
builtin_macros_incomplete_include = include macro expected single expression in source
242242
243243
builtin_macros_multiple_default_attrs = multiple `#[default]` attributes

compiler/rustc_codegen_ssa/messages.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ codegen_ssa_invalid_literal_value = invalid literal value
9797
9898
codegen_ssa_invalid_monomorphization_basic_float_type = invalid monomorphization of `{$name}` intrinsic: expected basic float type, found `{$ty}`
9999
100-
codegen_ssa_invalid_monomorphization_basic_integer_type = invalid monomorphization of `{$name}` intrinsic: expected basic integer type, found `{$ty}`
101-
102100
codegen_ssa_invalid_monomorphization_basic_integer_or_ptr_type = invalid monomorphization of `{$name}` intrinsic: expected basic integer or pointer type, found `{$ty}`
103101
102+
codegen_ssa_invalid_monomorphization_basic_integer_type = invalid monomorphization of `{$name}` intrinsic: expected basic integer type, found `{$ty}`
103+
104104
codegen_ssa_invalid_monomorphization_cannot_return = invalid monomorphization of `{$name}` intrinsic: cannot return `{$ret_ty}`, expected `u{$expected_int_bits}` or `[u8; {$expected_bytes}]`
105105
106106
codegen_ssa_invalid_monomorphization_cast_wide_pointer = invalid monomorphization of `{$name}` intrinsic: cannot cast wide pointer `{$ty}`

compiler/rustc_const_eval/messages.ftl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,6 @@ const_eval_mutable_borrow_escaping =
231231
232232
const_eval_mutable_ptr_in_final = encountered mutable pointer in final value of {const_eval_intern_kind}
233233
234-
const_eval_partial_pointer_in_final = encountered partial pointer in final value of {const_eval_intern_kind}
235-
.note = while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value
236-
237234
const_eval_nested_static_in_thread_local = #[thread_local] does not support implicit nested statics, please create explicit static items and refer to them instead
238235
239236
const_eval_non_const_await =
@@ -302,6 +299,9 @@ const_eval_panic = evaluation panicked: {$msg}
302299
303300
const_eval_panic_non_str = argument to `panic!()` in a const context must have type `&str`
304301
302+
const_eval_partial_pointer_in_final = encountered partial pointer in final value of {const_eval_intern_kind}
303+
.note = while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value
304+
305305
const_eval_partial_pointer_read =
306306
unable to read parts of a pointer from memory at {$ptr}
307307
const_eval_pointer_arithmetic_overflow =
@@ -476,6 +476,7 @@ const_eval_validation_invalid_vtable_trait = {$front_matter}: wrong trait in wid
476476
const_eval_validation_mutable_ref_in_const = {$front_matter}: encountered mutable reference in `const` value
477477
const_eval_validation_mutable_ref_to_immutable = {$front_matter}: encountered mutable reference or box pointing to read-only memory
478478
const_eval_validation_never_val = {$front_matter}: encountered a value of the never type `!`
479+
const_eval_validation_nonnull_ptr_out_of_range = {$front_matter}: encountered a maybe-null pointer, but expected something that is definitely non-zero
479480
const_eval_validation_null_box = {$front_matter}: encountered a {$maybe ->
480481
[true] maybe-null
481482
*[false] null
@@ -485,7 +486,6 @@ const_eval_validation_null_ref = {$front_matter}: encountered a {$maybe ->
485486
[true] maybe-null
486487
*[false] null
487488
} reference
488-
const_eval_validation_nonnull_ptr_out_of_range = {$front_matter}: encountered a maybe-null pointer, but expected something that is definitely non-zero
489489
const_eval_validation_out_of_range = {$front_matter}: encountered {$value}, but expected something {$in_range}
490490
const_eval_validation_partial_pointer = {$front_matter}: encountered a partial pointer or a mix of pointers
491491
const_eval_validation_pointer_as_int = {$front_matter}: encountered a pointer, but {$expected}

compiler/rustc_expand/messages.ftl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ expand_malformed_feature_attribute =
9595
malformed `feature` attribute input
9696
.expected = expected just one word
9797
98+
expand_meta_var_dif_seq_matchers = {$msg}
99+
98100
expand_metavar_still_repeating = variable `{$ident}` is still repeating at this depth
99101
.label = expected repetition
100102
101103
expand_metavariable_wrong_operator = meta-variable repeats with different Kleene operator
102104
.binder_label = expected repetition
103105
.occurrence_label = conflicting repetition
104106
105-
expand_meta_var_dif_seq_matchers = {$msg}
106-
107107
expand_missing_fragment_specifier = missing fragment specifier
108108
.note = fragment specifiers must be provided
109109
.suggestion_add_fragspec = try adding a specifier here
@@ -198,12 +198,12 @@ expand_trailing_semi_macro = trailing semicolon in macro used in expression posi
198198
199199
expand_unknown_macro_variable = unknown macro variable `{$name}`
200200
201+
expand_unsupported_key_value =
202+
key-value macro attributes are not supported
203+
201204
expand_unused_builtin_attribute = unused attribute `{$attr_name}`
202205
.note = the built-in attribute `{$attr_name}` will be ignored, since it's applied to the macro invocation `{$macro_name}`
203206
.suggestion = remove the attribute
204207
205-
expand_unsupported_key_value =
206-
key-value macro attributes are not supported
207-
208208
expand_wrong_fragment_kind =
209209
non-{$kind} macro in {$kind} position: {$name}

compiler/rustc_lint/messages.ftl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,14 @@ lint_improper_ctypes_union_layout_help = consider adding a `#[repr(C)]` or `#[re
392392
lint_improper_ctypes_union_layout_reason = this union has unspecified layout
393393
lint_improper_ctypes_union_non_exhaustive = this union is non-exhaustive
394394
395+
lint_int_to_ptr_transmutes = transmuting an integer to a pointer creates a pointer without provenance
396+
.note = this is dangerous because dereferencing the resulting pointer is undefined behavior
397+
.note_exposed_provenance = exposed provenance semantics can be used to create a pointer based on some previously exposed provenance
398+
.help_transmute = for more information about transmute, see <https://doc.rust-lang.org/std/mem/fn.transmute.html#transmutation-between-pointers-and-integers>
399+
.help_exposed_provenance = for more information about exposed provenance, see <https://doc.rust-lang.org/std/ptr/index.html#exposed-provenance>
400+
.suggestion_with_exposed_provenance = use `std::ptr::with_exposed_provenance{$suffix}` instead to use a previously exposed provenance
401+
.suggestion_without_provenance_mut = if you truly mean to create a pointer without provenance, use `std::ptr::without_provenance_mut`
402+
395403
lint_invalid_asm_label_binary = avoid using labels containing only the digits `0` and `1` in inline assembly
396404
.label = use a different label that doesn't start with `0` or `1`
397405
.help = start numbering with `2` instead
@@ -439,14 +447,6 @@ lint_invalid_reference_casting_note_book = for more information, visit <https://
439447
440448
lint_invalid_reference_casting_note_ty_has_interior_mutability = even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get`
441449
442-
lint_int_to_ptr_transmutes = transmuting an integer to a pointer creates a pointer without provenance
443-
.note = this is dangerous because dereferencing the resulting pointer is undefined behavior
444-
.note_exposed_provenance = exposed provenance semantics can be used to create a pointer based on some previously exposed provenance
445-
.help_transmute = for more information about transmute, see <https://doc.rust-lang.org/std/mem/fn.transmute.html#transmutation-between-pointers-and-integers>
446-
.help_exposed_provenance = for more information about exposed provenance, see <https://doc.rust-lang.org/std/ptr/index.html#exposed-provenance>
447-
.suggestion_with_exposed_provenance = use `std::ptr::with_exposed_provenance{$suffix}` instead to use a previously exposed provenance
448-
.suggestion_without_provenance_mut = if you truly mean to create a pointer without provenance, use `std::ptr::without_provenance_mut`
449-
450450
lint_lintpass_by_hand = implementing `LintPass` by hand
451451
.help = try using `declare_lint_pass!` or `impl_lint_pass!` instead
452452

0 commit comments

Comments
 (0)