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
+3-1
Original file line number
Diff line number
Diff line change
@@ -209,7 +209,9 @@ lint_dangling_pointers_from_temporaries = a dangling pointer will be produced be
209
209
.label_ptr = this pointer will immediately be invalid
210
210
.label_temporary = this `{$ty}` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
211
211
.note = pointers do not have a lifetime; when calling `{$callee}` the `{$ty}` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned
212
-
.help = for more information, see <https://doc.rust-lang.org/reference/destructors.html>
212
+
.help_bind = you must make sure that the variable you bind the `{$ty}` to lives at least as long as the pointer returned by the call to `{$callee}`
213
+
.help_returned = in particular, if this pointer is returned from the current function, binding the `{$ty}` inside the function will not suffice
214
+
.help_visit = for more information, see <https://doc.rust-lang.org/reference/destructors.html>
213
215
214
216
lint_default_hash_types = prefer `{$preferred}` over `{$used}`, it has better performance
215
217
.note = a `use rustc_data_structures::fx::{$preferred}` may be necessary
0 commit comments