File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -463,9 +463,9 @@ mod tests {
463463 assert_not_impl_any ! ( WaylandWindowHandle : Send , Sync ) ;
464464 assert_impl_all ! ( DrmWindowHandle : Send , Sync ) ;
465465 assert_not_impl_any ! ( GbmWindowHandle : Send , Sync ) ;
466- assert_impl_all ! ( Win32WindowHandle : Send , Sync ) ;
466+ assert_not_impl_any ! ( Win32WindowHandle : Send , Sync ) ;
467467 assert_not_impl_any ! ( WinRtWindowHandle : Send , Sync ) ;
468- assert_impl_all ! ( WebWindowHandle : Send , Sync ) ;
468+ assert_not_impl_any ! ( WebWindowHandle : Send , Sync ) ;
469469 assert_not_impl_any ! ( WebCanvasWindowHandle : Send , Sync ) ;
470470 assert_not_impl_any ! ( WebOffscreenCanvasWindowHandle : Send , Sync ) ;
471471 assert_not_impl_any ! ( AndroidNdkWindowHandle : Send , Sync ) ;
Original file line number Diff line number Diff line change 11use core:: ffi:: c_void;
2+ use core:: marker:: PhantomData ;
23use core:: ptr:: NonNull ;
34
45use super :: DisplayHandle ;
@@ -55,6 +56,7 @@ pub struct WebWindowHandle {
5556 ///
5657 /// [data attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*
5758 pub id : u32 ,
59+ _marker : PhantomData < * const ( ) > ,
5860}
5961
6062impl WebWindowHandle {
@@ -70,7 +72,10 @@ impl WebWindowHandle {
7072 /// let handle = WebWindowHandle::new(id);
7173 /// ```
7274 pub fn new ( id : u32 ) -> Self {
73- Self { id }
75+ Self {
76+ id,
77+ _marker : PhantomData ,
78+ }
7479 }
7580}
7681
Original file line number Diff line number Diff line change 11use core:: ffi:: c_void;
2+ use core:: marker:: PhantomData ;
23use core:: num:: NonZeroIsize ;
34use core:: ptr:: NonNull ;
45
@@ -54,6 +55,7 @@ pub struct Win32WindowHandle {
5455 pub hwnd : NonZeroIsize ,
5556 /// The `GWLP_HINSTANCE` associated with this type's `HWND`.
5657 pub hinstance : Option < NonZeroIsize > ,
58+ _marker : PhantomData < * const ( ) > ,
5759}
5860
5961impl Win32WindowHandle {
@@ -80,6 +82,7 @@ impl Win32WindowHandle {
8082 Self {
8183 hwnd,
8284 hinstance : None ,
85+ _marker : PhantomData ,
8386 }
8487 }
8588}
You can’t perform that action at this time.
0 commit comments