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

Merged
merged 25 commits into from
Oct 16, 2024
Merged

Rollup of 9 pull requests #131797

merged 25 commits into from
Oct 16, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GuillaumeGomez and others added 25 commits October 14, 2024 17:51
Two macros are exactly the same.
It is possible to link libunwind and use the normal backtrace code, but it fails
to symbolize stack traces. I investigated and could get the list of instruction
pointers and symbol names, but I'm not sure how to use the dwarf info to map
from instruction pointer to source location. In any case, fixing this is
probably not a high priority.

See rust-lang#131738
…stebank

Don't check unsize goal in MIR validation when opaques remain

Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes rust-lang#130921.
… r=ytmimi

Rustfmt `for<'a> async` correctly

In rust-lang#127054, we decided to move the trait bound modifier for `async for<'a> Fn()`  to `for<'a> async Fn()`. This wasn't adjusted in rustfmt, so this PR implements that. It also requires consolidating the bound formatting into the `Rewrite` impl for `PolyTraitRef`.

Fixes rust-lang#131649
…er-out-2, r=notriddle

Delay ambiguous intra-doc link resolution after `Cache` has been populated

Fixes rust-lang#130233.

I was getting nowhere with rust-lang#130278. I took a wrong turn at some point and ended making way too many changes so instead I started again back from 0 and this time it worked out as expected.

r? ```@notriddle```
Refactor some `core::fmt` macros

While looking at the macros in `core::fmt`, find that the macros are not well organized. So I created a patch to fix it.

[`core/src/fmt/num.rs`](https://github.com/rust-lang/rust/blob/master/library/core/src/fmt/num.rs)
*  `impl_int!` and `impl_uint!` macro are **completly** same. It would be better to combine for readability
* `impl_int!` has a problem that the indenting is not uniform. It has unified into 4 spaces
* `debug` macro in `num` renamed to `impl_Debug`, And it was moved to a position close to the `impl_Display`.

[`core/src/fmt/float.rs`](https://github.com/rust-lang/rust/blob/master/library/core/src/fmt/float.rs)
[`core/src/fmt/nofloat.rs`](https://github.com/rust-lang/rust/blob/master/library/core/src/fmt/nofloat.rs)
* `floating` macro now receive multiple idents at once. It makes the code cleaner.
* Modified the panic message more clearly in fallback function of `cfg(no_fp_fmt_parse)`
…ve, r=lcnr

Rename `can_coerce` to `may_coerce`, and then structurally resolve correctly in the probe

We need to structurally resolve the lhs and rhs of the coercion. Also, renaming the method so it's less ambiguous about what it's doing... the word "may" gives more clear signal that it has false positives imo.

r? lcnr
…jieyouxu

Unify `secondary_span` and `swap_secondary_and_primary` args in `note_type_err`

Tiny tweak b/c working w `note_type_err` is kinda a mess.
…e-tests, r=jieyouxu

Emscripten: Xfail backtrace ui tests

It is possible to link libunwind and use the normal backtrace code, but it fails to symbolize stack traces. I investigated and could get the list of instruction pointers and symbol names, but I'm not sure how to use the dwarf info to map from instruction pointer to source location. In any case, fixing this is not a high priority.

See rust-lang#131738

r?jieyouxu
…s_by_ref, r=jieyouxu

Fix trivially_copy_pass_by_ref in stable_mir

Hi,

This PR fixes the following clippy warnings

```
warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
    --> compiler/stable_mir/src/mir/body.rs:1042:34
     |
1042 |     fn subslice_ty(ty: Ty, from: &u64, to: &u64, from_end: &bool) -> Result<Ty, Error> {
     |                                  ^^^^ help: consider passing by value instead: `u64`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
     = note: requested on the command line with `-W clippy::trivially-copy-pass-by-ref`

warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
    --> compiler/stable_mir/src/mir/body.rs:1042:44
     |
1042 |     fn subslice_ty(ty: Ty, from: &u64, to: &u64, from_end: &bool) -> Result<Ty, Error> {
     |                                            ^^^^ help: consider passing by value instead: `u64`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
    --> compiler/stable_mir/src/mir/body.rs:1042:60
     |
1042 |     fn subslice_ty(ty: Ty, from: &u64, to: &u64, from_end: &bool) -> Result<Ty, Error> {
     |                                                            ^^^^^ help: consider passing by value instead: `bool`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

```

Best regards,
Michal
…, r=jieyouxu

Fix needless_lifetimes in stable_mir

Hi,

This PR fixes the following clippy warning

```
warning: the following explicit lifetimes could be elided: 'a
   --> compiler/stable_mir/src/mir/visit.rs:490:6
    |
490 | impl<'a> PlaceRef<'a> {
    |      ^^           ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
490 - impl<'a> PlaceRef<'a> {
490 + impl PlaceRef<'_> {
    |
```

Best regards,
Michal
@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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Oct 16, 2024
@rustbot rustbot added the rollup A PR which is a rollup label Oct 16, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Oct 16, 2024

📌 Commit 50e93bc 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 Oct 16, 2024
@bors
Copy link
Contributor

bors commented Oct 16, 2024

⌛ Testing commit 50e93bc with merge 798fb83...

@bors
Copy link
Contributor

bors commented Oct 16, 2024

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#130989 Don't check unsize goal in MIR validation when opaques rema… 9e4e1e194f8903373462f51652cca03ec598941f (link)
#131657 Rustfmt for<'a> async correctly 2d85fe3842384e1da8be37bdc5854e3b17f51dc0 (link)
#131691 Delay ambiguous intra-doc link resolution after Cache has… a7c9c64d56c8f310aaec8e682e0f3777008d14d3 (link)
#131730 Refactor some core::fmt macros 8b2a52e982d5cd29e6f43a5fa0e80827f41456f7 (link)
#131751 Rename can_coerce to may_coerce, and then structurally … 31a5381ad1858e64a33b81af03dd98eeca9b035c (link)
#131753 Unify secondary_span and swap_secondary_and_primary arg… 8bd00af432476ce75b52f4354d5af421614bdd80 (link)
#131776 Emscripten: Xfail backtrace ui tests 9775c171735682caee89142fb5a1dce0660e8303 (link)
#131777 Fix trivially_copy_pass_by_ref in stable_mir e03d76475981317985fe71fc915ce9d1f5c6a31e (link)
#131778 Fix needless_lifetimes in stable_mir b2b85b2bbca01778e7eedeb3672e5f413dcad014 (link)

previous master: 7342830c05

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 (798fb83): 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 -1.3%, secondary 2.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)
- - 0
Regressions ❌
(secondary)
2.2% [1.7%, 2.8%] 2
Improvements ✅
(primary)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.3% [-1.3%, -1.3%] 1

Cycles

Results (primary -1.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)
-1.3% [-2.1%, -1.0%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.3% [-2.1%, -1.0%] 4

Binary size

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

Bootstrap: 783.603s -> 781.752s (-0.24%)
Artifact size: 333.73 MiB -> 333.73 MiB (0.00%)

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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants