Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old version of raw_window_handle causes an error #3007

Closed
lylythechosenone opened this issue Sep 1, 2022 · 1 comment
Closed

Old version of raw_window_handle causes an error #3007

lylythechosenone opened this issue Sep 1, 2022 · 1 comment

Comments

@lylythechosenone
Copy link
Contributor

Description
Wgpu is still using raw_window_handle ^0.4 when 0.5.0 is now released. This means that users including raw_window_handle 0.5.0 will recieve the error

error[E0277]: the trait bound `T: raw_window_handle::HasRawWindowHandle` is not satisfied
    --> src/rendering/two_d/camera.rs:15:56
     |
15   |         let surface = unsafe { instance.create_surface(window) };
     |                                         -------------- ^^^^^^ the trait `raw_window_handle::HasRawWindowHandle` is not implemented for `T`
     |                                         |
     |                                         required by a bound introduced by this call
     |
note: required by a bound in `wgpu::Instance::create_surface`
    --> /home/lysan/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.13.1/src/lib.rs:1757:37
     |
1757 |     pub unsafe fn create_surface<W: raw_window_handle::HasRawWindowHandle>(
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `wgpu::Instance::create_surface`
help: consider further restricting this bound
     |
13   |     pub async fn new<T: HasRawWindowHandle + raw_window_handle::HasRawWindowHandle>(window: &T, size: Vector2<u32>) -> Self {
     |                                            +++++++++++++++++++++++++++++++++++++++

due to the differing versions.

Repro steps
Try to create a surface with T which implements 0.5.0 HasRawWindowHandle, instead of ^0.4 HasRawWindowHandle.

Expected vs observed behavior
If the version was updated, it should just work, but right now, this error is observed.

@cwfitzgerald
Copy link
Member

Fixed in #2918, will be released in 0.14 late this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants