You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/rustc_hir_typeck/messages.ftl
+5
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,11 @@ hir_typeck_lang_start_incorrect_param = parameter {$param_num} of the `start` la
63
63
hir_typeck_lang_start_incorrect_ret_ty = the return type of the `start` lang item is incorrect
64
64
.suggestion = change the type from `{$found_ty}` to `{$expected_ty}`
65
65
66
+
hir_typeck_lossy_provenance_int2ptr =
67
+
strict provenance disallows casting integer `{$expr_ty}` to pointer `{$cast_ty}`
68
+
.suggestion = use `.with_addr()` to adjust a valid pointer in the same allocation, to this address
69
+
.help = if you can't comply with strict provenance and don't have a pointer with the correct provenance you can use `std::ptr::from_exposed_addr()` instead
70
+
66
71
hir_typeck_lossy_provenance_ptr2int =
67
72
under strict provenance it is considered bad style to cast pointer `{$expr_ty}` to integer `{$cast_ty}`
68
73
.suggestion = use `.addr()` to obtain the address of a pointer
0 commit comments