diff options
| author | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-10-16 22:19:56 +0300 |
|---|---|---|
| committer | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-10-28 14:16:05 +0300 |
| commit | c69894eaec2a29f9db023cbfff63e48266de4ee5 (patch) | |
| tree | 503a18333c8b8f4a1d968c28154f4c3942df67db /compiler/rustc_lint/messages.ftl | |
| parent | 81d6652e741f091f4ee0b7a660120d204e0417b8 (diff) | |
| download | rust-c69894eaec2a29f9db023cbfff63e48266de4ee5.tar.gz rust-c69894eaec2a29f9db023cbfff63e48266de4ee5.zip | |
New lint: `dangling_pointers_from_temporaries`
Diffstat (limited to 'compiler/rustc_lint/messages.ftl')
| -rw-r--r-- | compiler/rustc_lint/messages.ftl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_lint/messages.ftl b/compiler/rustc_lint/messages.ftl index c4d709aa1f9..3fa43296dfc 100644 --- a/compiler/rustc_lint/messages.ftl +++ b/compiler/rustc_lint/messages.ftl @@ -203,14 +203,14 @@ lint_confusable_identifier_pair = found both `{$existing_sym}` and `{$sym}` as i .current_use = this identifier can be confused with `{$existing_sym}` .other_use = other identifier used here -lint_cstring_ptr = getting the inner pointer of a temporary `CString` - .as_ptr_label = this pointer will be invalid - .unwrap_label = this `CString` 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 `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned - .help = for more information, see https://doc.rust-lang.org/reference/destructors.html - lint_custom_inner_attribute_unstable = custom inner attributes are unstable +lint_dangling_pointers_from_temporaries = a dangling pointer will be produced because the temporary `{$ty}` will be dropped + .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 = 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 |
