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

examples: Import align_of() from mem to build on on MSRV < 1.80 #955

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

MarijnS95
Copy link
Collaborator

Fixes #954

In #931 we worked around "unnecessary import" warnings for the size_of(_val)() functions being added to the prelude in Rust 1.80 while maintaining some form of MSRV back-compatibility (despite not testing the examples against this), but forgot about align_of(). This means the examples still build on Rust 1.80 or higher because align_of() is always in scope via the prelude there, but not on older compilers. Fix this by adding it to the import that's tagged to be removed when we bump all of ash to MSRV 1.80.

In #931 we worked around "unnecessary import" warnings for the
`size_of(_val)()` functions being added to the prelude in Rust 1.80
while maintaining some form of MSRV back-compatibility (despite not
testing the examples against this), but forgot about `align_of()`.
This means the examples still build on Rust 1.80 or higher because
`align_of()` is always in scope via the prelude there, but not on older
compilers.  Fix this by adding it to the import that's tagged to be
removed when we bump all of `ash` to MSRV 1.80.
@MarijnS95 MarijnS95 merged commit bbd8288 into master Oct 16, 2024
20 checks passed
@MarijnS95 MarijnS95 deleted the examples-import-align-of-explicitly branch October 16, 2024 06:52
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.

examples: Error[E0425]: cannot find function align_of in this scope
2 participants