Commit Graph

269222 Commits

Author SHA1 Message Date
León Orell Valerian Liehr
acf6344b42
Address review comments 2024-11-10 23:57:18 +01:00
Esteban Küber
1d78004575
Add Unicode block-drawing compiler output support
Add nightly-only theming support to rustc output using Unicode box
drawing characters instead of ASCII-art to draw the terminal UI:

After:

```
error: foo
  ╭▸ test.rs:3:3
  │
3 │       X0 Y0 Z0
  │   ┌───╿──│──┘
  │  ┌│───│──┘
  │ ┏││━━━┙
  │ ┃││
4 │ ┃││   X1 Y1 Z1
5 │ ┃││   X2 Y2 Z2
  │ ┃│└────╿──│──┘ `Z` label
  │ ┃└─────│──┤
  │ ┗━━━━━━┥  `Y` is a good letter too
  │        `X` is a good letter
  ╰╴
note: bar
  ╭▸ test.rs:4:3
  │
4 │ ┏   X1 Y1 Z1
5 │ ┃   X2 Y2 Z2
6 │ ┃   X3 Y3 Z3
  │ ┗━━━━━━━━━━┛
  ├ note: bar
  ╰ note: baz
note: qux
  ╭▸ test.rs:4:3
  │
4 │   X1 Y1 Z1
  ╰╴  ━━━━━━━━
```

Before:

```
error: foo
 --> test.rs:3:3
  |
3 |       X0 Y0 Z0
  |    ___^__-__-
  |   |___|__|
  |  ||___|
  | |||
4 | |||   X1 Y1 Z1
5 | |||   X2 Y2 Z2
  | |||____^__-__- `Z` label
  | ||_____|__|
  | |______|  `Y` is a good letter too
  |        `X` is a good letter
  |
note: bar
 --> test.rs:4:3
  |
4 | /   X1 Y1 Z1
5 | |   X2 Y2 Z2
6 | |   X3 Y3 Z3
  | |__________^
  = note: bar
  = note: baz
note: qux
 --> test.rs:4:3
  |
4 |   X1 Y1 Z1
  |   ^^^^^^^^
```
2024-11-10 23:57:18 +01:00
bors
f61306d47b Auto merge of #123550 - GnomedDev:remove-initial-arc, r=Noratrieb
Remove the `Arc` rt::init allocation for thread info

Removes an allocation pre-main by just not storing anything in std:🧵:Thread for the main thread.
- The thread name can just be a hard coded literal, as was done in #123433.
- Storing ThreadId and Parker in a static that is initialized once at startup. This uses SyncUnsafeCell and MaybeUninit as this is quite performance critical and we don't need synchronization or to store a tag value and possibly leave in a panic.
2024-10-24 13:35:50 +00:00
bors
5ae4d75eff Auto merge of #132099 - matthiaskrgr:rollup-myi94r8, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #129248 (Taking a raw ref (`&raw (const|mut)`) of a deref of pointer (`*ptr`) is always safe)
 - #131906 (rustdoc: adjust spacing and typography in header)
 - #132084 (Consider param-env candidates even if they have errors)
 - #132096 (Replace an FTP link in comments with an equivalent HTTPS link)
 - #132098 (rustc_feature::Features: explain what that 'Option<Symbol>' is about)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-24 10:16:52 +00:00
Matthias Krüger
7c22f47e22
Rollup merge of #132098 - RalfJung:features-since, r=jieyouxu
rustc_feature::Features: explain what that 'Option<Symbol>' is about
2024-10-24 10:35:42 +02:00
Matthias Krüger
35ebcec2f7
Rollup merge of #132096 - Zalathar:ftp-link, r=jieyouxu
Replace an FTP link in comments with an equivalent HTTPS link

Modern browsers and editors often don't support following FTP links, so using an ordinary web link gives the same result in a more convenient way.
2024-10-24 10:35:41 +02:00
Matthias Krüger
0470728e94
Rollup merge of #132084 - compiler-errors:param-env-with-err, r=lcnr,estebank
Consider param-env candidates even if they have errors

I added this logic in https://github.com/rust-lang/rust/pull/106309, but frankly I don't know why -- the logic was a very large hammer. It seems like recent changes to error tainting has made that no longer necessary.

Ideally we'd rework the way we handle error reporting in all of candidate assembly to be a bit more responsible; we're just suppressing candidates all willy-nilly and it leads to mysterious *other* errors cropping up, like the one that #132082 originally wanted to fix.

**N.B.** This has the side-effect of turning a failed resolution like `where Missing: Sized` into a trivial where clause that matches all types, but also I don't think it really matters?

I'm putting this up as an alternative to #132082, since that PR doesn't address the case when one desugars the APIT into a regular type param.

r? lcnr vibeck
2024-10-24 10:35:40 +02:00
Matthias Krüger
96558580ac
Rollup merge of #131906 - notriddle:notriddle/spacing, r=GuillaumeGomez
rustdoc: adjust spacing and typography in header

Fixes #131589

Preview: https://notriddle.com/rustdoc-html-demo-12/spacing/std/index.html

| Before | After |
|--|--|
| ![image](https://github.com/user-attachments/assets/b5c5132d-1e5e-402e-ba19-1dea9e70ea6f) | ![image](https://github.com/user-attachments/assets/72570b93-bb16-4553-9da7-fc4f29b98873)
| ![image](https://github.com/user-attachments/assets/264983f0-5aec-4120-8a03-f62e52d4360d) | ![image](https://github.com/user-attachments/assets/b6925945-95e6-4858-8e91-4cfd90c164f0)
| ![image](https://github.com/user-attachments/assets/df96bfe7-195d-4aaf-97f1-a45ade34cab2) | ![image](https://github.com/user-attachments/assets/c6fe2d57-bd8a-42aa-b3cf-4f635809b9b4)
| ![image](https://github.com/user-attachments/assets/7519faa5-d6b2-41ba-9d95-6000d1dd89d1) | ![image](https://github.com/user-attachments/assets/7233c2d6-82d9-4820-bb63-dc4776a34601)

First of all, we put 4px additional margin below the search box, and 4px margin below the header to balance it out.

The bigger problem we have to solve is making the lines look logically spaced. This is troublesome, because Fira Sans (the typeface we use here) wants to look good on average, and to avoid breaking, with text that uses [ascenders and descenders](https://www.w3.org/TR/css-inline-3/images/text-edge.png). If the text we're putting in happens to not have any, things look weird (strictly speaking, there’s hand-tuning here, because the Copy Path button messes with stuff, but the overall point is that there is no true, one perfect layout).

In order to play nicely with the font, I've tweaked the text to use that space. The word "Source" for the link is now capitalized, and the Since version number now uses oldstyle nums with descenders.
2024-10-24 10:35:39 +02:00
Matthias Krüger
93bf791e8b
Rollup merge of #129248 - compiler-errors:raw-ref-deref, r=nnethercote
Taking a raw ref (`&raw (const|mut)`) of a deref of pointer (`*ptr`) is always safe

T-opsem decided in https://github.com/rust-lang/reference/pull/1387 that `*ptr` is only unsafe if the place is accessed. This means that taking a raw ref of a deref expr is always safe, since it doesn't constitute a read.

This also relaxes the `DEREF_NULLPTR` lint to stop warning in the case of raw ref of a deref'd nullptr, and updates its docs to reflect that change in the UB specification.

This does not change the behavior of `addr_of!((*ptr).field)`, since field projections still require the projection is in-bounds.

I'm on the fence whether this requires an FCP, since it's something that is guaranteed by the reference you could ostensibly call this a bugfix since we were counting truly safe operations as unsafe. Perhaps someone on opsem has a strong opinion? cc `@rust-lang/opsem`
2024-10-24 10:35:39 +02:00
Ralf Jung
282f291b7d rustc_feature::Features: explain what that 'Option<Symbol>' is about 2024-10-24 08:15:28 +02:00
Zalathar
3dfc352145 Replace an FTP link in comments with an equivalent HTTPS link 2024-10-24 17:02:11 +11:00
bors
8aca4bab08 Auto merge of #131951 - notriddle:notriddle/sha256-compile-time, r=GuillaumeGomez
rustdoc: hash assets at rustdoc build time

Since sha256 is slow enough to show up on small benchmarks, we can save time by embedding the hash in the executable.

Addresses https://github.com/rust-lang/rust/pull/131934#issuecomment-2424213861
2024-10-24 05:48:56 +00:00
bors
55b7f8e800 Auto merge of #132094 - Zalathar:rollup-5r1ppqt, r=Zalathar
Rollup of 10 pull requests

Successful merges:

 - #130225 (Rename Receiver -> LegacyReceiver)
 - #131169 (Fix `target_vendor` in QNX Neutrino targets)
 - #131623 (misc cleanups)
 - #131756 (Deeply normalize `TypeTrace` when reporting type error in new solver)
 - #131898 (minor `*dyn` cast cleanup)
 - #131909 (Prevent overflowing enum cast from ICEing)
 - #131930 (Don't allow test revisions that conflict with built in cfgs)
 - #131956 (coverage: Pass coverage mappings to LLVM as separate structs)
 - #132076 (HashStable for rustc_feature::Features: stop hashing compile-time constant)
 - #132088 (Print safety correctly in extern static items)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-24 03:24:50 +00:00
Stuart Cook
7e2bbc30b3
Rollup merge of #132088 - compiler-errors:extern-static, r=jieyouxu
Print safety correctly in extern static items

Fixes #132080

r? spastorino or anyone really
2024-10-24 14:19:58 +11:00
Stuart Cook
006a14230f
Rollup merge of #132076 - RalfJung:feature-hashing, r=nnethercote,Mark-Simulacrum
HashStable for rustc_feature::Features: stop hashing compile-time constant

It seems like back in 542bc75dea this was added as "hash the boolean value of each lang feature", but then in 1487bd6a17 this got split into first hashing a sequence of `bool`s (representing all the features) and then hashing all the feature names... but the list of feature names is a compile-time constant, so it seems entirely unnecessary to hash them?

Cc `@Mark-Simulacrum` who wrote the second of the commits mentioned above.
Cc `@nnethercote`
2024-10-24 14:19:57 +11:00
Stuart Cook
8f354fc94a
Rollup merge of #131956 - Zalathar:llvm-counters, r=compiler-errors,Swatinem
coverage: Pass coverage mappings to LLVM as separate structs

Instead of trying to cram *N* different kinds of coverage mapping data into a single list for FFI, pass *N* different lists of simpler structs.

This avoids the need to fill unused fields with dummy values, and avoids the need to tag structs with their underlying kind. It also lets us call the dedicated LLVM constructors for each different mapping type, instead of having to go through the complex general-purpose constructor.

Even though this adds multiple new structs to the FFI surface area, the resulting C++ code is simpler and shorter.

---

I've structured this mostly as a single atomic patch, rather than a series of incremental changes, because that avoids the need to make fiddly fixes to code that is about to be deleted anyway.
2024-10-24 14:19:57 +11:00
Stuart Cook
f7f411dd4e
Rollup merge of #131930 - clubby789:revision-cfg-collide, r=jieyouxu
Don't allow test revisions that conflict with built in cfgs

Fixes #128964

Sorry `@heysujal` I started working on this about 1 minute before your comment by complete coincidence 😅
2024-10-24 14:19:56 +11:00
Stuart Cook
4b02d642dd
Rollup merge of #131909 - clubby789:enum-overflow-cast, r=compiler-errors
Prevent overflowing enum cast from ICEing

Fixes #131902
2024-10-24 14:19:56 +11:00
Stuart Cook
4c0bab3192
Rollup merge of #131898 - lukas-code:ptr-cast-cleanup, r=compiler-errors
minor `*dyn` cast cleanup

Small follow-up to https://github.com/rust-lang/rust/pull/130234 to remove a redundant check and clean up comments. No functional changes.

Also, explain why casts cannot drop the principal even though coercions can, and add a test because apparently we didn't have one already.

r? `@WaffleLapkin` or `@compiler-errors`
2024-10-24 14:19:55 +11:00
Stuart Cook
ad43be310f
Rollup merge of #131756 - compiler-errors:deeply-normalize-type-err, r=lcnr
Deeply normalize `TypeTrace` when reporting type error in new solver

Normalize the values that come from the `TypeTrace` for various type mismatches.

Side-note: We can't normalize the `TypeError` itself bc it may come from instantiated binders, so it may reference values from within the probe...

r? lcnr
2024-10-24 14:19:55 +11:00
Stuart Cook
77f2c57b3f
Rollup merge of #131623 - matthiaskrgr:clippy_sat, r=Nadrieril
misc cleanups
2024-10-24 14:19:54 +11:00
Stuart Cook
40d787234b
Rollup merge of #131169 - madsmtm:target-info-nto-vendor, r=wesleywiser
Fix `target_vendor` in QNX Neutrino targets

The `x86_64-pc-nto-qnx710` and `i586-pc-nto-qnx700` targets have `pc` in their target triple names, but the vendor was set to the default `"unknown"`.

CC target maintainers `@flba-eb,` `@gh-tr,` `@jonathanpallant` and `@japaric`
2024-10-24 14:19:53 +11:00
Stuart Cook
9c73bcfa8d
Rollup merge of #130225 - adetaylor:rename-old-receiver, r=wesleywiser
Rename Receiver -> LegacyReceiver

As part of the "arbitrary self types v2" project, we are going to replace the current `Receiver` trait with a new mechanism based on a new, different `Receiver` trait.

This PR renames the old trait to get it out the way. Naming is hard. Options considered included:
* HardCodedReceiver (because it should only be used for things in the standard library, and hence is sort-of hard coded)
* LegacyReceiver
* TargetLessReceiver
* OldReceiver

These are all bad names, but fortunately this will be temporary. Assuming the new mechanism proceeds to stabilization as intended, the legacy trait will be removed altogether.

Although we expect this trait to be used only in the standard library, we suspect it may be in use elsehwere, so we're landing this change separately to identify any surprising breakages.

It's known that this trait is used within the Rust for Linux project; a patch is in progress to remove their dependency.

This is a part of the arbitrary self types v2 project,
https://github.com/rust-lang/rfcs/pull/3519
https://github.com/rust-lang/rust/issues/44874

r? `@wesleywiser`
2024-10-24 14:19:53 +11:00
Michael Goulet
4217b8702d Deeply normalize type trace in type error reporting 2024-10-24 02:48:28 +00:00
Michael Goulet
1920c66a8d Plumb through param_env to note_type_err 2024-10-24 02:48:08 +00:00
Michael Goulet
d8dc31fd3d Consider param-env candidates even if they have errors 2024-10-24 01:48:44 +00:00
Michael Goulet
4e1b3ab0e7 Print safety correctly in extern static items 2024-10-24 00:41:27 +00:00
Michael Howell
a53655a023 rustdoc: adjust spacing and typography in header 2024-10-23 19:15:23 -04:00
bors
b8bb2968ce Auto merge of #132079 - fmease:rollup-agrd358, r=fmease
Rollup of 9 pull requests

Successful merges:

 - #130991 (Vectorized SliceContains)
 - #131928 (rustdoc: Document `markdown` module.)
 - #131955 (Set `signext` or `zeroext` for integer arguments on RISC-V and LoongArch64)
 - #131979 (Minor tweaks to `compare_impl_item.rs`)
 - #132036 (Add a test case for #131164)
 - #132039 (Specialize `read_exact` and `read_buf_exact` for `VecDeque`)
 - #132060 ("innermost", "outermost", "leftmost", and "rightmost" don't need hyphens)
 - #132065 (Clarify documentation of `ptr::dangling()` function)
 - #132066 (Fix a typo in documentation of `pointer::sub_ptr()`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-23 22:28:57 +00:00
Matthias Krüger
d84d659cb5 clone range in a more obvious way 2024-10-23 22:22:58 +02:00
Matthias Krüger
464f4057c2 fix some manual_map 2024-10-23 22:22:56 +02:00
Matthias Krüger
dab76eccdf fix a couple clippy:complexitys
double_parens
 filter_map_identity
 needless_question_mark
 redundant_guards
2024-10-23 22:15:59 +02:00
León Orell Valerian Liehr
fbe33e35af
Rollup merge of #132066 - tifv:ptr-docs-typo, r=Amanieu
Fix a typo in documentation of `pointer::sub_ptr()`

Just a typo in docs.
2024-10-23 22:11:06 +02:00
León Orell Valerian Liehr
b0a8e4e030
Rollup merge of #132065 - tifv:dangling-docs, r=Noratrieb
Clarify documentation of `ptr::dangling()` function

Also fixes the safety comment in `NonNull::dangling()` function.

Fixes #132004.
2024-10-23 22:11:06 +02:00
León Orell Valerian Liehr
8b1141a5c3
Rollup merge of #132060 - joshtriplett:innermost-outermost, r=jieyouxu
"innermost", "outermost", "leftmost", and "rightmost" don't need hyphens

These are all standard dictionary words and don't require hyphenation.

-----

Encountered an instance of this in error messages and it bugged me, so I
figured I'd fix it across the entire codebase.
2024-10-23 22:11:05 +02:00
León Orell Valerian Liehr
28aacb3d03
Rollup merge of #132039 - a1phyr:vecdeque_read_exact, r=Noratrieb
Specialize `read_exact` and `read_buf_exact` for `VecDeque`
2024-10-23 22:11:05 +02:00
León Orell Valerian Liehr
f3d4887a4a
Rollup merge of #132036 - DianQK:test-131164, r=jieyouxu
Add a test case for #131164

The upstream has already been fixed, but it won't be backported to LLVM 19.

r? jieyouxu or compiler

try-job: x86_64-gnu-stable
2024-10-23 22:11:04 +02:00
León Orell Valerian Liehr
6b70ff44bc
Rollup merge of #131979 - compiler-errors:compare-pred-entail, r=fmease
Minor tweaks to `compare_impl_item.rs`

1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it.
2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
2024-10-23 22:11:04 +02:00
León Orell Valerian Liehr
a144561608
Rollup merge of #131955 - SpriteOvO:riscv-int-arg-attr, r=workingjubilee
Set `signext` or `zeroext` for integer arguments on RISC-V and LoongArch64

This PR contains 3 commits:

- the first one introduces a new function `adjust_for_rust_abi` in `rustc_target`, and moves the x86 specific adjustment code into it;
- the second one adds RISC-V specific adjustment code into it, which sets `signext` or `zeroext` attribute for integer arguments.
- **UPDATE**: added the 3rd commit to apply the same adjustment for LoongArch64.
2024-10-23 22:11:03 +02:00
León Orell Valerian Liehr
8af1851b0a
Rollup merge of #131928 - aDotInTheVoid:wait-we-support-this, r=GuillaumeGomez
rustdoc: Document `markdown` module.

Rustdoc markdown handling is currently split between:

- html::markdown, which contains all the meaty login
- markdown, which is only used for when rustdoc renders a standalone markdown file

Adds module-level doc-comment to markdown, and rename the function so it's clear that it's doing IO (instead of just rendering to a string).
2024-10-23 22:11:03 +02:00
León Orell Valerian Liehr
af2c7dffda
Rollup merge of #130991 - LaihoE:vectorized_slice_contains, r=Noratrieb
Vectorized SliceContains

Godbolt for the u32 case: https://rust.godbolt.org/z/exT9xYWGs

Unsure about:
- Should align_to be used? It didn't seem to matter in my benchmark but maybe I was lucky with alignment?
- Should u8/i8 also be implemented? Currently uses memchr (SWAR)

Some benchmarks on x86 (contains called on an array with no matches, worst case may be slightly worse):

## Large N
![large_n_contains](https://github.com/user-attachments/assets/5be79072-970b-44be-a56c-16dc677dee46)

## Small N
![small_n_contains](https://github.com/user-attachments/assets/b8a33790-c176-459f-84f4-05feee893cd0)
2024-10-23 22:11:02 +02:00
bors
4f2f477fde Auto merge of #132070 - fmease:rollup-4i4k587, r=fmease
Rollup of 5 pull requests

Successful merges:

 - #131043 (Refactor change detection for rustdoc and download-rustc)
 - #131181 (Compiletest: Custom differ)
 - #131487 (Add wasm32v1-none target (compiler-team/#791))
 - #132054 (do not remove `.cargo` directory)
 - #132058 (CI: rfl: use rust-next temporary commit)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-23 19:26:00 +00:00
Laiho
c11bfd828e vectorized SliceContains 2024-10-23 20:14:17 +02:00
clubby789
2e3091d66c Don't allow test revisions that conflict with built in cfgs 2024-10-23 18:05:27 +00:00
Ralf Jung
03048096f6 stop hashing compile-time constant 2024-10-23 19:46:52 +02:00
León Orell Valerian Liehr
5f0626cdb1
Rollup merge of #132058 - adetaylor:use-rust-next-in-ci, r=lqd
CI: rfl: use rust-next temporary commit

Commit c95bbb59a9b22f9b838b15d28319185c1c884329 within rust-next contains some changes required to be compatible with upcoming arbitraty self types work. Roll RFL CI forward to the latest rust-next to include that work.

Related:
https://github.com/rust-lang/rust/pull/130225
https://github.com/rust-lang/rust/issues/44874

r? ``@ojeda``

try-job: x86_64-rust-for-linux
2024-10-23 17:24:32 +02:00
León Orell Valerian Liehr
bb65499b61
Rollup merge of #132054 - onur-ozkan:cargo-config, r=Kobzol
do not remove `.cargo` directory

If vendoring isn't used bootstrap removes `.cargo` directory, which prevents developers from setting certain options in the `.cargo/config.toml` file. This was introduced in https://github.com/rust-lang/rust/pull/97513 (specifically in [this commit](345eb14f6c)). Also, since https://github.com/rust-lang/rust/pull/123942, vendoring is now possible even in git sources, which means we shouldn't remove `.cargo` directory in git sources anymore.
2024-10-23 17:24:31 +02:00
León Orell Valerian Liehr
03cb7de189
Rollup merge of #131487 - graydon:wasm32v1-none, r=alexcrichton
Add wasm32v1-none target (compiler-team/#791)

This is a preliminary implementation of the MCP discussed in [compiler-team#791](https://github.com/rust-lang/compiler-team/issues/791). It's not especially "major" but you know, process! Anyway it adds a new wasm32v1-none target which just pins down a set of wasm features. I think this is close to the consensus that emerged when discussing it on Zulip so I figured I'd sketch to see how hard it is. Turns out not very.
2024-10-23 17:24:31 +02:00
León Orell Valerian Liehr
f2675002a0
Rollup merge of #131181 - dev-ardi:custom-differ, r=jieyouxu
Compiletest: Custom differ

This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail.

I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it.

This is how it looks [with debug info silenced](https://github.com/rust-lang/rust/pull/131182) (#131182)
`COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser`
![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
2024-10-23 17:24:30 +02:00
León Orell Valerian Liehr
4caa60c032
Rollup merge of #131043 - liwagu:unify, r=albertlarsan68,onur-ozkan
Refactor change detection for rustdoc and download-rustc

This pull request refactors the change detection logic in the build process by consolidating redundant code into a new helper method. The key changes include the removal of duplicate logic for checking changes in directories and the addition of a new method to handle this functionality.

Refactoring and code simplification:

* [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL588-R593): Removed redundant change detection logic and replaced it with a call to the new `check_for_changes` method.
* [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2R2837-R2872): Added a new method `check_for_changes` to centralize the logic for detecting changes in specified directories since a given commit.
* [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2L2728-R2740): Updated the existing change detection code to use the new `check_for_changes` method.

Cleanup:

* [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL13-R13): Removed the unused import `git` from the helpers module.

   r? ``@AlbertLarsan68``
2024-10-23 17:24:30 +02:00