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_lint/messages.ftl
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -193,11 +193,11 @@ lint_confusable_identifier_pair = found both `{$existing_sym}` and `{$sym}` as i
193
193
.current_use = this identifier can be confused with `{$existing_sym}`
194
194
.other_use = other identifier used here
195
195
196
-
lint_dangling_pointers_from_locals = a dangling pointer will be produced because the local variable `{$local_var_name}` will be dropped
197
-
.ret_ty = return type of the {$fn_kind}is `{$ret_ty}`
198
-
.local_var = `{$local_var_name}` is part the {$fn_kind} and will be dropped at the end of the {$fn_kind}
196
+
lint_dangling_pointers_from_locals = {$fn_kind} returns a dangling pointer to dropped local variable `{$local_var_name}`
197
+
.ret_ty = return type is `{$ret_ty}`
198
+
.local_var = local variable `{$local_var_name}` is dropped at the end of the {$fn_kind}
199
199
.created_at = dangling pointer created here
200
-
.note = pointers do not have a lifetime; after returning, the `{$local_var_ty}` will be deallocated at the end of the {$fn_kind} because nothing is referencing it as far as the type system is concerned
200
+
.note = a dangling pointer is safe, but dereferencing one is undefined behavior
201
201
202
202
lint_dangling_pointers_from_temporaries = a dangling pointer will be produced because the temporary `{$ty}` will be dropped
203
203
.label_ptr = this pointer will immediately be invalid
0 commit comments