Skip to content

Rollup of 8 pull requests #139938

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

Merged
merged 20 commits into from
Apr 17, 2025
Merged

Rollup of 8 pull requests #139938

merged 20 commits into from
Apr 17, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

petrochenkov and others added 20 commits March 31, 2025 15:41
The former is just too long, see the examples in `hygiene.rs`
Some `unwrap` uses here, but they are on paths involving item kinds that
are known to have an identifier.
Again by using `Option<Symbol>` to represent "no name".
`sym::dummy` also appears to work.
It's a much better name, more consistent with how we name such things.

Also rename `Lifetime::res` as `Lifetime::kind` to match. I suspect this
field used to have the type `LifetimeRes` and then the type was changed
but the field name remained the same.
Type ascription syntax was removed in 2023.
hygiene: Rename semi-transparent to semi-opaque

"Semi-transparent" is just too damn long for a name, especially when used multiple times on a single line, it bothered me when working on rust-lang#139083.

An optimist sees a macro as semi-opaque, a pessimist sees it as semi-transparent.
Or is it the other way round?
Use a session counter to make anon dep nodes unique

This changes the unique session hash used to ensure unique anon dep nodes per session from a timestamp to a counter.

This is nicer for debugging as it makes the dep graph deterministic.
Fix `register_group_alias` for tools

In clippy we're looking at renaming `clippy::all` and registering an alias for it but currently that doesn't work for tools

The `lint_ids` of the alias are now populated at the time of registration to make it easier to handle
…=BoxyUwU

Rename `LifetimeName` as `LifetimeKind`.

It's a much better name, more consistent with how we name such things.

Also rename `Lifetime::res` as `Lifetime::kind` to match. I suspect this field used to have the type `LifetimeRes` and then the type was changed but the field name remained the same.

r? ``@BoxyUwU``
…illaumeGomez

Remove `kw::Empty` uses in rustdoc

Helps with rust-lang#137978.

r? ``@GuillaumeGomez``
Include optional dso_local marker for functions in `enum-match.rs`

This PR adds the `dso_local` marker to the `enum-match.rs` test annotations for all the `match\d+` functions. These markers are added by LLVM when targeting `aarch64-unknown-none` even though they are missing in `aarch64-unknown-linux-gnu`. This is causing a CI error when running the codegen suite on the `aarch64-unknown-none` target for ferrocene.

r? ``@scottmcm``
parser: Remove old diagnostic notes for type ascription syntax

Type ascription syntax was removed by rust-lang#109128 in 2023, so “remove this again in a few months” is long overdue.

Happily, this also reduces the amount of parser diagnostic code that cares whether the compiler is unstable.

---

See also the recent rust-lang#138898, which removed some other related dead code but declined to touch the diagnostics.

It's possible that some of these parser tests are no longer useful at all, but I haven't investigated them for this PR.
…onszelmann

fix for multiple `#[repr(align(N))]` on functions

tracking issue: rust-lang#82232
fixes rust-lang#132464

The behavior of align is specified at https://doc.rust-lang.org/reference/type-layout.html#r-layout.repr.alignment.align

> For align, if the specified alignment is less than the alignment of the type without the align modifier, then the alignment is unaffected.

So in effect that means that the maximum of the specified alignments should be chosen. That is also the current behavior for `align` on ADTs:

```rust
#![feature(fn_align)]

#[repr(C,  align(32), align(64))]
struct Foo {
    x: u64,
}

const _: () = assert!(core::mem::align_of::<Foo>() == 64);

// See the godbolt LLVM output: the alignment of this function is 32
#[no_mangle]
#[repr(align(32))]
#[repr(align(64))]
fn foo() {}

// The current logic just picks the first alignment: the alignment of this function is 64
#[no_mangle]
#[repr(align(64))]
#[repr(align(32))]
fn bar() {}
```

https://godbolt.org/z/scco435jE

https://github.com/rust-lang/rust/blob/afa859f8121bf2985362a2c8414dc71a825ccf2d/compiler/rustc_middle/src/ty/mod.rs#L1529-L1532

The rust-lang#132464 issue is really about parsing/representing the attribute, which has already been improved and now uses the "parse, don't validate" attribute approach. That means the behavior is already different from what the issue describes: on current `main`, the first value is chosen. This PR fixes a logic error, where we just did not check for the effect of two or more `align` modifiers. In combination, that fixes the issue.

cc ``@jdonszelmann`` if you do have further thoughs here
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Apr 16, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 16, 2025

📌 Commit cbe469a 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 Apr 16, 2025
@bors
Copy link
Collaborator

bors commented Apr 17, 2025

⌛ Testing commit cbe469a with merge 79a272c...

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 17, 2025
@bors bors merged commit 79a272c into rust-lang:master Apr 17, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 17, 2025
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3920514 (parent) -> 79a272c (this PR)

Test differences

Show 20 test diffs

20 doctest diffs were found. These are ignored, as they are noisy.

Job duration changes

  1. x86_64-apple-1: 11502.5s -> 8603.9s (-25.2%)
  2. dist-apple-various: 7346.9s -> 8643.1s (17.6%)
  3. dist-aarch64-apple: 4824.0s -> 5215.7s (8.1%)
  4. x86_64-gnu-llvm-19-2: 5986.8s -> 6429.5s (7.4%)
  5. x86_64-apple-2: 5918.9s -> 5514.7s (-6.8%)
  6. dist-aarch64-msvc: 8404.5s -> 8952.1s (6.5%)
  7. dist-x86_64-apple: 9616.5s -> 9045.6s (-5.9%)
  8. dist-powerpc64-linux: 5730.5s -> 5391.7s (-5.9%)
  9. dist-aarch64-linux: 5212.1s -> 5515.1s (5.8%)
  10. x86_64-gnu: 6174.3s -> 6488.5s (5.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139084 hygiene: Rename semi-transparent to semi-opaque f40cf9d1301e9b024f53f7d256d9feb4c1869587 (link)
#139236 Use a session counter to make anon dep nodes unique d89ba2b47066b8694c013b91a7327636c070e7c7 (link)
#139650 Fix register_group_alias for tools 69a5d07c7bc0b7840f8b95521a00fa6b36c996c5 (link)
#139770 Rename LifetimeName as LifetimeKind. de4eaf33f24bb527fce96812dba4b1ed1c9c9ad3 (link)
#139846 Remove kw::Empty uses in rustdoc 40a331dbd37354180e558be771edcb79bf2588ca (link)
#139891 Include optional dso_local marker for functions in `enum-ma… 1c320cbe5d59375161ba5a52aa7e26a640df1ed0 (link)
#139908 parser: Remove old diagnostic notes for type ascription syn… f5cf77f5ba1fa70698f5ce8e8a4099476c69a2eb (link)
#139917 fix for multiple #[repr(align(N))] on functions 3d5dfd185fbec1d95e9349c7b54c6b299d183ad0 (link)

previous master: 3920514036

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 (79a272c): 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%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.4%, secondary -5.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.8% [0.4%, 3.0%] 10
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.0% [-1.3%, -0.7%] 3
Improvements ✅
(secondary)
-5.0% [-5.0%, -5.0%] 1
All ❌✅ (primary) 0.4% [-1.3%, 3.0%] 13

Cycles

Results (primary -0.4%)

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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.7%, -0.4%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-0.7%, 0.5%] 6

Binary size

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

Bootstrap: 776.256s -> 773.538s (-0.35%)
Artifact size: 364.80 MiB -> 364.77 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.