Skip to content

rustdoc: do not allocate String when writing path full name #99775

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 1 commit into from
Jul 27, 2022

Conversation

notriddle
Copy link
Contributor

No idea if this makes any perf difference, but it just seems like premature pessimisation to use String when str will do.

No idea if this makes any perf difference, but it just seems like premature
pessimisation to use String when str will do.
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 26, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jul 26, 2022

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

@rust-highfive
Copy link
Contributor

r? @CraftSpider

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 26, 2022
Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

Even if it's not faster, it's simpler!

@camelid
Copy link
Member

camelid commented Jul 26, 2022

r? @camelid
@bors r+

@bors
Copy link
Collaborator

bors commented Jul 26, 2022

📌 Commit b8fb6e1 has been approved by camelid

It is now in the queue for this repository.

@rust-highfive rust-highfive assigned camelid and unassigned CraftSpider Jul 26, 2022
@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 Jul 26, 2022
@camelid
Copy link
Member

camelid commented Jul 26, 2022

This is only used in the JSON backend, which I believe isn't tested in perf, and it's changing pretty drastically over time, so @bors rollup

@aDotInTheVoid
Copy link
Member

Yeah, we don't yet have perf test for rustdoc-json, but we should (#94141)

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 27, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#98583 (Stabilize Windows `FileTypeExt` with `is_symlink_dir` and `is_symlink_file`)
 - rust-lang#99698 (Prefer visibility map parents that are not `doc(hidden)` first)
 - rust-lang#99700 (Add a clickable link to the layout section)
 - rust-lang#99712 (passes: port more of `check_attr` module)
 - rust-lang#99759 (Remove dead code from cg_llvm)
 - rust-lang#99765 (Don't build std for *-uefi targets)
 - rust-lang#99771 (Update pulldown-cmark version to 0.9.2 (fixes url encoding for some chars))
 - rust-lang#99775 (rustdoc: do not allocate String when writing path full name)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0d5bdca into rust-lang:master Jul 27, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 27, 2022
@notriddle notriddle deleted the notriddle/as-str branch July 27, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants