Skip to content

Commit 715d61d

Browse files
committed
errors: rename typeck.ftl to hir_analysis.ftl
In #102306, `rustc_typeck` was renamed to `rustc_hir_analysis` but the diagnostic resources were not renamed - which is what this commit changes. Signed-off-by: David Wood <david.wood@huawei.com>
1 parent 837bf37 commit 715d61d

File tree

9 files changed

+322
-315
lines changed

9 files changed

+322
-315
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
compiletest_example = this is an example message used in testing
2+
.note = with a note
3+
.help = with a help
4+
.suggestion = with a suggestion
5+
.label = with a label
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
1-
typeck_field_multiply_specified_in_initializer =
1+
hir_analysis_field_multiply_specified_in_initializer =
22
field `{$ident}` specified more than once
33
.label = used more than once
44
.previous_use_label = first use of `{$ident}`
55
6-
typeck_unrecognized_atomic_operation =
6+
hir_analysis_unrecognized_atomic_operation =
77
unrecognized atomic operation function: `{$op}`
88
.label = unrecognized atomic operation
99
10-
typeck_wrong_number_of_generic_arguments_to_intrinsic =
10+
hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
1111
intrinsic has wrong number of {$descr} parameters: found {$found}, expected {$expected}
1212
.label = expected {$expected} {$descr} {$expected ->
1313
[one] parameter
1414
*[other] parameters
1515
}
1616
17-
typeck_unrecognized_intrinsic_function =
17+
hir_analysis_unrecognized_intrinsic_function =
1818
unrecognized intrinsic function: `{$name}`
1919
.label = unrecognized intrinsic
2020
21-
typeck_lifetimes_or_bounds_mismatch_on_trait =
21+
hir_analysis_lifetimes_or_bounds_mismatch_on_trait =
2222
lifetime parameters or bounds on {$item_kind} `{$ident}` do not match the trait declaration
2323
.label = lifetimes do not match {$item_kind} in trait
2424
.generics_label = lifetimes in impl do not match this {$item_kind} in trait
2525
26-
typeck_drop_impl_on_wrong_item =
26+
hir_analysis_drop_impl_on_wrong_item =
2727
the `Drop` trait may only be implemented for local structs, enums, and unions
2828
.label = must be a struct, enum, or union in the current crate
2929
30-
typeck_field_already_declared =
30+
hir_analysis_field_already_declared =
3131
field `{$field_name}` is already declared
3232
.label = field already declared
3333
.previous_decl_label = `{$field_name}` first declared here
3434
35-
typeck_copy_impl_on_type_with_dtor =
35+
hir_analysis_copy_impl_on_type_with_dtor =
3636
the trait `Copy` may not be implemented for this type; the type has a destructor
3737
.label = `Copy` not allowed on types with destructors
3838
39-
typeck_multiple_relaxed_default_bounds =
39+
hir_analysis_multiple_relaxed_default_bounds =
4040
type parameter has more than one relaxed default bound, only one is supported
4141
42-
typeck_copy_impl_on_non_adt =
42+
hir_analysis_copy_impl_on_non_adt =
4343
the trait `Copy` may not be implemented for this type
4444
.label = type is not a structure or enumeration
4545
46-
typeck_trait_object_declared_with_no_traits =
46+
hir_analysis_trait_object_declared_with_no_traits =
4747
at least one trait is required for an object type
4848
.alias_span = this alias does not contain a trait
4949
50-
typeck_ambiguous_lifetime_bound =
50+
hir_analysis_ambiguous_lifetime_bound =
5151
ambiguous lifetime bound, explicit lifetime bound required
5252
53-
typeck_assoc_type_binding_not_allowed =
53+
hir_analysis_assoc_type_binding_not_allowed =
5454
associated type bindings are not allowed here
5555
.label = associated type not allowed here
5656
57-
typeck_functional_record_update_on_non_struct =
57+
hir_analysis_functional_record_update_on_non_struct =
5858
functional record update syntax requires a struct
5959
60-
typeck_typeof_reserved_keyword_used =
60+
hir_analysis_typeof_reserved_keyword_used =
6161
`typeof` is a reserved keyword but unimplemented
6262
.suggestion = consider replacing `typeof(...)` with an actual type
6363
.label = reserved keyword
6464
65-
typeck_return_stmt_outside_of_fn_body =
65+
hir_analysis_return_stmt_outside_of_fn_body =
6666
return statement outside of function body
6767
.encl_body_label = the return is part of this body...
6868
.encl_fn_label = ...not the enclosing function body
6969
70-
typeck_yield_expr_outside_of_generator =
70+
hir_analysis_yield_expr_outside_of_generator =
7171
yield expression outside of generator literal
7272
73-
typeck_struct_expr_non_exhaustive =
73+
hir_analysis_struct_expr_non_exhaustive =
7474
cannot create non-exhaustive {$what} using struct expression
7575
76-
typeck_method_call_on_unknown_type =
76+
hir_analysis_method_call_on_unknown_type =
7777
the type of this value must be known to call a method on a raw pointer on it
7878
79-
typeck_value_of_associated_struct_already_specified =
79+
hir_analysis_value_of_associated_struct_already_specified =
8080
the value of the associated type `{$item_name}` (from trait `{$def_path}`) is already specified
8181
.label = re-bound here
8282
.previous_bound_label = `{$item_name}` bound here first
8383
84-
typeck_address_of_temporary_taken = cannot take address of a temporary
84+
hir_analysis_address_of_temporary_taken = cannot take address of a temporary
8585
.label = temporary value
8686
87-
typeck_add_return_type_add = try adding a return type
87+
hir_analysis_add_return_type_add = try adding a return type
8888
89-
typeck_add_return_type_missing_here = a return type might be missing here
89+
hir_analysis_add_return_type_missing_here = a return type might be missing here
9090
91-
typeck_expected_default_return_type = expected `()` because of default return type
91+
hir_analysis_expected_default_return_type = expected `()` because of default return type
9292
93-
typeck_expected_return_type = expected `{$expected}` because of return type
93+
hir_analysis_expected_return_type = expected `{$expected}` because of return type
9494
95-
typeck_unconstrained_opaque_type = unconstrained opaque type
95+
hir_analysis_unconstrained_opaque_type = unconstrained opaque type
9696
.note = `{$name}` must be used in combination with a concrete type within the same module
9797
98-
typeck_missing_type_params =
98+
hir_analysis_missing_type_params =
9999
the type {$parameterCount ->
100100
[one] parameter
101101
*[other] parameters
@@ -117,19 +117,19 @@ typeck_missing_type_params =
117117
} to {$parameters}
118118
.note = because of the default `Self` reference, type parameters must be specified on object types
119119
120-
typeck_manual_implementation =
120+
hir_analysis_manual_implementation =
121121
manual implementations of `{$trait_name}` are experimental
122122
.label = manual implementations of `{$trait_name}` are experimental
123123
.help = add `#![feature(unboxed_closures)]` to the crate attributes to enable
124124
125-
typeck_substs_on_overridden_impl = could not resolve substs on overridden impl
125+
hir_analysis_substs_on_overridden_impl = could not resolve substs on overridden impl
126126
127-
typeck_unused_extern_crate =
127+
hir_analysis_unused_extern_crate =
128128
unused extern crate
129129
.suggestion = remove it
130130
131-
typeck_extern_crate_not_idiomatic =
131+
hir_analysis_extern_crate_not_idiomatic =
132132
`extern crate` is not idiomatic in the new edition
133133
.suggestion = convert it to a `{$msg_code}`
134134
135-
typeck_expected_used_symbol = expected `used`, `used(compiler)` or `used(linker)`
135+
hir_analysis_expected_used_symbol = expected `used`, `used(compiler)` or `used(linker)`

Diff for: compiler/rustc_error_messages/src/lib.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,28 @@ fluent_messages! {
4040
attr => "../locales/en-US/attr.ftl",
4141
borrowck => "../locales/en-US/borrowck.ftl",
4242
builtin_macros => "../locales/en-US/builtin_macros.ftl",
43+
compiletest => "../locales/en-US/compiletest.ftl",
4344
const_eval => "../locales/en-US/const_eval.ftl",
4445
driver => "../locales/en-US/driver.ftl",
4546
expand => "../locales/en-US/expand.ftl",
46-
session => "../locales/en-US/session.ftl",
47-
interface => "../locales/en-US/interface.ftl",
47+
hir_analysis => "../locales/en-US/hir_analysis.ftl",
4848
infer => "../locales/en-US/infer.ftl",
49+
interface => "../locales/en-US/interface.ftl",
4950
lint => "../locales/en-US/lint.ftl",
51+
metadata => "../locales/en-US/metadata.ftl",
5052
middle => "../locales/en-US/middle.ftl",
53+
mir_dataflow => "../locales/en-US/mir_dataflow.ftl",
5154
monomorphize => "../locales/en-US/monomorphize.ftl",
52-
metadata => "../locales/en-US/metadata.ftl",
5355
parser => "../locales/en-US/parser.ftl",
5456
passes => "../locales/en-US/passes.ftl",
5557
plugin_impl => "../locales/en-US/plugin_impl.ftl",
5658
privacy => "../locales/en-US/privacy.ftl",
5759
query_system => "../locales/en-US/query_system.ftl",
58-
trait_selection => "../locales/en-US/trait_selection.ftl",
5960
save_analysis => "../locales/en-US/save_analysis.ftl",
60-
ty_utils => "../locales/en-US/ty_utils.ftl",
61-
typeck => "../locales/en-US/typeck.ftl",
62-
mir_dataflow => "../locales/en-US/mir_dataflow.ftl",
61+
session => "../locales/en-US/session.ftl",
6362
symbol_mangling => "../locales/en-US/symbol_mangling.ftl",
63+
trait_selection => "../locales/en-US/trait_selection.ftl",
64+
ty_utils => "../locales/en-US/ty_utils.ftl",
6465
}
6566

6667
pub use fluent_generated::{self as fluent, DEFAULT_LOCALE_RESOURCES};

0 commit comments

Comments
 (0)