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
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,11 @@ hir_typeck_lang_start_incorrect_param = parameter {$param_num} of the `start` la
69
69
hir_typeck_lang_start_incorrect_ret_ty = the return type of the `start` lang item is incorrect
70
70
.suggestion = change the type from `{$found_ty}` to `{$expected_ty}`
71
71
72
+
hir_typeck_lossy_provenance_int2ptr =
73
+
strict provenance disallows casting integer `{$expr_ty}` to pointer `{$cast_ty}`
74
+
.suggestion = use `.with_addr()` to adjust a valid pointer in the same allocation, to this address
75
+
.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
76
+
72
77
hir_typeck_lossy_provenance_ptr2int =
73
78
under strict provenance it is considered bad style to cast pointer `{$expr_ty}` to integer `{$cast_ty}`
74
79
.suggestion = use `.addr()` to obtain the address of a pointer
0 commit comments