File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
-
2
1
- Feature Name: ` unsafe_extern `
3
2
- Start Date: 2023-05-23
4
3
- RFC PR: [ rust-lang/rfcs #0000 ] ( https://github.com/rust-lang/rfcs/pull/0000 )
@@ -43,16 +42,16 @@ Code must update to `unsafe extern` style blocks if it wants to make `safe` decl
43
42
unsafe extern {
44
43
// sqrt (from libm) can be called with any `f64`
45
44
pub safe fn sqrt (x : f64 ) -> f64 ;
46
-
45
+
47
46
// strlen (from libc) requires a valid pointer,
48
47
// so we mark it as being an unsafe fn
49
48
pub unsafe fn strlen (p : * const c_char ) -> usize ;
50
49
51
50
// this function doesn't say safe or unsafe, so it defaults to unsafe
52
51
pub fn free (p : * mut core :: ffi :: c_void );
53
-
52
+
54
53
pub safe static IMPORTANT_BYTES : [u8 ; 256 ];
55
-
54
+
56
55
pub safe static LINES : SyncUnsafeCell <i32 >;
57
56
}
58
57
```
You can’t perform that action at this time.
0 commit comments