-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix the import path for size_of and align_of #4737
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
Conversation
We have seen an error failing to resolve this import directive. Fix the path to import from the core crate.
What is the error you are seeing? We import |
We saw this error on a Windows environment:
|
Do you have the rustc invocation that caused that and some more toolchain info? I'm not able to reproduce, of course, and I don't really understand where the error would be coming from. Libc isn't getting built with an old edition or something, is it? |
I think the rustc version is 1.88.0 but I couldn't find the exact command used for the build. The context is that the error happened to one of the components of (the internal version of) Android's AOSP project when I updated the libc crate version used for Android build (internal version of https://cs.android.com/android/platform/superproject/main/+/main:external/rust/android-crates-io/) from 0.2.172 to 0.2.175. I'm so sorry but I'm not a developer of the component failed to build and I have no idea how the component is built. And unfortunately I don't have a minimal reproducible case of the failure. |
Sorry for the delay, just got a chance to circle back here. I think the problem is indeed that you are somehow building with the old edition. If I invoke rustc directly with
Which seems to be what you have plus a few fmt-related errors (I assume you may be testing before a6e7563). Adding the The edition is configured to 2021 here, which gets set automatically if you build with Cargo. So my guess is that the build system you're using is just missing this step, and it happened to work until now. As this is Android-related, @maurer may know some more |
I'm going to close this since I don't think there is any action we can take on our side. Things should work for you again once the build system starts passing an edition to rustc, which it's probably already doing for most other crates anyway. |
Description
This change fixes to import
size_of
andalign_of
from the core crate.We have seen an error failing to resolve this import directive.
Sources
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated