Skip to content

Conversation

@yotamofek
Copy link
Owner

@yotamofek yotamofek commented Jan 13, 2025

This PR does a couple of things, with the intention of cleaning up and streamlining some of the fmt::Display impls in rustdoc:

  1. Use the unstable fmt::from_fn instead of open-coding it.
  2. Replace bespoke implementations of Itertools::format with the method itself.
  3. Some more minor cleanups - DRY, remove unnecessary calls to Symbol::as_str(), replace some format!() calls with lazier options

The changes are mostly cosmetic but some of them might have a slight positive effect on performance.

@yotamofek yotamofek force-pushed the rustdoc-fmt-from_fn branch 3 times, most recently from d609093 to 88ec372 Compare January 14, 2025 13:03
@yotamofek yotamofek force-pushed the rustdoc-fmt-from_fn branch from 88ec372 to 16e9fe6 Compare January 14, 2025 17:11
@yotamofek yotamofek changed the title Rustdoc fmt from fn Refactor fmt::Display impls in rustdoc Jan 14, 2025
@yotamofek yotamofek closed this Jan 14, 2025
yotamofek pushed a commit that referenced this pull request Sep 14, 2025
…r=jieyouxu

Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#3 of Batch #2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
yotamofek pushed a commit that referenced this pull request Oct 15, 2025
…r=jieyouxu

Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#4 of Batch #2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
yotamofek pushed a commit that referenced this pull request Oct 19, 2025
…r=jieyouxu

Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#5 of Batch #2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that Kivooeo was using.

r? ```@jieyouxu```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants