Skip to content

Plan documents spell mutation as the language does: mut receivers, mut parameters, fn(mut T), []mut u8 (#739) - #3500

Merged
ehartford merged 1 commit into
mainfrom
plan-docs-mut
Nov 21, 2026
Merged

ehartford merged 1 commit into
mainfrom
plan-docs-mut

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Closes #739. Docs only.

Eight plan and sketch documents still wrote &mut signatures from before §15.1. Each site is respelled by the issue's rule, with the forms the language has gained since (D172 mut parameters, D218 fn(mut T)):

  • fn m(self: &mut Self, …) → mut fn m(…); fn drop(self: &mut Self) → move fn drop().
  • x: &mut T → mut x: T; an argument &mut place → the place.
  • fn(&mut T) → fn(mut T); buf: &mut [u8] → buf: []mut u8.
  • One signature returned a mutable view (FlagSet.add_subcommand(…) -> &mut FlagSet), which nothing in the language spells. In this non-normative sketch it now takes the caller's closure, configure: fn(mut FlagSet).
  • Rust's own spelling quoted as Rust (Pin<&mut Self>) stays.

The conformance banners are removed from the eight. with-implementation-notes.md is a historical notebook: its banner now says so and it is not respelled, as the issue asked.

The rewrite was a With script, read as a full diff before commit. spec-inventory-check and doc-path-check green.

@ehartford
ehartford merged commit 6fa1bda into main Nov 21, 2026
@ehartford
ehartford deleted the plan-docs-mut branch November 21, 2026 07:14
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.

Plan docs still spell &mut parameters — respell per §15.1/D27 before implementing

1 participant