1
Fork 0

Auto merge of #106092 - asquared31415:start_lang_item_checks, r=davidtwco

Add checks for the signature of the `start` lang item

Closes #105963
This commit is contained in:
bors 2023-01-13 07:45:34 +00:00
commit 4a04f252f9
18 changed files with 405 additions and 3 deletions

View file

@ -46,3 +46,14 @@ hir_typeck_add_missing_parentheses_in_range = you must surround the range in par
hir_typeck_op_trait_generic_params =
`{$method_name}` must not have any generic parameters
hir_typeck_lang_start_incorrect_number_params = incorrect number of parameters for the `start` lang item
hir_typeck_lang_start_incorrect_number_params_note_expected_count = the `start` lang item should have four parameters, but found {$found_param_count}
hir_typeck_lang_start_expected_sig_note = the `start` lang item should have the signature `fn(fn() -> T, isize, *const *const u8, u8) -> isize`
hir_typeck_lang_start_incorrect_param = parameter {$param_num} of the `start` lang item is incorrect
.suggestion = change the type from `{$found_ty}` to `{$expected_ty}`
hir_typeck_lang_start_incorrect_ret_ty = the return type of the `start` lang item is incorrect
.suggestion = change the type from `{$found_ty}` to `{$expected_ty}`