Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #131635

Merged
merged 15 commits into from
Oct 13, 2024
Merged

Rollup of 7 pull requests #131635

merged 15 commits into from
Oct 13, 2024

Conversation

tgross35
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

heiher and others added 15 commits October 6, 2024 11:57
Otherwise `error-pattern` on the test run stderr can incorrectly match
if e.g. the paths in panic backtrace has a matching substring (like if
we look for `bar` in the error pattern but username is `baron`).
When rust-lang/rust is configured as remote, some of the git
logic (for tracking changed files) that uses get_closest_merge_commit
starts to produce annoying results as the upstream branch becomes outdated
quickly (since it isn't updated with git pull). We can rely on HEAD for
non-CI environments as we specifically treat bors commits as merge commits,
which also exist on upstream. As for CI environments, we should use
`git_upstream_merge_base` to correctly track modified files as bors commits
may be in `HEAD` but not yet on the upstream remote.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This makes the following API stable in const contexts:

    impl<T> Option<T> {
        pub const fn as_mut(&mut self) -> Option<&mut T>;
        pub const fn expect(self, msg: &str) -> T;
        pub const fn unwrap(self) -> T;
        pub const unsafe fn unwrap_unchecked(self) -> T;
        pub const fn take(&mut self) -> Option<T>;
        pub const fn replace(&mut self, value: T) -> Option<T>;
    }

    impl<T> Option<&T> {
        pub const fn copied(self) -> Option<T>
        where T: Copy;
    }

    impl<T> Option<&mut T> {
        pub const fn copied(self) -> Option<T>
        where T: Copy;
    }

    impl<T, E> Option<Result<T, E>> {
        pub const fn transpose(self) -> Result<Option<T>, E>
    }

    impl<T> Option<Option<T>> {
        pub const fn flatten(self) -> Option<T>;
    }

The following functions make use of the unstable
`const_precise_live_drops` feature:

- `expect`
- `unwrap`
- `unwrap_unchecked`
- `transpose`
- `flatten`

Fixes: <rust-lang#67441>
…=RalfJung

Stabilize `const_option`

This makes the following API stable in const contexts:

```rust
impl<T> Option<T> {
    pub const fn as_mut(&mut self) -> Option<&mut T>;
    pub const fn expect(self, msg: &str) -> T;
    pub const fn unwrap(self) -> T;
    pub const unsafe fn unwrap_unchecked(self) -> T;
    pub const fn take(&mut self) -> Option<T>;
    pub const fn replace(&mut self, value: T) -> Option<T>;
}

impl<T> Option<&T> {
    pub const fn copied(self) -> Option<T>
    where T: Copy;
}

impl<T> Option<&mut T> {
    pub const fn copied(self) -> Option<T>
    where T: Copy;
}

impl<T, E> Option<Result<T, E>> {
    pub const fn transpose(self) -> Result<Option<T>, E>
}

impl<T> Option<Option<T>> {
    pub const fn flatten(self) -> Option<T>;
}
```

The following functions make use of the unstable `const_precise_live_drops` feature:

- `expect`
- `unwrap`
- `unwrap_unchecked`
- `transpose`
- `flatten`

Fixes: <rust-lang#67441>
…mulacrum

Enable sanitizers for loongarch64-unknown-*

Enable sanitizers for `loongarch64-unknown-linux-{gnu,musl,ohos}` targets.
force "HEAD" for non-CI and `git_upstream_merge_base` for CI environment

When rust-lang/rust is configured as remote, some of the git logic (for tracking changed files) that uses get_closest_merge_commit starts to produce annoying results as the upstream branch becomes outdated quickly (since it isn't updated with git pull). We can rely on HEAD for non-CI environments as we specifically treat bors commits as merge commits, which also exist on upstream. As for CI environments, we should use `git_upstream_merge_base` to correctly track modified files as bors commits may be in `HEAD` but not yet on the upstream remote.

This is also an alternative fix for rust-lang#129528 since rust-lang#131331 reverts the previous fix attempts.
… r=bjorn3

Use throw intrinsic from stdarch in wasm libunwind

Tracking issue: rust-lang#118168

This is a very belated followup to rust-lang#121438; now that rust-lang/stdarch#1542 is merged, we can use the intrinsic exported from `core::arch` instead of defining it inline. I also cleaned up the cfgs a bit and added a more detailed comment.
…iler-errors

Remap path prefix in the panic message of `tests/ui/meta/revision-bad.rs`

Otherwise `error-pattern` on the test run stderr can incorrectly match if the paths in panic backtrace has a matching substring (like if we look for `bar` in the error pattern, but the username is `baron`).

Tested locally by checking run output `./x test .\tests\ui\meta\revision-bad.rs -- -- --nocapture`:

```
--- stderr -------------------------------
thread 'main' panicked at remapped\meta\revision-bad.rs:14:5:
foo
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------
```

Fixes rust-lang#130996.
remove a couple of redundant String to String conversion
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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-infra Relevant to the infrastructure 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. rollup A PR which is a rollup labels Oct 13, 2024
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Oct 13, 2024

📌 Commit 39071fd has been approved by tgross35

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 Oct 13, 2024
@bors
Copy link
Contributor

bors commented Oct 13, 2024

⌛ Testing commit 39071fd with merge ecf2d1f...

@bors
Copy link
Contributor

bors commented Oct 13, 2024

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing ecf2d1f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 13, 2024
@bors bors merged commit ecf2d1f into rust-lang:master Oct 13, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 13, 2024
@tgross35 tgross35 deleted the rollup-df8il2t branch October 13, 2024 06:26
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#131120 Stabilize const_option 2c92a1bed76d9e7f359b42c16383a52b4c977f35 (link)
#131334 Enable sanitizers for loongarch64-unknown-* 996be7c73498f036c5f28cdd370fc7e8ec2cb942 (link)
#131358 force "HEAD" for non-CI and git_upstream_merge_base for C… 1a2e68af069e444ae25be0128a963d2ceb263e89 (link)
#131418 Use throw intrinsic from stdarch in wasm libunwind f4a13632677e617d0c80e63af370a20d6f6a0eda (link)
#131579 Remap path prefix in the panic message of `tests/ui/meta/re… fc3510a68506e39b455091bc33b283eff8ad4d38 (link)
#131591 add latest crash tests 41154c5012bb05d42aa132e38569c6f3be012ce5 (link)
#131626 remove a couple of redundant String to String conversion 84b8028068def3e417a9b8d83aedaaeb39352907 (link)

previous master: ef4e8259b5

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 (ecf2d1f): comparison URL.

Overall result: ✅ improvements - 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 1.8%)

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)
3.3% [2.1%, 4.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [-1.3%, 4.6%] 3

Cycles

Results (secondary 2.4%)

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.4% [2.4%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 781.811s -> 781.228s (-0.07%)
Artifact size: 332.08 MiB -> 332.08 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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-infra Relevant to the infrastructure 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants