about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-09Auto merge of #131421 - weihanglo:update-cargo, r=weihanglobors-0/+3
Update cargo 8 commits in ad074abe3a18ce8444c06f962ceecfd056acfc73..15fbd2f607d4defc87053b8b76bf5038f2483cf4 2024-10-04 18:18:15 +0000 to 2024-10-08 21:08:11 +0000 - initial version of checksum based freshness (rust-lang/cargo#14137) - feat: Add custom completer for completing registry name (rust-lang/cargo#14656) - Document build-plan as being deprecated (rust-lang/cargo#14657) - fix(complete): Don't complete files for any value (rust-lang/cargo#14653) - Add more SAT resolver tests (rust-lang/cargo#14614) - fix: avoid inserting duplicate `dylib_path_envvar` when calling `cargo run` recursively (rust-lang/cargo#14464) - chore(deps): bump gix-path from 0.10.9 to 0.10.11 (rust-lang/cargo#14489) - improve error reporting when feature not found in `activated_features` (rust-lang/cargo#14647) --- This also adds three license exceptions to Cargo. * arrayref — BSD-2-Clause * blake3 — CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception * constant_time_eq — CC0-1.0 OR MIT-0 OR Apache-2.0 These exceptions were added to rustc in rust-lang/rust#126930, so should be fine for Cargo as well.
2024-10-08Update cargoWeihang Lo-0/+3
This also adds three license exceptions to Cargo. * arrayref — BSD-2-Clause * blake3 — CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception * constant_time_eq — CC0-1.0 OR MIT-0 OR Apache-2.0 These exceptions were added to rustc in rust-lang/rust#126930, so should be fine for Cargo as well.
2024-10-08Auto merge of #131155 - jieyouxu:always-kill, r=onur-ozkanbors-6/+113
Prevent building cargo from invalidating build cache of other tools due to conditionally applied `-Zon-broken-pipe=kill` via tracked `RUSTFLAGS` This PR fixes #130980 where building cargo invalidated the tool build caches of other tools (such as rustdoc) because `-Zon-broken-pipe=kill` was conditionally passed via `RUSTFLAGS` for other tools *except* for cargo. The differing `RUSTFLAGS` triggered tool build cache invalidation as `RUSTFLAGS` is a tracked env var -- any changes in `RUSTFLAGS` requires a rebuild. `-Zon-broken-pipe=kill` is load-bearing for rustc and rustdoc to not ICE on broken pipes due to usages of raw std `println!` that panics without the flag being set, which manifests in ICEs. I can't say I like the changes here, but it is what it is... See detailed discussions and history of `-Zon-broken-pipe=kill` usage in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F/near/474593815. ## Approach This PR fixes the tool build cache invalidation by informing the `rustc` binary shim when to apply `-Zon-broken-pipe=kill` (i.e. when the rustc binary shim is not used to build cargo). This information is not communicated by `RUSTFLAGS`, which is an env var tracked by cargo, and instead uses an untracked env var `UNTRACKED_BROKEN_PIPE_FLAG` so we won't trigger tool build cache invalidation. We preserve bootstrap's behavior of not setting that flag for cargo by conditionally omitting setting `UNTRACKED_BROKEN_PIPE_FLAG` when building cargo. Notably, the `-Zon-broken-pipe=kill` instance in https://github.com/rust-lang/rust/blob/1e5719bdc40bb553089ce83525f07dfe0b2e71e9/src/bootstrap/src/core/build_steps/compile.rs#L1058 is not modified because that is used to build rustc only and not cargo itself. Thanks to `@cuviper` for the idea! ## Testing ### Integration testing This PR introduces a run-make test for rustc and rustdoc that checks that when they do not ICE/panic when they encounter a broken pipe of the stdout stream. I checked this test will catch the broken pipe ICE regression for rustc on Linux (at least) by commenting out https://github.com/rust-lang/rust/blob/1e5719bdc40bb553089ce83525f07dfe0b2e71e9/src/bootstrap/src/core/build_steps/compile.rs#L1058, and the test failed because rustc ICE'd. ### Manual testing I have manually tried: 1. `./x clean && `./x test build --stage 1` -> `rustc +stage1 --print=sysroot | false`: no ICE. 2. `./x clean` -> `./x test run-make` twice: no stage 1 cargo rebuilds. 3. `./x clean` -> `./x build rustdoc` -> `rustdoc +stage1 --version | false`: no panics. 4. `./x test src/tools/cargo`: tests pass, notably `build::close_output` and `cargo_command::closed_output_ok` do not fail which would fail if cargo was built with `-Zon-broken-pipe=kill`. ## Related discussions Thanks to everyone who helped! - https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Applying.20.60-Zon-broken-pipe.3Dkill.60.20flags.20in.20bootstrap.3F - https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Modifying.20run-make.20tests.20unnecessarily.20rebuild.20stage.201.20.2E.2E.2E - https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F Fixes https://github.com/rust-lang/rust/issues/130980 Closes https://github.com/rust-lang/rust/issues/131059 --- try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-mingw
2024-10-08Auto merge of #131412 - matthiaskrgr:rollup-478o6h6, r=matthiaskrgrbors-29/+22
Rollup of 3 pull requests Successful merges: - #131378 (CI: rfl: move job forward to Linux v6.12-rc2) - #131400 (Simplify the compiletest directives for ignoring coverage-test modes) - #131408 (Remove unneeded argument of `LinkCollector::verify_disambiguator`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-08Rollup merge of #131408 - GuillaumeGomez:more-intra-doc-cleanup, r=notriddleMatthias Krüger-4/+2
Remove unneeded argument of `LinkCollector::verify_disambiguator` Still working on https://github.com/rust-lang/rust/pull/130278. ^^' r? `@notriddle`
2024-10-08Rollup merge of #131400 - Zalathar:ignore-coverage, r=jieyouxuMatthias Krüger-24/+19
Simplify the compiletest directives for ignoring coverage-test modes Follow-up to #131346. Given that these directives are now restricted to ignoring coverage-test modes only, we can drop the clunky `ignore-mode-*` naming convention, and just call them `ignore-coverage-map` and `ignore-coverage-run`. r? jieyouxu
2024-10-08Rollup merge of #131378 - ojeda:ci-rfl, r=lqdMatthias Krüger-1/+1
CI: rfl: move job forward to Linux v6.12-rc2 r? `@Kobzol` try-job: x86_64-rust-for-linux
2024-10-08Auto merge of #122709 - onur-ozkan:use-precompiled-rustc-by-default, ↵bors-13/+176
r=Mark-Simulacrum use precompiled rustc for non-dist builders Makes non-dist builders to use precompiled CI rustc by default if they are available for the target triple. As we are going to make `rust.download-rustc=if-unchanged` default option with https://github.com/rust-lang/rust/pull/119899, we need to make sure `if-unchanged` logic never breaks and works as expected. As an addition, this will significantly improve the build times on CI when there's no change on the compiler. blocker for #119899 try-job: x86_64-gnu-nopt try-job: aarch64-apple
2024-10-08force `download-rustc=if-unchanged` for x86_64-gnu-tools runneronur-ozkan-11/+12
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08fix `ci_rustc_if_unchanged_logic` testonur-ozkan-17/+18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08handle CI rustc incompatible runnersonur-ozkan-0/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08fail on {dist, install} subcommand if download-rustc is enabledonur-ozkan-0/+9
2024-10-08disable download-rustc on x86_64-gnu-integrationonur-ozkan-0/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08disable read-only mode in mingw-check image for merge pipelineonur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08improve ci-rustc finding logiconur-ozkan-4/+25
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08use if-unchanged only when ci rustc is availableonur-ozkan-9/+57
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08make an explicit change on compiler then run bootstrap testonur-ozkan-1/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08add test for ci rustc's if-unchanged logiconur-ozkan-1/+50
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08disable CI rustc when not using CI LLVMonur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08use precompiled rustc for non-dist builders by defaultonur-ozkan-0/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08Auto merge of #131404 - matthiaskrgr:rollup-z0dawoo, r=matthiaskrgrbors-347/+219
Rollup of 3 pull requests Successful merges: - #131348 (More `rustc_infer` cleanups) - #131392 (Drop compiletest legacy directive check) - #131395 (Add a mailmap entry for bjorn3) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-08Rollup merge of #131395 - bjorn3:bjorn3_mailmap, r=lqdMatthias Krüger-0/+1
Add a mailmap entry for bjorn3
2024-10-08Rollup merge of #131392 - jieyouxu:remove-legacy-directive-check, r=UrgauMatthias Krüger-93/+48
Drop compiletest legacy directive check Sufficient time has passed (> 6 months) since we migrated from `//` to `//`@`,` so let's drop the legacy directive check as it causes friction due to false positives. As a side-effect, dropping the legacy directive check simplifies the directive scanning logic. The legacy directive check was originally added to help people be aware of the migration. Blocker for #131382 cc `@ehuss.` Can be reviewed by any compiler/bootstrap reviewer.
2024-10-08Rollup merge of #131348 - nnethercote:rustc_infer-more-cleanups, r=lcnrMatthias Krüger-254/+170
More `rustc_infer` cleanups A sequel to #131226. r? `@lcnr`
2024-10-08Remove unneeded argument of `LinkCollector::verify_disambiguator`Guillaume Gomez-4/+2
2024-10-08Auto merge of #131399 - lnicola:sync-from-ra, r=lnicolabors-666/+1377
Subtree update of `rust-analyzer` r? `@ghost`
2024-10-08Simplify the directives for ignoring coverage-test modesZalathar-24/+19
2024-10-08Auto merge of #18267 - lnicola:sync-from-rust, r=lnicolabors-17325/+34070
minor: Sync from downstream
2024-10-08Merge from rust-lang/rustLaurențiu Nicola-17324/+34069
2024-10-08Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-10-08Auto merge of #18266 - lnicola:macos-13, r=lnicolabors-3/+3
internal: Use macos-13 runners and bump MACOSX_DEPLOYMENT_TARGET to 13.0 As Monterey seems to be EOL.
2024-10-08Add a mailmap entry for bjorn3bjorn3-0/+1
2024-10-08Auto merge of #131368 - GuillaumeGomez:rustdoc-dead-code, r=notriddlebors-115/+1
[rustdoc] Remove intra-doc links dead code While working on https://github.com/rust-lang/rust/pull/130278, I wondered what `resolve_display_text` was doing. I removed it and ran all rustdoc tests, and nothing failed. Are some intra-doc links tests missing or is it really dead code? Couldn't figure it out. r? `@notriddle`
2024-10-08Use macos-13 runners and bump MACOSX_DEPLOYMENT_TARGETLaurențiu Nicola-3/+3
2024-10-08Drop compiletest legacy directive checks许杰友 Jieyou Xu (Joe)-93/+48
Sufficient time has passed (> 6 months) since we migrated from `//` to `//@`, so let's drop the legacy directive check as it causes friction due to false positives.
2024-10-08Auto merge of #126733 - ZhuUx:llvm-19-adapt, r=Zalatharbors-572/+573
[Coverage][MCDC] Adapt mcdc to llvm 19 Related issue: #126672 Also finish task 4 at #124144 [llvm #82448](https://github.com/llvm/llvm-project/pull/82448) has introduced some break changes into mcdc, causing incompatibility between llvm 18 and 19. This draft adapts to that change and gives up supporting for llvm-18.
2024-10-08Remove unnecessary `return` keyword.Nicholas Nethercote-1/+1
2024-10-08Use `Default` more in `InferCtxtInner`.Nicholas Nethercote-18/+7
2024-10-08Downgrade a `&mut self` to `&self`.Nicholas Nethercote-1/+1
2024-10-08Remove `Deref`/`DerefMut` impls for `RegionConstraintCollector`.Nicholas Nethercote-32/+18
`Deref`/`DerefMut` can be useful, but they can also obfuscate. I don't think they're worth it for `RegionConstraintCollector`. They're also not present on the similar types `OpaqueTypeTable` and `TypeVariableTable`.
2024-10-08Remove unnecessary lifetime from `LeakCheck`.Nicholas Nethercote-32/+22
`LeakCheck` can own `mini_graph` and `rcc` instead of holding references to them. This requires inlining `assign_scc_value` to avoid a borrowck error, but that's fine because it has a single call site.
2024-10-08Inline and remove `RegionConstraintStorage::remove_constraint_entry`.Nicholas Nethercote-24/+20
It has a single call site.
2024-10-08Inline and remove `RegionConstraintCollector::into_infos_and_data`.Nicholas Nethercote-32/+18
It's a weird method, and used weirdly: - It's on `RegionConstraintCollector` but operates on `RegionConstraintStorage`. So at both call sites we create a temporary `RegionConstraintCollector`, using `with_log`, to call it. - It `take`s just two of the six fields in `RegionConstraintStorage`. At one of the two call sites we unnecessarily clone the entire `RegionConstraintStorage` just to take those two fields. This commit just inlines and removes it. We no longer need to `take` the two fields, we can just use them directly.
2024-10-08Improve formatting of some comments.Nicholas Nethercote-53/+50
I.e. fixing comments lines that are too long or too short.
2024-10-08Add a useful comment about `InferOk`.Nicholas Nethercote-0/+7
Prompted by #131134, which tried to remove `InferOk<'tcx, ()>` occurrences.
2024-10-08Remove `OutlivesEnvironmentBuilder`.Nicholas Nethercote-61/+26
`OutlivesEnvironment::new` can call `OutlivesEnvironment::with_bounds` with an empty `extra_bounds`. And once that's done, `OutlivesEnvironmentBuilder` has a single use and can be inlined and removed into `OutlivesEnvironment::with_bounds`.
2024-10-08Auto merge of #131387 - Zalathar:rollup-kprp512, r=Zalatharbors-59/+204
Rollup of 7 pull requests Successful merges: - #130824 (Add missing module flags for `-Zfunction-return=thunk-extern`) - #131170 (Fix `target_vendor` in non-IDF Xtensa ESP32 targets) - #131355 (Add tests for some old fixed issues) - #131369 (Update books) - #131370 (rustdoc: improve `<wbr>`-insertion for SCREAMING_CAMEL_CASE) - #131379 (Fix utf8-bom test) - #131385 (Un-vacation myself) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-08coverage. Warn about too many test vectorszhuyunxing-1/+17
2024-10-08coverage. Adapt to mcdc mapping formats introduced by llvm 19zhuyunxing-488/+493
2024-10-08coverage. MCDC ConditionId start from 0 to keep with llvm 19zhuyunxing-31/+27