Skip to content

Rollup of 6 pull requests #115909

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 20 commits into from
Sep 17, 2023
Merged

Rollup of 6 pull requests #115909

merged 20 commits into from
Sep 17, 2023

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

benschulz and others added 20 commits August 18, 2023 14:46
Also stabilizes saturating_int_assign_impl, rust-langgh-92354.

And also make pub fns const where the underlying saturating_*
fns became const in the meantime since the Saturating type was
created.
Remove Drop impl of mpsc Receiver and (Sync)Sender

This change removes the empty `Drop` implementations for `mpsc::Receiver`, `mpsc::Sender` and `mpsc::SyncSender`. These implementations do not specify `#[may_dangle]`, so by removing them we make `mpsc` types play nice with drop check.

This was previously attempted in [rust-lang#105243](rust-lang#105243 (comment)) but then [abandoned due to a test failure](rust-lang#105243 (comment)). I've aligned the test with those for `Mutex` and `RwLock`.
…olnay

make `Debug` impl for `ascii::Char` match that of `char`

# Objective
use a more recognisable format for the `Debug` impl on `ascii::Char` than the derived one based off the enum variants. The alogorithm used is the following:
 - escape `ascii::Char::{Null, CharacterTabulation, CarraigeReturn, LineFeed, ReverseSolidus, Apostrophe}` to `'\0'`, `'\t'`, `'\r'`, `'\n'`, `'\\'` and `'\''` respectively. these are the same escape codes as `<char as Debug>::fmt` uses.
 - if `u8::is_ascii_control` is false, print the character wrapped in single quotes.
 - otherwise, print in the format `'\xAB'` where `A` and `B` are the hex nibbles of the byte. (`char` uses unicode escapes and this seems like the corresponding ascii format).

Tracking issue: rust-lang#110998
…=compiler-errors

add diagnostic for raw identifiers in format string

Format strings don't support raw identifiers (e.g. `format!("{r#type}")`), but they do support keywords in the format string directly (e.g. `format!("{type}")`). This PR improves the error output when attempting to use a raw identifier in a format string and adds a machine-applicable suggestion to remove the `r#`.

fixes rust-lang#115466
…ble, r=compiler-errors

Migrate `compiler/rustc_hir_typeck/src/callee.rs` to translatable diagnostics
@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. rollup A PR which is a rollup labels Sep 17, 2023
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Sep 17, 2023

📌 Commit f082f1d has been approved by Dylan-DPC

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, 2023
@bors
Copy link
Collaborator

bors commented Sep 17, 2023

⌛ Testing commit f082f1d with merge db9c21f...

@bors
Copy link
Collaborator

bors commented Sep 17, 2023

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing db9c21f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 17, 2023
@bors bors merged commit db9c21f into rust-lang:master Sep 17, 2023
@rustbot rustbot added this to the 1.74.0 milestone Sep 17, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#114965 Remove Drop impl of mpsc Receiver and (Sync)Sender 16f21d22ceaeb506c435f2b6fc1779457522437b (link)
#115434 make Debug impl for ascii::Char match that of char f596925e4d074a9f0efe671306860ee6e0e79e1e (link)
#115477 Stabilize the Saturating type d82415e199f6d3c8279a3e32222d924eb9249975 (link)
#115611 add diagnostic for raw identifiers in format string 38ae7040bb7b1f2929ca6f18b269a4b99e3121e7 (link)
#115654 improve PassMode docs aafc48bf119a9afdfa6abad9a4bfe1e135682d39 (link)
#115862 Migrate compiler/rustc_hir_typeck/src/callee.rs to transl… f5179788b83e6eb75df581a6dfa6491377f07609 (link)

previous master: 8ed1d4a02d

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

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-1.0%, -0.5%] 6
Improvements ✅
(secondary)
-1.1% [-1.5%, -0.4%] 19
All ❌✅ (primary) -0.6% [-1.0%, -0.5%] 6

Max RSS (memory usage)

Results

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)
3.1% [3.1%, 3.1%] 1
Improvements ✅
(primary)
-2.1% [-4.2%, -0.0%] 2
Improvements ✅
(secondary)
-0.8% [-0.8%, -0.8%] 1
All ❌✅ (primary) -2.1% [-4.2%, -0.0%] 2

Cycles

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

Binary size

Results

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

Bootstrap: 636.351s -> 635.505s (-0.13%)
Artifact size: 318.44 MiB -> 318.39 MiB (-0.02%)

# 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants