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 #114569

Merged
merged 26 commits into from
Aug 7, 2023
Merged

Rollup of 8 pull requests #114569

merged 26 commits into from
Aug 7, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Enselic and others added 26 commits July 26, 2023 14:58
In the basic case, simply do the string substitution.
For one case with many instances, capture the Itanium-
mangled filename and assert its reuse instead.
We raised our LLVM minimum to 15, so these tests seem pointless.
The test fails on Windows with the diff

    -  = help: to create the module `unknown`, create file "unknown.rs" or "unknown/mod.rs"
    +  = help: to create the module `unknown`, create file "unknown.rs" or "unknown\mod.rs"

There is no need to run this test on Windows, so ignore it.
Only a single example is given
Only one example is given
Co-authored-by: Ralf Jung <post@ralfj.de>
…imulacrum

Implement `Option::take_if`

Tracking issue: rust-lang#98934
ACP: rust-lang/libs-team#70 [accepted]
…Simulacrum

Add regression test for `echo 'mod unknown;' | rustc -`

Closes rust-lang#65601

The bug is fixed since long ago, probably by rust-lang#69838 (see rust-lang#65601 (comment) for more details).
Add a regression test so we can close the issue.
… r=Mark-Simulacrum

Nest tests/codegen/sanitizer*.rs tests in sanitizer dir

The sanitizer tests are the largest and most meticulously tested set of tests in tests/codegen. That's good! They all clearly belong to a subject and thus could go in a directory, but are not, instead being placed simply in tests/codegen. That's bad! Fix this by placing them in their own directory and renaming them to be less repetitive after that move.

A few tests are brittle, and embed their filename in the test's checks. This is acceptable for the ones where it is used only two times, but one test embeds the test's mangled filename in the test *over 50 times*! This may have been one of the things discouraging anyone from moving it, and thus from moving the set. Fortunately, I have some knowledge of Itanium mangling (involuntarily), regex, and the FileCheck syntax. With a capturing variable, FileCheck allows us to now move this test around again without diffing it on ~50 lines, while still guaranteeing that the mangled substring is the same each time.

This also clarifies why the substring is repeated a zillion times, instead of being cryptic. They don't call it mangling because the result is pretty and easy to understand, but now it is slightly easier! Yay descriptive variables!
…nest, r=Mark-Simulacrum

Nest other codegen test topics

This PR is like rust-lang#114229 in that it mostly pushes codegen tests around, shoving them into their own directories, but because all of the changes are very simple cleanups I pulled them into a separate PR. The other PR might involve actually evaluating the correctness of the test after changes, but here it is mostly a matter of taste. The only "functional" change is deleting a few tests that... hinge on a version of LLVM that we don't support (as of rust-lang#114148 anyways).

I considered a few different ways to group other topics but I feel the question of whether `tests/codegen/{vec,array,slice}` should exist is more subtle than these choices, as it might be better to group such related tests by other topics like bounds check elision, thus I avoided making it.
string.rs: remove "Basic usage" text

Only a single example is given
str.rs: remove "Basic usage" text

Only one example is given
…r=cjgillot

Add a new `compare_bytes` intrinsic instead of calling `memcmp` directly

As discussed in rust-lang#113435, this lets the backends be the place that can have the "don't call the function if n == 0" logic, if it's needed for the target.  (I didn't actually *add* those checks, though, since as I understood it we didn't actually need them on known targets?)

Doing this also let me make it `const` (unstable), which I don't think `extern "C" fn memcmp` can be.

cc `@RalfJung` `@Amanieu`
…art, r=petrochenkov

Style fix and refactor on resolve diagnostics

- coding style
- refactor api of `span_look_ahead`
@rustbot rustbot added 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 Aug 7, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Aug 7, 2023

📌 Commit d804b74 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 Aug 7, 2023
@bors
Copy link
Contributor

bors commented Aug 7, 2023

⌛ Testing commit d804b74 with merge 4a71a05...

@bors
Copy link
Contributor

bors commented Aug 7, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 7, 2023
@bors bors merged commit 4a71a05 into rust-lang:master Aug 7, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 7, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#98935 Implement Option::take_if 03a10c81437813fae7bcac4ef20ff1463142c000 (link)
#114093 Add regression test for `echo 'mod unknown;' rustc -`
#114229 Nest tests/codegen/sanitizer*.rs tests in sanitizer dir a5d4b1b34418a3ae112310fa5d976506bae9ceba (link)
#114230 Nest other codegen test topics 4b5f6d1d92d2574f6a876979c861ffb40ef7b484 (link)
#114362 string.rs: remove "Basic usage" text 52191709791aa2e15917ecb3b34b970475b894d3 (link)
#114365 str.rs: remove "Basic usage" text fba9e9a4f2241f2ca359e28b15a00146f81d1614 (link)
#114382 Add a new compare_bytes intrinsic instead of calling `mem… fe1f55794908c6575de77aa5212d56cf407d4b71 (link)
#114549 Style fix and refactor on resolve diagnostics 72f09e182bc0361e097398eddcd2b685988c5a57 (link)

previous master: 9fca8e7517

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

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

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)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
2.5% [1.0%, 3.6%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-4.8%, -2.3%] 4
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Cycles

Results

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)
4.7% [3.0%, 5.7%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 651.653s -> 652.367s (0.11%)

@matthiaskrgr matthiaskrgr deleted the rollup-p8tcxtz branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-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.

10 participants