[PATCH v2 0/2] rust: str: tie Formatter to its backing buffer

From: Peder Bergan via B4 Relay

Date: Tue Nov 17 2026 - 12:57:10 EST


Split the lifetime fix and its documentation into separate patches as
requested by Gary.

I compiled the fix-only first patch with Clippy and ran the string tests
and kernel doctests under x86_64 QEMU. The final source tree is unchanged
from v1, including the previously tested example.

OpenAI Codex assisted with coding and testing.

---
Changes in v2:
- Split the documentation and example into a second patch, as requested by Gary.
- Link to v1: https://lore.kernel.org/rust-for-linux/20261117-formatter-lifetime-v1-1-9d7f38686552@xxxxxxxxx/

---
Peder Bergan (2):
rust: str: tie Formatter to its backing buffer
rust: str: add an example for Formatter::new

rust/kernel/str.rs | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261117-formatter-lifetime-48391ed7affd

Best regards,
--
Peder Bergan <peder.bergan@xxxxxxxxx>