File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,8 @@ use core::task::{Context, Poll};
33
33
/// assert_sync(State {
34
34
/// future: async {
35
35
/// let cell = Cell::new(1);
36
- /// let cell_ref = &cell;
37
36
/// other().await;
38
- /// let value = cell_ref .get();
37
+ /// let value = cell .get();
39
38
/// }
40
39
/// });
41
40
/// ```
@@ -55,10 +54,9 @@ use core::task::{Context, Poll};
55
54
///
56
55
/// assert_sync(State {
57
56
/// future: Exclusive::new(async {
58
- /// let cell = Cell::new(1);
59
- /// let cell_ref = &cell;
57
+ /// let mut cell = Cell::new(1);
60
58
/// other().await;
61
- /// let value = cell_ref .get();
59
+ /// let value = cell .get();
62
60
/// })
63
61
/// });
64
62
/// ```
@@ -87,7 +85,7 @@ pub struct Exclusive<T: ?Sized> {
87
85
88
86
// See `Exclusive`'s docs for justification.
89
87
#[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
90
- unsafe impl < T : ?Sized > Sync for Exclusive < T > { }
88
+ unsafe impl < T : ?Sized + Send > Sync for Exclusive < T > { }
91
89
92
90
#[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
93
91
impl < T : ?Sized > fmt:: Debug for Exclusive < T > {
You can’t perform that action at this time.
0 commit comments