Repository navigation
#2987: hand-audit spec examples (batch 1: §§1–3, 5–8, 10, 12, 14–15, 17, 19–24, 29, channels) - #3043
Merged
Merged
Conversation
… 19–24, 29 and channels
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2987 (docs-only: fenced code examples only, zero normative prose edits).
Every fenced block across 19 chapters and 3 stdlib sections was pasted and checked/run against
~/.local/bin/with(8e7093ad8):Updated fenced examples (under settled rulings)
002_ownership.md: replaceList.new()move examples in §2.2 withopen_conn()(under D120Listis a CoW value, as §2.3 states); replace reserved keywordgenin §2.3 (§29.11); updateFileWrapper(String→str,move fn drop()); add required:body introducers ondefer:/errdefer:(§29.13) andf"..."prefix (§15.4).003_borrowing.md: replace nonexistent.as_view()/.to_upper_view()/.to_string()andStringin §3.4 with&user.name,Option[StrView]propagation (explicitStrViewbinding under D179), andstrmaterialization;mut fn update()in §3.8.005_ephemeral.md: replace nonexistentBytes/.view()in §5.4 withList[u8]slice view&[u8].007_with-scoped-access.md: add missingfprefix onf"{name} ({user.role})"in §7.3.010_errors.md: drop trailingOk(config)ceremony (§4.9),fs.read_to_string→read_file, addfprefix in.with_context(...), updates.parse_int()→s.parse()(D165; closure return demand tracked in Sema (§10.7, D165): List.traverse does not propagate expected Option[List[U]] / Result[List[U], E] return demand into its closure #3042).012_closures.md: replace nonexistentList.from(...)and CoWListmove examples in §12.4 with resourceopen_conn()(D93, D120).014_concurrency.md&stdlib/channels.md: addfprefix onf"/users/{id}", drop stale.awaitontx.send(...)/rx.recv()(§14.3 Invariant 5, §14.15 D10),cancel(task)→task.cancel(), replace reserved keyworduse(value)(§29.11), dropOk(...)wrapper in §14.8,runtime::→runtime.(Spec errata from the 2026-11-02 conformance audit: examples that cannot compile, names that do not exist, and rules that contradict each other #2955 item 4),Atomic { val: 0 }(private field under D100) →Atomic.new(0).017_metaprogramming.md:String→strin §17.3,f"..."incomptime_errorin §17.5.019_safety.md:&raw x→&raw const xand reserveduse(p)→inspect(p)in §19.3.021_borrow-checker-rules.md:String.from/.as_str()→str/&strin Rule 6; use aDroptypeHolderin Rule 7 (List[&i32]does not access its&i32elements on drop;Holdertriggers the exact§21.1 Rule 7error); replace reserveduse(...)in Rule 9.Surfaced compiler/stdlib gaps & prose errata (filed separately per #2987's 3-way rule)
async:block leaksasync_block_rbuf(LLVM IR verification failure)std.sync:Mutex.lock()andRwLock.read()/RwLock.write()guard methods missingyieldcomprehension (D185) and §3.8 / §22.3counts.get(...).unwrap()&i32prose (D144)str.bytes()/str.as_bytes()fails on(*self) as []u8castList.traverseexpectedOption[List[U]]/Result[List[U], E]demand propagation into closureVerification
docs/spec/only):~/.local/bin/with build :spec-inventory-check --no-deps→survey: all targets green.