Skip to content

Commit 44ec67f

Browse files
authoredMar 10, 2025
Rollup merge of #138306 - jieyouxu:revert-workspace-lints, r=Noratrieb
Revert "Use workspace lints for crates in `compiler/` #138084" Revert <#138084> to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). The problem is that the `rustc-src` component doesn't include the root `Cargo.toml` manifest. This breakage was reported in #138304. This reverts commit 48caf81, reversing changes made to c666287. cc `@RalfJung` r? `@nnethercote` (sorry, I didn't consider this being a thing 💀)
2 parents 2abecee + 063ef18 commit 44ec67f

File tree

144 files changed

+90
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+90
-252
lines changed
 

‎Cargo.toml

-14
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,6 @@ exclude = [
6363
"src/tools/x",
6464
]
6565

66-
# These lints are applied to many crates in the workspace. In practice, this is
67-
# all crates under `compiler/`.
68-
#
69-
# NOTE: rustc-specific lints (e.g. `rustc::internal`) aren't supported by
70-
# Cargo. (Support for them is possibly blocked by #44690 (attributes for
71-
# tools).) Those lints are instead specified for `compiler/` crates in
72-
# `src/bootstrap/src/core/builder/cargo.rs`.
73-
[workspace.lints.rust]
74-
# FIXME(edition_2024): Change this to `-Wrust_2024_idioms` when all of the
75-
# individual lints are satisfied.
76-
keyword_idents_2024 = "warn"
77-
unreachable_pub = "warn"
78-
unsafe_op_in_unsafe_fn = "warn"
79-
8066
[profile.release.package.rustc-rayon-core]
8167
# The rustc fork of Rayon has deadlock detection code which intermittently
8268
# causes overflows in the CI (see https://github.com/rust-lang/rust/issues/90227)

‎compiler/rustc/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,3 @@ llvm = ['rustc_driver_impl/llvm']
3232
max_level_info = ['rustc_driver_impl/max_level_info']
3333
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']
3434
# tidy-alphabetical-end
35-
36-
[lints]
37-
workspace = true

0 commit comments

Comments
 (0)