diff --git a/core/src/ffi/c_str.rs b/core/src/ffi/c_str.rs index fbc0c7232c4e5..d2a408485d162 100644 --- a/core/src/ffi/c_str.rs +++ b/core/src/ffi/c_str.rs @@ -517,7 +517,8 @@ impl CStr { const fn as_non_null_ptr(&self) -> NonNull { // 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. diff --git a/core/src/lib.rs b/core/src/lib.rs index 51452e3b7b02f..2d0b8825f433b 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -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)]