rust/library
Guillaume Gomez 5d95ec05f6
Rollup merge of #145863 - EliasHolzmann:formatting_options_20250825, r=m-ou-se
formatting_options: Make all methods `const`

Related to rust-lang/rust#118117.

Having `const fn`s that take a `mut &` was unstable until Rust 1.83 (see rust-lang/rust#129195). Because of this, not all methods on `FormattingOptions` were implemented as `const`. As this has been stabilized now, there is no reason not to have all methods `const`.

Thanks to `@Ternvein` for bringing this to my attention (see [1]).

r? `@m-ou-se` (As you were the reviewer for the original implementation – feel free to reroll if you are busy or if you aren't interested)

[1]: https://github.com/rust-lang/rust/issues/118117#issuecomment-2687470635
2025-08-26 16:34:16 +02:00
..