Rollup merge of #47807 - tbu-:pr_doc_constanttime_cstr, r=steveklabnik
Make wording around 0-cost casts more precise
This commit is contained in:
commit
e8688b4a24
@ -1026,9 +1026,9 @@ impl CStr {
|
||||
/// The returned slice will **not** contain the trailing nul terminator that this C
|
||||
/// string has.
|
||||
///
|
||||
/// > **Note**: This method is currently implemented as a 0-cost cast, but
|
||||
/// > it is planned to alter its definition in the future to perform the
|
||||
/// > length calculation whenever this method is called.
|
||||
/// > **Note**: This method is currently implemented as a constant-time
|
||||
/// > cast, but it is planned to alter its definition in the future to
|
||||
/// > perform the length calculation whenever this method is called.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1077,9 +1077,9 @@ impl CStr {
|
||||
/// it will return an error with details of where UTF-8 validation failed.
|
||||
///
|
||||
/// > **Note**: This method is currently implemented to check for validity
|
||||
/// > after a 0-cost cast, but it is planned to alter its definition in the
|
||||
/// > future to perform the length calculation in addition to the UTF-8
|
||||
/// > check whenever this method is called.
|
||||
/// > after a constant-time cast, but it is planned to alter its definition
|
||||
/// > in the future to perform the length calculation in addition to the
|
||||
/// > UTF-8 check whenever this method is called.
|
||||
///
|
||||
/// [`&str`]: ../primitive.str.html
|
||||
///
|
||||
@ -1110,9 +1110,9 @@ impl CStr {
|
||||
/// with the result.
|
||||
///
|
||||
/// > **Note**: This method is currently implemented to check for validity
|
||||
/// > after a 0-cost cast, but it is planned to alter its definition in the
|
||||
/// > future to perform the length calculation in addition to the UTF-8
|
||||
/// > check whenever this method is called.
|
||||
/// > after a constant-time cast, but it is planned to alter its definition
|
||||
/// > in the future to perform the length calculation in addition to the
|
||||
/// > UTF-8 check whenever this method is called.
|
||||
///
|
||||
/// [`Cow`]: ../borrow/enum.Cow.html
|
||||
/// [`Borrowed`]: ../borrow/enum.Cow.html#variant.Borrowed
|
||||
|
Loading…
x
Reference in New Issue
Block a user