File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change 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) ]
You can’t perform that action at this time.
0 commit comments