Skip to content

Rollup of 9 pull requests #137420

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 23 commits into from
Feb 22, 2025
Merged

Rollup of 9 pull requests #137420

merged 23 commits into from
Feb 22, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

okaneco and others added 23 commits February 20, 2025 05:19
Implement accepted ACP for functions that isolate the most significant
set bit and least significant set bit on unsigned, signed, and NonZero
integers.

Add function `isolate_most_significant_one`
Add function `isolate_least_significant_one`
Add tests
I was always confused about what is being built, since nothing was printed in the log :)
The only case where can_reuse_cratenum could have been false in the past
are rustc plugins, support for which has been removed over a year ago
now. Nowadays the only case where locator.tuple is not target_triple is
when loading a proc macro, in which case we also set can_reuse_cratenum
to true. As such it is always true and we can remove some dead code.
…ows 7

Would otherwise fail there. The Windows7-specific parts were left pretty
much untouched by the changes introduced by
51df98d, so it is expected that these
tests fail under Windows 7 as they were probably written to run under
Windows 10+ only.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
test: add tests for correct ferris capitalization

fix: add "struct"

style: use rustfmt

style: remove newline

fix: _

_

_

_

_
Implement feature `isolate_most_least_significant_one` for integer types

Accepted ACP - rust-lang/libs-team#467
Tracking issue - rust-lang#136909

Implement ACP for functions that isolate the most significant set bit and least significant set bit on unsigned, signed, and `NonZero` integers.

Add function `isolate_most_significant_one`
Add function `isolate_least_significant_one`

---

This PR adds the following impls
```rust
impl {u8, u16, u32, u64, u128, usize} {
    const fn isolate_most_significant_one(self) -> Self;
    const fn isolate_least_significant_one(self) -> Self;
}
impl {i8, i16, i32, i64, i128, isize} {
    const fn isolate_most_significant_one(self) -> Self;
    const fn isolate_least_significant_one(self) -> Self;
}
impl NonZeroT {
    const fn isolate_most_significant_one(self) -> Self;
    const fn isolate_least_significant_one(self) -> Self;
}
```
Example behavior
```rust
assert_eq!(u8::isolate_most_significant_one(0b01100100), 0b01000000);
assert_eq!(u8::isolate_least_significant_one(0b01100100), 0b00000100);
```
…, r=lcnr

Prune dead regionck code

We never encounter `ObligationCauseCode`s that correspond to region obligations that originate from "within" a body, since we don't do HIR regionck anymore on bodies. So prune some dead code.
…, r=Nadrieril

Use `edition = "2024"` in the compiler (redux)

Most of this is binding mode changes, which I fixed by running `x.py fix`.

Also adds some miscellaneous `unsafe` blocks for new unsafe standard library functions (the setenv ones), and a missing `unsafe extern` block in some enzyme codegen code, and fixes some precise capturing lifetime changes (but only when they led to errors).

cc ``@ehuss`` ``@traviscross``
Ferris 🦀 Identifier naming conventions

You cannot use Ferris as an identifier in Rust, this code will suggest to correct the  🦀 to `ferris`:

```rs
fn main() {
  let  🦀 = 4;
}
```

But it also suggests to correct to `ferris` in these cases, too:

```rs
struct  🦀 {}
fn main() {}
```

^ suggests: `ferris`
~ with this PR: `Ferris`

```rs
static 🦀: &str = "ferris!";
fn main() {}
```

^ suggests: `ferris`
~ with this PR: `FERRIS`

This is my first pull requests here!
… r=jieyouxu

Add build step log for `run-make-support`

I was always confused about what is being built, since nothing was printed in the log :)

r? ``@jieyouxu``
…piler-errors

Always allow reusing cratenum in CrateLoader::load

The only case where can_reuse_cratenum could have been false in the past are rustc plugins, support for which has been removed over a year ago now. Nowadays the only case where locator.tuple is not target_triple is when loading a proc macro, in which case we also set can_reuse_cratenum to true. As such it is always true and we can remove some dead code.
…antics-tests-under-win7, r=ChrisDenton

Fix(lib/fs/tests): Disable rename POSIX semantics FS tests under Windows 7

Would otherwise fail there. The Windows7-specific parts were left pretty much untouched by the changes introduced by
51df98d, so it is expected that these tests fail under Windows 7 as they were probably written to run under Windows 10+ only.
… r=workingjubilee

Use StableHasher + Hash64 for dep_tracking_hash

This is similar to rust-lang#137095. We currently have a +/- 1 byte jitter in the size of dep graphs reported on perf.rust-lang.org. I think this fixes that jitter.

When I introduced `Hash64`, I wired it through most of the compiler by making it an output of `StableHasher::finalize` then fixing the compile errors. I missed this case because the `u64` hash in this function is being produced by `DefaultHasher` instead. That seems pretty sketchy because the code seems confident that the hash needs to be stable, and we have a mechanism for stable hashing that we weren't using here.
…ble, r=chenyukang

jubilee cleared out the review queue

despite some things coming in during.
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2025
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Feb 22, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Feb 22, 2025

📌 Commit 4910eb9 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2025
@bors
Copy link
Collaborator

bors commented Feb 22, 2025

⌛ Testing commit 4910eb9 with merge 15469f8...

@bors
Copy link
Collaborator

bors commented Feb 22, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 15469f8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 22, 2025
@bors bors merged commit 15469f8 into rust-lang:master Feb 22, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 22, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#136910 Implement feature isolate_most_least_significant_one for … 3bcd23071da875635f8c13107913462f31420d66 (link)
#137183 Prune dead regionck code fdfd009cab626199e7976a7b3ed63576910b0165 (link)
#137333 Use edition = "2024" in the compiler (redux) bb4878f099cdec148ef1787c54636d2e3f6c4aae (link)
#137356 Ferris 🦀 Identifier naming conventions 4231fbfe1052d683a88eef078ac6e05b5a9544cb (link)
#137362 Add build step log for run-make-support 0d4f49379b7a0924001beb1a6fd612c0b718e15e (link)
#137377 Always allow reusing cratenum in CrateLoader::load d6f86e44fe1a72b69dcab867a6311d7452e16ec8 (link)
#137388 Fix(lib/fs/tests): Disable rename POSIX semantics FS tests … a7fe8faa2667fb8ad34a70e74b464ff2cb4e0613 (link)
#137410 Use StableHasher + Hash64 for dep_tracking_hash 47d6703394bebe6a1fd6d4b28b5c687172d84ed9 (link)
#137413 jubilee cleared out the review queue de9c2332347bd6f6e9ee543a69ef5228b9f566c8 (link)

previous master: 8dac72bb1d

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (15469f8): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.2%, 0.3%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary 2.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 773.405s -> 769.752s (-0.47%)
Artifact size: 361.04 MiB -> 361.02 MiB (-0.00%)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.