Fix up comments.

Wrap overly long ones, etc.
This commit is contained in:
Nicholas Nethercote 2024-05-07 14:12:37 +10:00
parent a6416d8907
commit 22ca74f2b0
10 changed files with 69 additions and 51 deletions

View file

@ -25,9 +25,9 @@ declare_lint! {
///
/// The inner pointer of a `CString` lives only as long as the `CString` it
/// points to. Getting the inner pointer of a *temporary* `CString` allows the `CString`
/// to be dropped at the end of the statement, as it is not being referenced as far as the typesystem
/// is concerned. This means outside of the statement the pointer will point to freed memory, which
/// causes undefined behavior if the pointer is later dereferenced.
/// to be dropped at the end of the statement, as it is not being referenced as far as the
/// typesystem is concerned. This means outside of the statement the pointer will point to
/// freed memory, which causes undefined behavior if the pointer is later dereferenced.
pub TEMPORARY_CSTRING_AS_PTR,
Warn,
"detects getting the inner pointer of a temporary `CString`"