Skip to content

Rollup of 9 pull requests #130473

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 29 commits into from
Sep 17, 2024
Merged

Rollup of 9 pull requests #130473

merged 29 commits into from
Sep 17, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GKFX and others added 29 commits August 11, 2024 09:10
This clarifies possible outputs the constants might be.
This allows a third-party tool to injects its own resources,
when receiving the config via `rustc_driver::Callbacks::config`.
This makes it much clearer which things are used outside the crate.
Reflow overly long comments, plus some minor whitespace improvements.
Because `bx` contains a `cx`.
`'mir` is not a good lifetime name in `LocalAnalyzer`, because it's used
on two unrelated fields. `'a` is more standard for a situation like this
(e.g. rust-lang#130022).
Format `std::env::consts` docstrings with markdown backticks

This clarifies possible outputs the constants might be.

**Before:**
--
<img src="https://github.com/user-attachments/assets/8ee8772a-7562-42a2-89be-f8772b76dbd5" width="500px">

**After:**
--
<img src="https://github.com/user-attachments/assets/4632e5e2-db3e-4372-b13e-006cc1701eb1" width="500px">
…option, r=jieyouxu

Fix rust-lang#128930: Print documentation of CLI options missing their arg

Fix rust-lang#128930. Failing to give an argument to CLI options which require it now prints something like:
```
$ rustc --print
error: Argument to option 'print' missing
       Usage:
           --print [crate-name|file-names|sysroot|target-libdir|cfg|check-cfg|calling-conventions|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|all-target-specs-json|native-static-libs|stack-protector-strategies|link-args|deployment-target]
                               Compiler information to print on stdout
```
…rces, r=davidtwco

Use `Vec` in `rustc_interface::Config::locale_resources`

This allows a third-party tool to injects its own resources, when receiving the config via `rustc_driver::Callbacks::config`.
…body, r=lcnr

Encode `coroutine_by_move_body_def_id` in crate metadata

We synthesize the MIR for a by-move body for the `FnOnce` implementation of async closures. It can be accessed with the `coroutine_by_move_body_def_id` query. We weren't encoding this query in the metadata though, nor were we properly recording that synthetic MIR in `mir_keys`, so the `optimized_mir` wasn't getting encoded either!

Stacked on top is a fix to consider `DefKind::SyntheticCoroutineBody` to return true in several places I missed. Specifically, we should consider the def-kind in `fn DefKind::is_fn_like()`, since that's what we were using to make sure we ensure `query mir_inliner_callees` before the MIR gets stolen for the body. This led to some CI failures that were caught by miri but which I added a test for.
Don't call `extern_crate` when local crate name is the same as a dependency and we have a trait error

rust-lang#124944 implemented logic to point out when a trait bound failure involves a *trait* and *type* who come from identically named but different crates. This logic calls the `extern_crate` query which is not valid on `LOCAL_CRATE` cnum, so let's filter that out eagerly.

Fixes rust-lang#130272
Fixes rust-lang#129184
Use the same precedence for all macro-like exprs

No need to make these have a different precedence since they're all written like `whatever!(expr)`, and it makes it simpler when adding new macro-based built-in operators in the future.
…en, r=jieyouxu

Don't ICE in `opaque_hidden_inferred_bound` lint for RPITIT in trait with no default method body

Inline comment should explain the fix.

Fixes rust-lang#130422
…nups, r=jieyouxu

`rustc_codegen_ssa` cleanups

Just some minor improvements I found while reading through this code.

r? ``@jieyouxu``
…ackh726

Mark `where_clauses_object_safety` as removed

r? lcnr
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 17, 2024
@rustbot rustbot added 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 17, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Collaborator

bors commented Sep 17, 2024

📌 Commit 065690e 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 Sep 17, 2024
@bors
Copy link
Collaborator

bors commented Sep 17, 2024

⌛ Testing commit 065690e with merge f609b7e...

@bors
Copy link
Collaborator

bors commented Sep 17, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 17, 2024
@bors bors merged commit f609b7e into rust-lang:master Sep 17, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 17, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128535 Format std::env::consts docstrings with markdown backticks 16a41bfc7226abbe878422dfbcea3bf52d23c09e (link)
#128961 Fix #128930: Print documentation of CLI options missing the… 1ddb2ef787632e31cddb6ea80f11a6023093d133 (link)
#129988 Use Vec in rustc_interface::Config::locale_resources 61778c52fa5a7b7dac9a1fe046efaf3e7e6d796a (link)
#130201 Encode coroutine_by_move_body_def_id in crate metadata 41a3e06d0e0b1104e4adf3332f8c0876bec14b00 (link)
#130275 Don't call extern_crate when local crate name is the same… 78bceb1997d8182ada10982dbf2dcf7bc58834ec (link)
#130314 Use the same precedence for all macro-like exprs 484242dad1a6393e664854d3f100999f65018ac8 (link)
#130440 Don't ICE in opaque_hidden_inferred_bound lint for RPITIT… c6833fa61ba8b4e26f144e1657a434a9544bf9be (link)
#130458 rustc_codegen_ssa cleanups 16c7f70a667d0dd45aafe2c1228bff76c10623a5 (link)
#130469 Mark where_clauses_object_safety as removed 42ad7a1d166108c4d9159bf3a9c1995420526c7a (link)

previous master: e9e13a68d7

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 (f609b7e): 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 -0.6%, secondary -0.5%)

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.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-3.1%, -1.4%] 2
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 3
All ❌✅ (primary) -0.6% [-3.1%, 2.7%] 3

Cycles

Results (primary -1.0%, secondary 2.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
Regressions ❌
(secondary)
5.6% [5.6%, 5.6%] 1
Improvements ✅
(primary)
-1.0% [-1.3%, -0.8%] 4
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) -1.0% [-1.3%, -0.8%] 4

Binary size

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

Bootstrap: 767.732s -> 767.921s (0.02%)
Artifact size: 341.31 MiB -> 341.23 MiB (-0.03%)

@matthiaskrgr matthiaskrgr deleted the rollup-lf29374 branch January 25, 2025 09:13
# 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. 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. 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.

rustc --print doesn't list valid options
9 participants