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
hir_typeck_help_set_edition_cargo = set `edition = "{$edition}"` in `Cargo.toml`
58
75
hir_typeck_help_set_edition_standalone = pass `--edition {$edition}` to `rustc`
59
76
77
+
hir_typeck_int_to_fat = cannot cast `{$expr_ty}` to a pointer that {$known_wide->
78
+
[true] is
79
+
*[false] may be
80
+
} wide
81
+
hir_typeck_int_to_fat_label = creating a `{$cast_ty}` requires both an address and {$metadata}
82
+
hir_typeck_int_to_fat_label_nightly = consider casting this expression to `*const ()`, then using `core::ptr::from_raw_parts`
83
+
60
84
hir_typeck_invalid_callee = expected function, found {$ty}
61
85
62
86
hir_typeck_lang_start_expected_sig_note = the `start` lang item should have the signature `fn(fn() -> T, isize, *const *const u8, u8) -> isize`
@@ -69,6 +93,16 @@ hir_typeck_lang_start_incorrect_param = parameter {$param_num} of the `start` la
69
93
hir_typeck_lang_start_incorrect_ret_ty = the return type of the `start` lang item is incorrect
70
94
.suggestion = change the type from `{$found_ty}` to `{$expected_ty}`
71
95
96
+
hir_typeck_lossy_provenance_int2ptr =
97
+
strict provenance disallows casting integer `{$expr_ty}` to pointer `{$cast_ty}`
98
+
.suggestion = use `.with_addr()` to adjust a valid pointer in the same allocation, to this address
99
+
.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
100
+
101
+
hir_typeck_lossy_provenance_ptr2int =
102
+
under strict provenance it is considered bad style to cast pointer `{$expr_ty}` to integer `{$cast_ty}`
103
+
.suggestion = use `.addr()` to obtain the address of a pointer
104
+
.help = if you can't comply with strict provenance and need to expose the pointer provenance you can use `.expose_addr()` instead
105
+
72
106
hir_typeck_method_call_on_unknown_raw_pointee =
73
107
cannot call a method on a raw pointer with an unknown pointee type
74
108
@@ -113,8 +147,18 @@ hir_typeck_suggest_boxing_when_appropriate = store this in the heap by calling `
113
147
114
148
hir_typeck_suggest_ptr_null_mut = consider using `core::ptr::null_mut` instead
115
149
150
+
hir_typeck_trivial_cast = trivial {$numeric->
151
+
[true] numeric cast
152
+
*[false] cast
153
+
}: `{$expr_ty}` as `{$cast_ty}`
154
+
.help = cast can be replaced by coercion; this might require a temporary variable
155
+
116
156
hir_typeck_union_pat_dotdot = `..` cannot be used in union patterns
117
157
118
158
hir_typeck_union_pat_multiple_fields = union patterns should have exactly one field
159
+
160
+
hir_typeck_use_is_empty =
161
+
consider using the `is_empty` method on `{$expr_ty}` to determine if it contains anything
0 commit comments