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 8 pull requests #136185

Merged
merged 18 commits into from
Jan 28, 2025
Merged

Rollup of 8 pull requests #136185

merged 18 commits into from
Jan 28, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Urgau and others added 18 commits January 20, 2025 18:50
Trim extra whitespace when suggesting removal of invalid qualifiers when
parsing function pointer type.

Fixes: rust-lang#133083

Signed-off-by: Tyrone Wu <[email protected]>
…ptrmetadata, r=davidtwco,RalfJung"

This reverts commit 122a55b.
…r=compiler-errors

Trim extra whitespace in fn ptr suggestion span

Trim extra whitespace when suggesting removal of invalid qualifiers when parsing function pointer type.

Fixes: rust-lang#133083

---

I made a comment about the format of the diagnostic error message in rust-lang#133083 (comment). I think the `.label` may be a little redundant if the diagnostic only highlights the bad qualifier instead of the entire `TyKind::BareFn` span. If it makes sense, I can include it in this PR.
…le, r=Noratrieb

Implement `AtomicT::update` & `AtomicT::try_update`

ACP accepted in rust-lang/libs-team#490

``@rustbot`` label +T-libs-api
Enable `unreachable_pub` lint in `alloc`

This PR enables the [`unreachable_pub`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub) lint as warn in the `alloc` crate.

Most of changes are in the btree implementation and in tests.

*The diff was mostly generated with `./x.py fix --stage 1 library/alloc/ -- --broken-code`, as well as manual edits for code in macros and in tests.*

Continuation of rust-lang#134286 and rust-lang#135366

r? libs
…oli-obk

Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸

Change `Rvalue::RawRef` to take a `RawRefKind` instead of just a `Mutability`. Then introduce `RawRefKind::FakeForPtrMetadata` and use that for lowering index bounds checking to a `PtrMetadata`. This new `RawRefKind::FakeForPtrMetadata` acts like a shallow fake borrow in borrowck, which mimics the semantics of the old `Rvalue::Len` operation we're replacing.

We can then use this `RawRefKind` instead of using a span desugaring hack in CTFE.

cc ``@scottmcm`` ``@RalfJung``
Add missing allocator safety in alloc crate

### PR Description
In the previous PR [rust-lang#135009](rust-lang#135009), PR [rust-lang#134496](rust-lang#134496), some incomplete API documentation issues have been fixed.

Based on these changes,  other inconsistencies related to the allocator have also been identified, including:

- `Box::from_non_null`
- `Box::from_non_null_in`
- `Weak::from_raw`
Document purpose of closure in from_fn.rs more clearly

partial fix for rust-lang#135087 together with rust-lang#135895
…jieyouxu

Fix 2/4 tests skipped by opt-dist

The linker errors were because this one test, strangely, wants itself compiled with `-Ctarget-features=+crt-static`, and yet it looks like the runner image is simply missing static libraries for libc and libm.

Eyeballing the output of
```
rustc +nightly --target=x86_64-pc-windows-msvc -O tests/codegen/vec-shrink-panik.rs --emit=llvm-ir
```
suggests that vec-shrink-panik should pass on Windows. And it's quite disturbing that such a test would have failed only on Windows to start with. Exactly why that was would require some advanced digging, but it looks clean now.
…gross35

Document powf and powi values that are always 1.0

fixes bug rust-lang#90429
@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-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 Jan 28, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 28, 2025

📌 Commit 9a192b2 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 Jan 28, 2025
@bors
Copy link
Contributor

bors commented Jan 28, 2025

⌛ Testing commit 9a192b2 with merge fdd1a3b...

@bors
Copy link
Contributor

bors commented Jan 28, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 28, 2025
@bors bors merged commit fdd1a3b into rust-lang:master Jan 28, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 28, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#133151 Trim extra whitespace in fn ptr suggestion span 93c2c03916d98677da55d6befdebea7557c18c7a (link)
#133829 Implement AtomicT::update & AtomicT::try_update a88bb5b0c4c03e32ba76f172bdf7152b029bf3b1 (link)
#135367 Enable unreachable_pub lint in alloc cfb91884481dfe04e596629bb4754f3f50608a8a (link)
#135748 Lower index bounds checking to PtrMetadata, this time wit… b1ba7742813297d6f858eca03b84d41e6d67c6b4 (link)
#135805 Add missing allocator safety in alloc crate 28363945765e40c6ee8f881feb0ea278207d9056 (link)
#135886 Document purpose of closure in from_fn.rs more clearly 1f424b2f6f8436750571662a3637363db7de479f (link)
#135961 Fix 2/4 tests skipped by opt-dist 5fa0022a1ba5764f0eda6c40e3540648f5d57cd8 (link)
#136012 Document powf and powi values that are always 1.0 3b0743e7d9b1d27a5fdb24d1446dbb923518a490 (link)

previous master: aa6f5ab18e

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

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.7% [0.2%, 1.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.8%, -0.4%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.1%, secondary -2.3%)

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)
2.6% [1.0%, 5.8%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.0% [-5.2%, -4.7%] 2
Improvements ✅
(secondary)
-2.3% [-2.9%, -1.7%] 2
All ❌✅ (primary) 0.1% [-5.2%, 5.8%] 6

Cycles

Results (primary 2.9%)

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)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [2.9%, 2.9%] 1

Binary size

Results (primary -0.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.1% [0.0%, 0.5%] 14
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.4%, -0.0%] 15
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-0.4%, 0.5%] 29

Bootstrap: 773.088s -> 772.605s (-0.06%)
Artifact size: 328.30 MiB -> 328.25 MiB (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Jan 28, 2025
@rylev
Copy link
Member

rylev commented Feb 4, 2025

Regressions are all in secondary benchmarks and the overall impact is a wash.

@rustbot label +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Feb 4, 2025
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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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-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.