Skip to content

Rollup of 15 pull requests #132555

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 35 commits into from
Nov 3, 2024
Merged

Rollup of 15 pull requests #132555

merged 35 commits into from
Nov 3, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

rick-de-water and others added 30 commits October 8, 2024 12:09
Mark the new fmt impls with the correct rust version

Clean up the fmt macro and format the tests
The output of `rustc -C help` generally has one option per line. There was one
exception because of a (presumably) forgotten line continuation escape.
As with ab5583e, we had been explicitly
passing defaults whose type have changed. Rather than do an ifdef, we
simply rely on the defaults.

@rustbot label: +llvm-main
…lnay

Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`

ACP: rust-lang/libs-team#424

New API:

```rust
impl<T: Clone> From<&mut [T]> for Box<[T]>
impl From<&mut str> for Box<str>
impl From<&mut CStr> for Box<CStr>
impl From<&mut OsStr> for Box<OsStr>
impl From<&mut Path> for Box<Path>

impl<T: Clone> From<&mut [T]> for Rc<[T]>
impl From<&mut str> for Rc<str>
impl From<&mut CStr> for Rc<CStr>
impl From<&mut OsStr> for Rc<OsStr>
impl From<&mut Path> for Rc<Path>

impl<T: Clone> From<&mut [T]> for Arc<[T]>
impl From<&mut str> for Arc<str>
impl From<&mut CStr> for Arc<CStr>
impl From<&mut OsStr> for Arc<OsStr>
impl From<&mut Path> for Arc<Path>
```

Since they are trait implementations, I think these are insta-stable.

As mentioned in rust-lang/libs-team#424 (comment), a crater run might be needed.
Add LowerExp and UpperExp implementations to NonZero

Adds `LowerExp` and `UpperExp` trait implementations to `NonZero`, as discussed in rust-lang/libs-team#458.

I had to modify the macro to mark the new impls with a different rust version. Let me know if this is the right way to do it (first timer here!)
…ss35

Docs: added brief colon explanation

rust-lang#131865
(this is my first attempt at contributing, feedback is welcome)
…r=jieyouxu

coverage: Regression test for inlining into an uninstrumented crate

Regression test for rust-lang#132395, after I was able to figure out a simple way to reproduce it. See also rust-lang#132436.

In addition to confirming that there is no ICE, this test also demonstrates that the affected code is undercounted, because executing the inlined copy doesn't increment coverage counters.
unicode_data.rs: show command for generating file

rust-lang#131647 made this an easily runnable tool, now we just have to mention that in the comment. :)

Fixes rust-lang#131640.
better test for const HashMap; remove const_hash leftovers

The existing `const_with_hasher` test is kind of silly since the HashMap it constructs can never contain any elements. So this adjusts the test to construct a usable HashMap, which is a bit non-trivial since the default hash builder cannot be built in `const`. `BuildHasherDefault::new()` helps but is unstable (rust-lang#123197), so we also have a test that does not involve that type.

The second commit removes the last remnants of rust-lang#104061, since they aren't actually useful -- without const traits, you can't do any hashing in `const`.

Cc ``@rust-lang/libs-api`` ``@rust-lang/wg-const-eval``
Closes rust-lang#104061
Related to rust-lang#102575
…=dtolnay

stabilize const_arguments_as_str

FCP passed in the [tracking issue](rust-lang#103900 (comment)).
NFC add known bug nr to test

r? ```````@jieyouxu```````
…r=compiler-errors

make codegen help output more consistent

The output of `rustc -C help` generally has one option per line. There was one exception because of a (presumably) forgotten line continuation escape.
…ompiler-errors

Added regression test for generics index out of bounds

Added a regression test for  rust-lang#117446
This ICE was fixed in Rust 1.75 but a regression test was never added.

This PR adds a UI test with a reduced version of the original bug report that does not rely on external crates.
… r=jieyouxu

Use `*_opt` typeck results fns to not ICE in fallback suggestion

Self-explanatory. Fixes rust-lang#132517.
PassWrapper: adapt for llvm/llvm-project@5445edb5d

As with ab5583e, we had been explicitly passing defaults whose type have changed. Rather than do an ifdef, we simply rely on the defaults.

````@rustbot```` label: +llvm-main
Do not format generic consts

We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items.

r? `````@calebcartwright````` or `````@ytmimi`````
…orrowck-for-mono-sans, r=compiler-errors

compiler: Continue introducing rustc_abi to the compiler

Some crates have not heard of rustc_abi before, so arrange introductions.

Encourage some crates to go further and leave rustc_target behind: it was no good for them.
@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 3, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=15

@bors
Copy link
Collaborator

bors commented Nov 3, 2024

📌 Commit 1ba782a 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 Nov 3, 2024
@bors
Copy link
Collaborator

bors commented Nov 3, 2024

⌛ Testing commit 1ba782a with merge 7028d93...

@bors
Copy link
Collaborator

bors commented Nov 3, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 3, 2024
@bors bors merged commit 7028d93 into rust-lang:master Nov 3, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 3, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#129329 Implement From<&mut {slice}> for Box/Rc/Arc<{slice}> 78e747f14e15d82c5a2a90e9d608256998405454 (link)
#131377 Add LowerExp and UpperExp implementations to NonZero b3ff51e555aff20c3cd5ef255afbf1693580c105 (link)
#132393 Docs: added brief colon explanation fe0956640dac980246bff408eba939bde5f1b01f (link)
#132437 coverage: Regression test for inlining into an uninstrument… 885b6a2a1b104f55a58b067bd71dcca017b84624 (link)
#132499 unicode_data.rs: show command for generating file f7c6949254ad3de304010f5817f955541e64f3d5 (link)
#132503 better test for const HashMap; remove const_hash leftovers 8498263620e6ab98823f889e6584f00379f94904 (link)
#132511 stabilize const_arguments_as_str 46e9bf79a0e3eac06372f919739b5a4c12323333 (link)
#132520 NFC add known bug nr to test d75392152ef44f66ff53e9ce8e38d3c3e554071b (link)
#132522 make codegen help output more consistent cfa09d48872e69b92479c9d1bd4b6e40b3b8856b (link)
#132523 Added regression test for generics index out of bounds 0b90901a86146bac40e2b535f9e28fc65151ad19 (link)
#132528 Use *_opt typeck results fns to not ICE in fallback sugge… 182729eeb3cc2521a9583d686c90bcadf1eecdee (link)
#132537 PassWrapper: adapt for llvm/llvm-project@5445edb5d a7405c02f649cbe5c27b7f7628922c838fdd8a38 (link)
#132540 Do not format generic consts 96e208e9a30b1ce65884198ef11ef2c9e3a72925 (link)
#132543 add and update some crashtests 5a1f02d7b48a1bd60703c6684be0287c7c9d322c (link)
#132550 compiler: Continue introducing rustc_abi to the compiler 6b7d205f7bcfc6e2ec5ad4a83836a9f0991de580 (link)

previous master: 59ae5eba7e

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 (7028d93): 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.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -3.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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.2%] 2
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.4%, secondary -2.1%)

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)
0.7% [0.7%, 0.7%] 1
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-2.5% [-3.1%, -1.9%] 8
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Binary size

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

Bootstrap: 779.022s -> 780.556s (0.20%)
Artifact size: 335.35 MiB -> 335.29 MiB (-0.02%)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.