Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f1518b

Browse files
committed
Add instability attribute on private const_strlen function
A `rustc_const_stable` attribute by itself has nonintuitive purpose whenplaced in a public module.Separately, it would probably be okay to rename `const_strlen` to just`strlen` to make it more clear this is our general-purposeimplementation of strlen now, not something specifically for const(avoiding confusion like in PR 127444).
1 parent53d3e62 commit7f1518b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎library/core/src/ffi/c_str.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ impl AsRef<CStr> for CStr {
740740
/// The pointer must point to a valid buffer that contains a NUL terminator. The NUL must be
741741
/// located within `isize::MAX` from `ptr`.
742742
#[inline]
743+
#[unstable(feature ="cstr_internals", issue ="none")]
743744
#[rustc_const_stable(feature ="const_cstr_from_ptr", since ="CURRENT_RUSTC_VERSION")]
744745
#[rustc_allow_const_fn_unstable(const_eval_select)]
745746
constunsafefnconst_strlen(ptr:*constc_char) ->usize{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp