Skip to content

Commit 1f17936

Browse files
committed
update intrinsic const param counting
1 parent 5e7ce0b commit 1f17936

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

core/src/ffi/c_str.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,8 @@ impl CStr {
517517
const fn as_non_null_ptr(&self) -> NonNull<c_char> {
518518
// FIXME(effects) replace with `NonNull::from`
519519
// SAFETY: a reference is never null
520-
unsafe { NonNull::new_unchecked(&self.inner as *const [c_char] as *mut [c_char]) }.as_non_null_ptr()
520+
unsafe { NonNull::new_unchecked(&self.inner as *const [c_char] as *mut [c_char]) }
521+
.as_non_null_ptr()
521522
}
522523

523524
/// Returns the length of `self`. Like C's `strlen`, this does not include the nul terminator.

core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200
// Language features:
201201
// tidy-alphabetical-start
202202
#![cfg_attr(bootstrap, feature(c_unwind))]
203+
#![cfg_attr(bootstrap, feature(effects))]
203204
#![feature(abi_unadjusted)]
204205
#![feature(adt_const_params)]
205206
#![feature(allow_internal_unsafe)]

0 commit comments

Comments
 (0)