alloc: add ToString specialization for &&str by notriddle · Pull Request #128759 · rust-lang/rust (original) (raw)

notriddle

@notriddle

@rustbot

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Aug 6, 2024

@workingjubilee

@rust-log-analyzer

This comment has been minimized.

@workingjubilee

This seems to induce a diagnostic regression?

workingjubilee

@notriddle

The two altered expectation messages both seem like improvements:

@notriddle

@workingjubilee

This seems to induce a diagnostic regression?

Yeah, it did.

It seems like a bug in the actual diagnostics code, though. So I've added a second commit to address it. Should I open a second PR with just the one commit?

@workingjubilee

It would probably be best if someone on T-compiler reviewed the diagnostics amendment so however you want to arrange for that to happen is fine by me (separate PR, pinging someone, whatevs).

workingjubilee

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I want to accept this PR but I also want a slightly less gnarly macro if at all possible, because most of our macros are very straightforward, and this... bucks that trend.

@notriddle

Okay, next commit is a slightly less complex version of the macro. Since there's only 12 impls, the self-recursion goes away entirely, and the other two helpers are separated out into their own macros.

@notriddle

@rustbot rustbot added the T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

label

Aug 7, 2024

@rust-log-analyzer

This comment has been minimized.

@notriddle

workingjubilee

workingjubilee

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with T-compiler OK on the compiler diff.

compiler-errors

compiler-errors

@notriddle

This makes more things match, particularly applicable blankets.

@compiler-errors

@bors r=workingjubilee,compiler-errors

@bors

📌 Commit c6fb0f3 has been approved by workingjubilee,compiler-errors

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

Aug 13, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 14, 2024

@bors

…iaskrgr

Rollup of 6 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Aug 14, 2024

@rust-timer

Rollup merge of rust-lang#128759 - notriddle:notriddle/spec-to-string, r=workingjubilee,compiler-errors

alloc: add ToString specialization for &&str

Fixes rust-lang#128690