alloc: add ToString specialization for &&str
by notriddle · Pull Request #128759 · rust-lang/rust (original) (raw)
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 added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the library team, which will review and decide on the PR/issue.
labels
This comment has been minimized.
This seems to induce a diagnostic regression?
The two altered expectation messages both seem like improvements:
coerce-expect-unsized-ascribed.stderr
says you can goBox<char> -> Box<dyn Debug>
, which you can.upcast_soundness_bug.stderr
used to say that you could goBox<dyn Trait<u8, u8>> -> Box<dyn Trait>
, which you can't, because the type parameters are missing in the destination and the only ones that work aren't what's needed.
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?
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).
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.
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.
rustbot added the T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
This comment has been minimized.
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.
This makes more things match, particularly applicable blankets.
@bors r=workingjubilee,compiler-errors
📌 Commit c6fb0f3 has been approved by workingjubilee,compiler-errors
It is now in the queue for this repository.
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
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 6 pull requests
Successful merges:
- rust-lang#128410 (Migrate
remap-path-prefix-dwarf
run-make
test to rmake) - rust-lang#128759 (alloc: add ToString specialization for
&&str
) - rust-lang#128873 (Add windows-targets crate to std's sysroot)
- rust-lang#129001 (chore(lib): Enhance documentation for core::fmt::Formatter's write_fm…)
- rust-lang#129061 (Use
is_lang_item
more) - rust-lang#129062 (Remove a no-longer-true assert)
r? @ghost
@rustbot
modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
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