Skip to content

Commit

Permalink
update intrinsic const param counting
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Jun 21, 2024
1 parent 5e7ce0b commit 1f17936
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,8 @@ impl CStr {
const fn as_non_null_ptr(&self) -> NonNull<c_char> {
// FIXME(effects) replace with `NonNull::from`
// SAFETY: a reference is never null
unsafe { NonNull::new_unchecked(&self.inner as *const [c_char] as *mut [c_char]) }.as_non_null_ptr()
unsafe { NonNull::new_unchecked(&self.inner as *const [c_char] as *mut [c_char]) }
.as_non_null_ptr()
}

/// Returns the length of `self`. Like C's `strlen`, this does not include the nul terminator.
Expand Down
1 change: 1 addition & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
// Language features:
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(c_unwind))]
#![cfg_attr(bootstrap, feature(effects))]
#![feature(abi_unadjusted)]
#![feature(adt_const_params)]
#![feature(allow_internal_unsafe)]
Expand Down

0 comments on commit 1f17936

Please sign in to comment.