-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove some unused crate dependencies. #126063
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. This PR changes Stable MIR |
There's an argument to be made that we should add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make an MCP to change the lint to deny?
library/panic_unwind/Cargo.toml
Outdated
@@ -18,5 +18,5 @@ unwind = { path = "../unwind" } | |||
compiler_builtins = "0.1.0" | |||
cfg-if = "1.0" | |||
|
|||
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies] | |||
[target.'cfg(target_os = "emscripten")'.dependencies] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems weird?
library/sysroot/src/lib.rs
Outdated
@@ -1 +1,4 @@ | |||
// This is intentionally empty since this crate is only used to depend on other library crates. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
I think it could be enabled in in |
7c91a50
to
0b3c020
Compare
Something I didn't say is that when I enabled it universally I had to deal with several annoying cases, mostly in
These need So my conclusion is that this would be good to enable for almost every compiler crate (except the rust/compiler/rustc_lint_defs/src/builtin.rs Lines 533 to 539 in e1ac0fa
So I think changing it to |
I tried adding this to the top level [workspace.lints.rust]
unused_crate_dependencies = "warn" and it had no effect, even on a stage 2 build. I also tried without the |
When you add it to the workspace, you also have to enable lints inheritance in each member:
https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table |
☔ The latest upstream changes (presumably #126108) made this pull request unmergeable. Please resolve the merge conflicts. |
I found these by setting the `unused_crate_dependencies` lint temporarily to `Warn`.
0b3c020
to
29629d0
Compare
I rebased. |
@bors r+ As much as I am wary about landing one-off changes like this without also linting to prevent similar PRs in the future, sounds like there are real reasons we can't lint (at the moment at least). So, I'm fine to land this. |
(I would still recommend following up with linting for compiler crates if possible) |
…r=jackh726 Remove some unused crate dependencies. I found these by setting the `unused_crate_dependencies` lint temporarily to `Warn`. r? `@jackh726`
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#126036 (Migrate `run-make/short-ice` to `rmake`) - rust-lang#126063 (Remove some unused crate dependencies.) - rust-lang#126115 (Fix ICE due to `unwrap` in `probe_for_name_many`) - rust-lang#126159 (ScalarInt: size mismatches are a bug, do not delay the panic) - rust-lang#126184 (interpret: do not ICE on padded non-pow2 SIMD vectors) - rust-lang#126191 (Fix `NonZero` doctest inconsistencies) - rust-lang#126211 (migrate tests/run-make/llvm-outputs to use rmake.rs) - rust-lang#126212 (fix: build on haiku) - rust-lang#126215 (Add explanatory note to async block type mismatch error) - rust-lang#126223 (run-make: add `run_in_tmpdir` self-test) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#126063 (Remove some unused crate dependencies.) - rust-lang#126115 (Fix ICE due to `unwrap` in `probe_for_name_many`) - rust-lang#126159 (ScalarInt: size mismatches are a bug, do not delay the panic) - rust-lang#126184 (interpret: do not ICE on padded non-pow2 SIMD vectors) - rust-lang#126191 (Fix `NonZero` doctest inconsistencies) - rust-lang#126211 (migrate tests/run-make/llvm-outputs to use rmake.rs) - rust-lang#126212 (fix: build on haiku) - rust-lang#126215 (Add explanatory note to async block type mismatch error) - rust-lang#126223 (run-make: add `run_in_tmpdir` self-test) r? `@ghost` `@rustbot` modify labels: rollup
Would I have to make that change to the |
Rollup merge of rust-lang#126063 - nnethercote:rm-unused-crate-deps, r=jackh726 Remove some unused crate dependencies. I found these by setting the `unused_crate_dependencies` lint temporarily to `Warn`. r? ``@jackh726``
…eps, r=jackh726 Remove some unnecessary crate dependencies. A follow-up to rust-lang#126063. r? `@jackh726`
…eps, r=jackh726 Remove some unnecessary crate dependencies. A follow-up to rust-lang#126063. r? ``@jackh726``
Rollup merge of rust-lang#126368 - nnethercote:rm-more-unused-crate-deps, r=jackh726 Remove some unnecessary crate dependencies. A follow-up to rust-lang#126063. r? ``@jackh726``
I found these by setting the
unused_crate_dependencies
lint temporarily toWarn
.r? @jackh726