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 9 pull requests #136350

Merged
merged 32 commits into from
Jan 31, 2025
Merged

Rollup of 9 pull requests #136350

merged 32 commits into from
Jan 31, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

madsmtm and others added 30 commits January 24, 2025 14:40
Both the target tier policy and the rustc-dev-guide has documentation on
this, let's make sure people see both.
Three rules can be combined into one. I based this change on the
definition of `print!`.
This makes it possible to start incrementally replacing our debuginfo bindings
with the ones in the LLVM-C API, all of which operate on `LLVMDIBuilderRef`.
If we're already churning all of the debuginfo bindings, we might as well fix
this at the same time.
Explaining things that weren't clear to me at first.
They were downgraded from queries in rust-lang#123995 but they can just be
vanilla functions because they are not called in `rustc_middle`.
It was downgraded from a query in rust-lang#122721 but it can just be a vanilla
function because it's not called in `rustc_middle`.
It's a function that does stuff with MIR and yet it weirdly has its own
module in `rustc_middle::util`. This commit moves it into
`rustc_middle::mir`, a more sensible home.
They're only used within the crate.
It's a function that prints numbers with underscores inserted for
readability (e.g. "1_234_567"), used by `-Zmeta-stats` and
`-Zinput-stats`. It's the only thing in `rustc_middle::util::common`,
which is a bizarre location for it.

This commit:
- moves it to `rustc_data_structures`, a more logical crate for it;
- puts it in a module `thousands`, like the similar crates.io crate;
- renames it `format_with_underscores`, which is a clearer name;
- rewrites it to be more concise;
- slightly improves the testing.
Co-Authored-By: Jieyou Xu <jieyouxu@outlook.com>
…=notriddle,aDotInTheVoid

[rustdoc] Add `--extract-doctests` command-line flag

Part of rust-lang#134529.

It was discussed with the Rust-for-Linux project recently that they needed a way to extract doctests so they can modify them and then run them more easily (look for "a way to extract doctests" [here](Rust-for-Linux/linux#2)).

For now, I output most of `ScrapedDoctest` fields in JSON format with `serde_json`. So it outputs the following information:

 * filename
 * line
 * langstr
 * text

cc `@ojeda`
r? `@notriddle`
…mpat-ii, r=jieyouxu

Compiler: Finalize dyn compatibility renaming

Update the Reference link to use the new URL fragment from rust-lang/reference#1666 (this change has finally hit stable). Fixes a FIXME.

Follow-up to rust-lang#130826.
Part of rust-lang#130852.

~~Blocking it on rust-lang#133372.~~ (merged)

r? ghost
Improve documentation when adding a new target

rust-lang#133631 (comment) shows that it can be a bit difficult process-wise to add a new target.

I've added a bit of text to the docs, suggesting that users add the target defintion/spec first, and later work on `std` support.

I also found that we have two places where we document how to add a new target. I've linked these for now, but they should probably be merged somehow in the future.

`@rustbot` label A-docs
r? compiler
CC `@workingjubilee` who's worked a lot on target specs IIRC.
Support clobber_abi in BPF inline assembly

This supports [`clobber_abi`](https://doc.rust-lang.org/nightly/reference/inline-assembly.html#abi-clobbers) which is one of the requirements of stabilization mentioned in the tracking Issue for `asm_experimental_arch` (rust-lang#93335).

Refs: [Section 1.1 "Registers and calling convention" in BPF ABI Recommended Conventions and Guidelines v1.0](https://github.com/torvalds/linux/blob/v6.13/Documentation/bpf/standardization/abi.rst#11registers-and-calling-convention)
> R0 - R5 are scratch registers and BPF programs needs to spill/fill them if necessary across calls.

cc `@alessandrod` `@dave-tucker` `@tamird` `@vadorovsky` (target maintainers mentioned in platform support document which will be added by rust-lang#135107)

r? `@Amanieu`

`@rustbot` label +O-eBPF +A-inline-assembly
…Jung

Delay a bug when indexing unsized slices

Fixes rust-lang#136298

r? RalfJung or reassign
Replace our `LLVMRustDIBuilderRef` with LLVM-C's `LLVMDIBuilderRef`

Inspired by trying to split rust-lang#134009 into smaller steps that are easier to review individually.

This makes it possible to start incrementally replacing our debuginfo bindings with the ones in the LLVM-C API, all of which operate on `LLVMDIBuilderRef`.

There should be no change to compiler behaviour.
…r=oli-obk

Remove unnecessary hooks

Some hooks can be downgraded to vanilla functions.

r? `@oli-obk`
…util, r=jieyouxu

Overhaul `rustc_middle::util`

It's an odd module with some odd stuff in it.

r? `@Noratrieb`
Remove myself from vacation

r? `@ghost`
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 31, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 31, 2025

📌 Commit fb67f3a 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 31, 2025
@bors
Copy link
Contributor

bors commented Jan 31, 2025

⌛ Testing commit fb67f3a with merge 51869dc...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 31, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#134531 ([rustdoc] Add `--extract-doctests` command-line flag)
 - rust-lang#135860 (Compiler: Finalize dyn compatibility renaming)
 - rust-lang#135992 (Improve documentation when adding a new target)
 - rust-lang#136194 (Support clobber_abi in BPF inline assembly)
 - rust-lang#136325 (Delay a bug when indexing unsized slices)
 - rust-lang#136326 (Replace our `LLVMRustDIBuilderRef` with LLVM-C's `LLVMDIBuilderRef`)
 - rust-lang#136330 (Remove unnecessary hooks)
 - rust-lang#136336 (Overhaul `rustc_middle::util`)
 - rust-lang#136341 (Remove myself from vacation)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Jan 31, 2025

💔 Test failed - checks-actions

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

@bors retry

@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 31, 2025
@bors
Copy link
Contributor

bors commented Jan 31, 2025

⌛ Testing commit fb67f3a with merge 854f225...

@bors
Copy link
Contributor

bors commented Jan 31, 2025

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134531 [rustdoc] Add --extract-doctests command-line flag c28c87fadf27f80e303929597a15c8ce3c93fc79 (link)
#135860 Compiler: Finalize dyn compatibility renaming 258803ddecf7f75954befe1f8bb80d2fe645d670 (link)
#135992 Improve documentation when adding a new target a67c995d705fafc17a6ab3251348b511c3003a37 (link)
#136194 Support clobber_abi in BPF inline assembly 8a8fc0fe7e364a827838f98464c9cf4d8c485769 (link)
#136325 Delay a bug when indexing unsized slices 875d51649a8cd251d278ea4fa8887105720c73cb (link)
#136326 Replace our LLVMRustDIBuilderRef with LLVM-C's `LLVMDIBui… e38d9557a708d136fdfd901b8e44636cbfe07ae4 (link)
#136330 Remove unnecessary hooks eb055600bf8a9e196c4f5100f7c64c45d1cbb975 (link)
#136336 Overhaul rustc_middle::util ba29372b27888812b8ed1eb47a3d14c5733e9868 (link)
#136341 Remove myself from vacation 05f1f6414fea7770061f0faaea55cc63b542240c (link)

previous master: aa4cfd0809

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 (854f225): 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 (primary 3.2%)

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

Cycles

Results (primary 1.0%, 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)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
2.3% [2.0%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [1.0%, 1.0%] 1

Binary size

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

Bootstrap: 777.108s -> 779.222s (0.27%)
Artifact size: 328.80 MiB -> 328.75 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.