Skip to content

Commit

Permalink
Update compiler/rustc_lint/messages.ftl
Browse files Browse the repository at this point in the history
Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
  • Loading branch information
Anthony-Eid and Urgau committed Dec 5, 2024
1 parent 6d95b5b commit bab8a41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/rustc_lint/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,10 @@ lint_dangling_pointers_from_temporaries = a dangling pointer will be produced be
.label_ptr = this pointer will immediately be invalid
.label_temporary = this `{$ty}` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
.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
.help_info = you must make sure that the variable you bind the `{$typ}` to lives at least as long as the pointer returned by the call to `{$callee}`
.help_info = in particular, if this pointer is returned from the current function, binding the `{$typ}` inside the function will not suffice
.help_bind = you must make sure that the variable you bind the `{$typ}` to lives at least as long as the pointer returned by the call to `{$callee}`
.help_returned = in particular, if this pointer is returned from the current function, binding the `{$typ}` inside the function will not suffice
.help_visit = for more information, see <https://doc.rust-lang.org/reference/destructors.html>
lint_default_hash_types = prefer `{$preferred}` over `{$used}`, it has better performance
.note = a `use rustc_data_structures::fx::{$preferred}` may be necessary
Expand Down

0 comments on commit bab8a41

Please sign in to comment.