File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -463,9 +463,9 @@ mod tests {
463
463
assert_not_impl_any ! ( WaylandWindowHandle : Send , Sync ) ;
464
464
assert_impl_all ! ( DrmWindowHandle : Send , Sync ) ;
465
465
assert_not_impl_any ! ( GbmWindowHandle : Send , Sync ) ;
466
- assert_impl_all ! ( Win32WindowHandle : Send , Sync ) ;
466
+ assert_not_impl_any ! ( Win32WindowHandle : Send , Sync ) ;
467
467
assert_not_impl_any ! ( WinRtWindowHandle : Send , Sync ) ;
468
- assert_impl_all ! ( WebWindowHandle : Send , Sync ) ;
468
+ assert_not_impl_any ! ( WebWindowHandle : Send , Sync ) ;
469
469
assert_not_impl_any ! ( WebCanvasWindowHandle : Send , Sync ) ;
470
470
assert_not_impl_any ! ( WebOffscreenCanvasWindowHandle : Send , Sync ) ;
471
471
assert_not_impl_any ! ( AndroidNdkWindowHandle : Send , Sync ) ;
Original file line number Diff line number Diff line change 1
1
use core:: ffi:: c_void;
2
+ use core:: marker:: PhantomData ;
2
3
use core:: ptr:: NonNull ;
3
4
4
5
/// Raw display handle for the Web.
@@ -33,6 +34,7 @@ pub struct WebWindowHandle {
33
34
///
34
35
/// [data attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*
35
36
pub id : u32 ,
37
+ _marker : PhantomData < * const ( ) > ,
36
38
}
37
39
38
40
impl WebWindowHandle {
@@ -48,7 +50,10 @@ impl WebWindowHandle {
48
50
/// let handle = WebWindowHandle::new(id);
49
51
/// ```
50
52
pub fn new ( id : u32 ) -> Self {
51
- Self { id }
53
+ Self {
54
+ id,
55
+ _marker : PhantomData ,
56
+ }
52
57
}
53
58
}
54
59
Original file line number Diff line number Diff line change 1
1
use core:: ffi:: c_void;
2
+ use core:: marker:: PhantomData ;
2
3
use core:: num:: NonZeroIsize ;
3
4
use core:: ptr:: NonNull ;
4
5
@@ -32,6 +33,7 @@ pub struct Win32WindowHandle {
32
33
pub hwnd : NonZeroIsize ,
33
34
/// The `GWLP_HINSTANCE` associated with this type's `HWND`.
34
35
pub hinstance : Option < NonZeroIsize > ,
36
+ _marker : PhantomData < * const ( ) > ,
35
37
}
36
38
37
39
impl Win32WindowHandle {
@@ -58,6 +60,7 @@ impl Win32WindowHandle {
58
60
Self {
59
61
hwnd,
60
62
hinstance : None ,
63
+ _marker : PhantomData ,
61
64
}
62
65
}
63
66
}
You can’t perform that action at this time.
0 commit comments