File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,21 @@ pub struct AutoreleasePool {
21
21
context : * mut c_void ,
22
22
}
23
23
24
+ /// ```rust,compile_fail
25
+ /// use objc::rc::AutoreleasePool;
26
+ /// fn needs_sync<T: Send>() {}
27
+ /// needs_sync::<AutoreleasePool>();
28
+ /// ```
29
+ /// ```rust,compile_fail
30
+ /// use objc::rc::AutoreleasePool;
31
+ /// fn needs_send<T: Send>() {}
32
+ /// needs_send::<AutoreleasePool>();
33
+ /// ```
34
+ #[ cfg( doctest) ]
35
+ pub struct AutoreleasePoolNotSendNorSync ;
36
+
24
37
impl AutoreleasePool {
25
- /// Construct a new autoreleasepool .
38
+ /// Construct a new autorelease pool .
26
39
///
27
40
/// Use the [`autoreleasepool`] block for a safe alternative.
28
41
///
@@ -36,7 +49,7 @@ impl AutoreleasePool {
36
49
#[ doc( alias = "objc_autoreleasePoolPush" ) ]
37
50
unsafe fn new ( ) -> Self {
38
51
// TODO: Make this function pub when we're more certain of the API
39
- AutoreleasePool {
52
+ Self {
40
53
context : objc_autoreleasePoolPush ( ) ,
41
54
}
42
55
}
You can’t perform that action at this time.
0 commit comments