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

Fix future object safety of BufferAccess #966

Merged
merged 1 commit into from
Jun 5, 2018
Merged

Fix future object safety of BufferAccess #966

merged 1 commit into from
Jun 5, 2018

Conversation

leoyvens
Copy link
Contributor

It was recently discovered in rust-lang/rust#50781 that Self: Trait bounds in trait methods are not really object-safe. This will be made into a warning by rust-lang/rust#50966, and vulkano will be affected by the warning.

There is no actual unsafety in the affected code in vulkano, making this unsafe would require some weird impls in vulkano itself.

The fix looks simple, to move fn len from BufferAccess to being directly in TypedBufferAccess.

It was recently discovered in rust-lang/rust#50781 that `Self: Trait` bounds in trait methods are really not object-safe. This will be made into a warning by rust-lang/rust#50966, and vulkano will be affected by the warning .

Thankfully the fix looks simple, by just moving `fn len` from `BufferAccess` to being directly in `TypedBufferAccess`.
@tomaka tomaka merged commit 5ddcce2 into vulkano-rs:master Jun 5, 2018
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

Successfully merging this pull request may close these issues.

2 participants