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 something_went_wrong compile error on SPIR-V #125

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

pali6
Copy link
Contributor

@pali6 pali6 commented Aug 11, 2022

The Display trait is conditionally removed from the error types on the SPIR-V architecture, yet something_went_wrong still has the trait bound. This results in the crate failing to compile for SPIR-V targets.

This PR conditionally disables the trait bound on the function on SPIR-V to fix this issue.

Removed Display trait bound on the SPIR-V architecture.
@Lokathor
Copy link
Owner

I'm immediately wondering why this is generic over Debug, don't we always call it with an error value from this very crate anyway? Can't we just make that the type it accepts?

But in the mean time yeah this seems good.

@pali6
Copy link
Contributor Author

pali6 commented Aug 11, 2022

According to the errors I got when compiling a shader it seems that it's only ever called with CheckedCastError and PodCastError. So there'd probably need to be some new trait for the two errors.

@Lokathor Lokathor merged commit bbd6a92 into Lokathor:main Aug 11, 2022
@pali6 pali6 deleted the patch-1 branch August 11, 2022 18:12
leod pushed a commit to leod/bytemuck that referenced this pull request Jun 3, 2023
Removed Display trait bound on the SPIR-V architecture.
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.

None yet

2 participants