From a100389c2f4f49c0eb7ecc25c5cc816a8b23345f Mon Sep 17 00:00:00 2001 From: Brummel Date: Sun, 10 May 2026 12:43:49 +0200 Subject: [PATCH] =?UTF-8?q?design-md-consolidation=203.1:=20remove=202=20R?= =?UTF-8?q?ust=20code=20blocks=20from=20Decision=2010=20(Type::Fn=20+=20Su?= =?UTF-8?q?ppress)=20=E2=80=94=20schema=20lives=20in=20=C2=A7Data-model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/DESIGN.md | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 9539aac..f4a02d8 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -1022,21 +1022,9 @@ The form-A surface for fn signatures gains mode wrappers: ``` Internally, this is *not* a new `Type` variant. Modes are -metadata on `Type::Fn`: - -```rust -Type::Fn { - params: Vec, - param_modes: Vec, // same length as params - ret: Box, - ret_mode: ParamMode, - effects: Vec, -} - -enum ParamMode { Implicit, Own, Borrow } // default: Implicit -``` - -The substantive reasons for per-position metadata over a +metadata on `Type::Fn` — `paramModes` and `retMode` fields run +parallel to `params` and `ret` (see §"Data model" for the JSON +schema). The substantive reasons for per-position metadata over a `Type::Borrow` / `Type::Own` variant approach: - **Semantic locality.** Modes are properties of fn-signature @@ -1127,16 +1115,11 @@ All four are skipped during serialisation when absent / false / None so canonical-JSON hashes of every fixture remain stable until the fixture intentionally adopts the feature. -**`FnDef.suppress`.** - -```rust -FnDef.suppress: Vec ; advisory diagnostic suppress list - -struct Suppress { - code: String, // diagnostic code being suppressed - because: String, // mandatory non-empty reason -} -``` +**`FnDef.suppress`.** The `suppress` field on `FnDef` carries a +list of advisory-diagnostic suppress entries; each entry has a +`code` (the diagnostic being suppressed) and a `because` (a +mandatory non-empty reason). See §"Data model" for the canonical +schema. Form-A surface: `(suppress (code "...") (because "..."))` clause between fn name and `(type ...)`. Multiple clauses allowed; one