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

Unused patch warnings when using -Zbuild-std with -Zbuild-std-features=compiler-builtins-mem #8963

Closed
phil-opp opened this issue Dec 10, 2020 · 3 comments
Labels
C-bug Category: bug

Comments

@phil-opp
Copy link
Contributor

Problem

There are multiple Patch [...] was not used in the crate graph warnings when building a project using -Zbuild-std and -Zbuild-std-features=compiler-builtins-mem on nightly:

Warning output

warning: Patch gimli v0.23.0 (/home/philipp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/vendor/gimli) was not used in the crate graph.
Patch object v0.22.0 (/home/philipp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/vendor/object) was not used in the crate graph.
Patch adler v0.2.3 (/home/philipp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/vendor/adler) was not used in the crate graph.
Patch addr2line v0.14.0 (/home/philipp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/vendor/addr2line) was not used in the crate graph.
Patch miniz_oxide v0.4.0 (/home/philipp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/vendor/miniz_oxide) was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run cargo update to use the new
version. This may also occur with an optional dependency that is not enabled.

Steps

  1. cargo new --lib example && cd example
  2. echo "#![no_std]" > src/lib.rs
  3. cargo +nightly check --target x86_64-unknown-linux-gnu -Z build-std=core -Zbuild-std-features=compiler-builtins-mem

(The actual target doesn't seem to matter, the build-std feature just requires that we pass a --target argument.)

Notes

These warnings appeared between d5556ae...2af662e. My guess is that #8834 introduced them. They still happen on the latest nightly.

Output of cargo version:

cargo 1.50.0-nightly (d274fcf 2020-12-07)
release: 1.50.0
commit-hash: d274fcf
commit-date: 2020-12-07

@alexcrichton
Copy link
Member

Ah yes this is indeed caused by #8834. There's some discussion on #8962 about the impact of that PR and how we may back it out.

bors added a commit that referenced this issue Dec 12, 2020
Revert recent build-std vendoring changes

This reverts #8834 to address #8962 and #8963

cc `@Gankra`
@clubby789
Copy link

Are there currently any workarounds for this?

@alexcrichton
Copy link
Member

Oh this was actually fixed in #8968, and now it's just updating the Cargo submodule in rust-lang/rust. In the meantime there are no workarounds.

JohnTitor added a commit to JohnTitor/rust that referenced this issue Dec 17, 2020
…k-Simulacrum

Revert rust-lang#78790 - rust-src vendoring

This reverts the rust-src vendor changes from rust-lang#78790. There were a few issues (see rust-lang#79218, rust-lang/cargo#8962, rust-lang/cargo#8963), that I don't think will get fixed in the next few days before the beta branch.

Fixes rust-lang#79218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants