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

Merged
merged 26 commits into from
Oct 16, 2024
Merged

Rollup of 8 pull requests #131792

merged 26 commits into from
Oct 16, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Nadrieril and others added 26 commits September 24, 2024 13:45
The lint-non-snake-case-crate test may emit a warning in stderr if the
target does not support unwinding

```
warning: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic
```

Consequently, the test will fail on targets that don't support unwinding
as written.

This change prevents lint-non-snake-case-crate#proc_macro_ from running
on targets that don't support unwind by using the needs-unwind
directive.
…olnay

Add `from_ref` and `from_mut` constructors to `core::ptr::NonNull`.

Relevant tracking issue: rust-lang#130823

The `core::ptr::NonNull` type should have the convenience constructors `from_ref` and `from_mut` for parity with `core::ptr::from_ref` and `core::ptr::from_mut`.

Although the type in question already implements `From<&T>` and `From<&mut T>`, these new functions also carry the ability to be used in constant expressions (due to not being behind a trait).
…pnkfelix

Implement edition 2024 match ergonomics restrictions

This implements the minimalest version of [match ergonomics for edition 2024](https://rust-lang.github.io/rfcs/3627-match-ergonomics-2024.html). This minimal version makes it an error to ever reset the default binding mode. The implemented proposal is described precisely [here](https://hackmd.io/zUqs2ISNQ0Wrnxsa9nhD0Q#RFC-3627-nano), where it is called "RFC 3627-nano".

Rules:
- Rule 1C: When the DBM (default binding mode) is not `move` (whether or not behind a reference), writing `mut`, `ref`, or `ref mut` on a binding is an error.
- Rule 2C: Reference patterns can only match against references in the scrutinee when the DBM is `move`.

This minimal version is forward-compatible with the main proposals for match ergonomics 2024: [RFC3627](https://rust-lang.github.io/rfcs/3627-match-ergonomics-2024.html) itself, the alternative [rule 4-early variant](https://rust-lang.github.io/rfcs/3627-match-ergonomics-2024.html), and [others](https://hackmd.io/zUqs2ISNQ0Wrnxsa9nhD0Q). The idea is to give us more time to iron out a final proposal.

This includes a migration lint that desugars any offending pattern into one that doesn't make use of match ergonomics. Such patterns have identical meaning across editions.

This PR insta-stabilizes the proposed behavior onto edition 2024.

r? `@ghost`

Tracking:

- rust-lang#123076
…pat, r=notriddle

rustdoc: Rename "object safe" to "dyn compatible"

Supersedes rust-lang#126554:

1. In line with [T-lang's latest resolution](rust-lang/lang-team#286 (comment)).
2. More comprehensive: Not only updates user-facing text but also source code.

Part of rust-lang#130852.

Doesn't update rustdoc-JSON (will be filed separately).

r? `@notriddle` (rust-lang/lang-team#286) `@GuillaumeGomez` (for visibility)
Add fast-path when computing the default visibility

This PR adds (or more correctly re-adds the) fast-path when computing the default visibility, by taking advantage of the fact that the "interposable" requested visibility always return the "default" codegen visibility.

Should address the small regression observed in rust-lang#131111 (comment).

r? `@lqd`
…projections, r=lcnr

Try to improve error messages involving aliases in the solver

1. Treat aliases as rigid only if it may not be defined and it's well formed (i.e. for projections, its trait goal is satisfied).
2. Record goals that are related to alias normalization under a new `GoalKind`, so we can look into them in the `BestObligation` visitor.
3. Try to deduplicate errors due to self types of goals that are un-normalizable aliases.

r? lcnr
…te, r=jieyouxu

Ignore lint-non-snake-case-crate#proc_macro_ on targets without unwind

The lint-non-snake-case-crate test may emit a warning in stderr if the target does not support unwinding

```
warning: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic
```

Consequently, the test will fail on targets that don't support unwinding as written.

This change modifies the expected stderr for lint-non-snake-case-crate in the proc_macro_ to ignore lines that indicate a warning was emitted.
…, r=compiler-errors

Fix explicit_iter_loop in rustc_serialize

Hi,

This PR fixes some clippy warnings

```
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
   --> compiler/rustc_serialize/src/serialize.rs:675:18
    |
675 |         for e in self.iter() {
    |                  ^^^^^^^^^^^ help: to write this more concisely, try: `self`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop

```

Best regards,
Michal
@rustbot rustbot added 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 16, 2024
@rustbot rustbot added 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 (-Znext-solver) rollup A PR which is a rollup labels Oct 16, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Oct 16, 2024

📌 Commit 06cd22c 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 06cd22c with merge 7342830...

@bors
Copy link
Contributor

bors commented Oct 16, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 16, 2024
@bors bors merged commit 7342830 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
#130822 Add from_ref and from_mut constructors to `core::ptr::N… e20fa1805f8d6858ac1160988f94d49c4ee712ad (link)
#131381 Implement edition 2024 match ergonomics restrictions 4161829481cc6a741e928e0179426a29b00ac42a (link)
#131594 rustdoc: Rename "object safe" to "dyn compatible" 4332a61f39cbbaa9af743738dae199a2bde51ca9 (link)
#131686 Add fast-path when computing the default visibility 246a99236bfabc837337a6fe99a8f4d0e8a21dc0 (link)
#131699 Try to improve error messages involving aliases in the solv… 0e784abb19becba5c8186fbdedc95364125169a4 (link)
#131757 Ignore lint-non-snake-case-crate#proc_macro_ on targets wit… 9488259f5bd692e11abf63ddc69c5f5d214ae117 (link)
#131783 Fix explicit_iter_loop in rustc_serialize 51fc043f60b0df73f89834c6150829eed6224943 (link)
#131788 Fix mismatched quotation mark fc43b27084b2164a4629d85ab1fa73c49c1a60e5 (link)

previous master: bed75e7c21

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

Overall result: ✅ improvements - 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
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 5

Max RSS (memory usage)

Results (secondary -1.7%)

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

Cycles

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

Binary size

Results (primary 0.2%, secondary 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.2% [0.0%, 0.4%] 58
Regressions ❌
(secondary)
0.4% [0.4%, 0.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.0%, 0.4%] 58

Bootstrap: 780.671s -> 783.603s (0.38%)
Artifact size: 333.70 MiB -> 333.73 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-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 (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.