diff --git a/debian/config.toml.in b/debian/config.toml.in index 2651d7a6ea..e51580c8d2 100644 --- a/debian/config.toml.in +++ b/debian/config.toml.in @@ -19,6 +19,9 @@ target = ["DEB_TARGET_RUST_TYPE"] # we do it this way to avoid spurious rebuilds docs = false +extended = true +tools = ["clippy"] + [install] prefix = "/usr" diff --git a/debian/copyright b/debian/copyright index 258f4c4dcf..d017d65293 100644 --- a/debian/copyright +++ b/debian/copyright @@ -22,13 +22,14 @@ Files-Excluded: # cargo's own test suite (in its own package) also called cargotest. # NB: don't exclude rust-installer, it's needed for "install" functionality src/tools/cargo - src/tools/clippy src/tools/rls src/tools/remote-test-client src/tools/remote-test-server src/tools/rust-analyzer src/tools/rustfmt src/tools/miri +# Embedded GH pages + src/tools/clippy/util/gh-pages # Embedded C libraries vendor/libz-sys/src/zlib* vendor/lzma-sys*/xz-* @@ -60,7 +61,6 @@ Files-Excluded: vendor/bytes vendor/bytesize vendor/camino - vendor/cargo_metadata-0.12.0 vendor/cargo_metadata-0.8.2 vendor/cargo_metadata vendor/cargo-platform @@ -73,7 +73,6 @@ Files-Excluded: vendor/commoncrypto vendor/commoncrypto-sys vendor/compiletest_rs-0.5.0 - vendor/compiletest_rs vendor/constant_time_eq vendor/const_fn vendor/core-foundation @@ -97,12 +96,9 @@ Files-Excluded: vendor/curl-sys vendor/dashmap vendor/derive_more - vendor/derive-new vendor/directories vendor/dirs - vendor/dirs-next vendor/dirs-sys - vendor/dirs-sys-next vendor/drop_bomb vendor/either-1.6.0 vendor/env_logger-0.6.2 @@ -134,7 +130,6 @@ Files-Excluded: vendor/futures-util vendor/fwdansi vendor/gcc - vendor/getrandom vendor/git2 vendor/git2-curl vendor/heck-0.3.1 @@ -144,7 +139,6 @@ Files-Excluded: vendor/humantime vendor/idna-0.1.5 vendor/idna-0.2.0 - vendor/if_chain vendor/im-rc vendor/indexmap-1.6.0 vendor/indexmap-1.6.1 @@ -222,7 +216,6 @@ Files-Excluded: vendor/proc-macro-hack vendor/proc-macro-nested vendor/pulldown-cmark-to-cmark - vendor/quine-mc_cluskey vendor/quote-1.0.7 vendor/racer vendor/rand @@ -233,7 +226,6 @@ Files-Excluded: vendor/rayon-1.3.1 vendor/rayon-core-1.7.1 vendor/redox_users-0.3.4 - vendor/redox_users vendor/regalloc vendor/region vendor/rls-analysis @@ -261,18 +253,13 @@ Files-Excluded: vendor/rustc-ap-rustc_session vendor/rustc-ap-rustc_span vendor/rustc-ap-rustc_target - vendor/rustc-semver - vendor/rustc_tools_util vendor/rustc_version - vendor/rustversion vendor/salsa vendor/salsa-macros vendor/schannel vendor/security-framework vendor/security-framework-sys vendor/semver-0.9.0 - vendor/semver - vendor/semver-parser vendor/serde-1.0.118 vendor/serde_derive-1.0.118 vendor/serde_ignored @@ -295,10 +282,8 @@ Files-Excluded: vendor/syn-1.0.60 vendor/target-lexicon vendor/term-0.6.1 - vendor/term vendor/termcolor-1.1.0 vendor/tester-0.7.0 - vendor/tester vendor/text-size vendor/thiserror-1.0.20 vendor/thiserror diff --git a/debian/patches/d-0000-ignore-removed-submodules.patch b/debian/patches/d-0000-ignore-removed-submodules.patch index ffabf7fda2..1ae44f6625 100644 --- a/debian/patches/d-0000-ignore-removed-submodules.patch +++ b/debian/patches/d-0000-ignore-removed-submodules.patch @@ -6,15 +6,7 @@ Index: rustc.git/Cargo.toml =================================================================== --- rustc.git.orig/Cargo.toml +++ rustc.git/Cargo.toml -@@ -6,7 +6,6 @@ members = [ - "library/test", - "src/rustdoc-json-types", - "src/tools/cargotest", -- "src/tools/clippy", - "src/tools/compiletest", - "src/tools/error_index_generator", - "src/tools/linkchecker", -@@ -15,23 +14,11 @@ members = [ +@@ -16,23 +16,11 @@ members = [ "src/tools/tidy", "src/tools/tier-check", "src/tools/build-manifest", @@ -38,7 +30,7 @@ Index: rustc.git/Cargo.toml ] exclude = [ -@@ -69,24 +60,8 @@ gimli.debug = 0 +@@ -81,24 +69,8 @@ gimli.debug = 0 miniz_oxide.debug = 0 object.debug = 0 @@ -63,12 +55,6 @@ Index: rustc.git/Cargo.toml # See comments in `library/rustc-std-workspace-core/README.md` for what's going on # here -@@ -100,5 +75,3 @@ rustc-std-workspace-std = { path = 'libr - rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' } - rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' } - --[patch."https://github.com/rust-lang/rust-clippy"] --clippy_lints = { path = "src/tools/clippy/clippy_lints" } Index: rustc.git/src/bootstrap/bootstrap.py =================================================================== --- rustc.git.orig/src/bootstrap/bootstrap.py @@ -163,3 +149,41 @@ Index: rustc.git/src/tools/tidy/src/deps.rs ]; for &name in FORBIDDEN_TO_HAVE_DUPLICATES { +Index: rustc.git/src/bootstrap/tool.rs +=================================================================== +--- rustc.git.orig/src/bootstrap/tool.rs ++++ rustc.git/src/bootstrap/tool.rs +@@ -545,7 +545,16 @@ impl Step for Cargo { + + fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { + let builder = run.builder; +- run.path("src/tools/cargo").default_condition(builder.config.extended) ++ run.path("src/tools/cargo").default_condition( ++ builder.config.extended ++ && builder.config.tools.as_ref().map_or( ++ true, ++ // If `tools` is set, search list for this tool. ++ |tools| { ++ tools.iter().any(|tool| tool == "cargo") ++ } ++ ) ++ ) + } + + fn make_run(run: RunConfig<'_>) { +Index: rustc.git/src/tools/clippy/Cargo.toml +=================================================================== +--- rustc.git.orig/src/tools/clippy/Cargo.toml ++++ rustc.git/src/tools/clippy/Cargo.toml +@@ -46,11 +46,6 @@ clippy-mini-macro-test = { version = "0. + derive-new = "0.5" + regex = "1.4" + +-# A noop dependency that changes in the Rust repository, it's a bit of a hack. +-# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` +-# for more information. +-rustc-workspace-hack = "1.0.0" +- + [build-dependencies] + rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" } + diff --git a/debian/upstream-tarball-unsuspicious.txt b/debian/upstream-tarball-unsuspicious.txt index cdda2f4ce0..6a93f4374e 100644 --- a/debian/upstream-tarball-unsuspicious.txt +++ b/debian/upstream-tarball-unsuspicious.txt @@ -122,6 +122,7 @@ library/stdarch/crates/core_arch/foo.wasm src/doc/rustc-dev-guide/src/queries/example-0.counts.txt src/test/run-make-fulldeps/target-specs/*.json src/test/run-make-fulldeps/libtest-json/output.json +src/tools/clippy/.remarkrc vendor/clap/.mention-bot vendor/cloudabi/cloudabi.rs vendor/elasticlunr-rs/src/lang/*.rs @@ -209,6 +210,8 @@ src/test/rustdoc-json/*.expected src/test/ui/macros/not-utf8.bin src/test/ui/terminal-width/non-whitespace-trimming*.rs src/tools/*/tests/*/*.stderr +src/tools/clippy/tests/ui-toml/*/*.stderr +src/tools/clippy/tests/ui/wildcard_enum_match_arm.fixed vendor/bstr/src/unicode/data/*Test.txt vendor/cargo_metadata*/tests/test_samples.rs vendor/cssparser/src/css-parsing-tests/*.json @@ -259,7 +262,7 @@ vendor/sha2/tests/data/*.blb vendor/sha2/tests/data/*.bin vendor/snap/data/* vendor/tar/tests/archives/*.tar -vendor/term-0*/tests/data/* +vendor/term/tests/data/* vendor/toml/tests/*/*.toml vendor/toml/tests/*/*.json vendor/unicode-segmentation/src/testdata.rs