Repository navigation
Description
Eric asked for mistakes in the spec itself. Each item was found while probing the spec's own text against the compiler; the rulings are his.
Examples the spec writes that cannot be written in With
- §14.6, §14.10:
sleep(50.millis()).await,timeout(1.secs()).50.millislexes as the float50.followed by an identifier, so the example cannot parse; nomillis/secsexists (std.time'sDurationispub type Duration = i32, milliseconds); and there is notimeoutfunction anywhere in std. Either the spec gets a Duration literal/extension and atimeouttask, or the examples change. - §14.6:
Ok(a + b)as the block's value andResult[String, IoError]as its type.Ok(...)is the ceremony the mission forbids ("you never writeOk(())orOk(value)"), andStringis not a With type (str). Also"msg-{i}"without thefprefix. - §13.6:
let sorted_index: BTreeMap[str, i32] = [w: i for (i, w) in vocab.enumerate()]is refused by §4.2.6 under D108 (iisisize). The spec's example and the spec's rule disagree until len-cast: .len() as i32 is the census' largest ceremony pattern; D108's isize length needs index/range positions or a checked narrowing so the cast disappears #2522 is ruled. - §14.9: the desugaring
runtime::structured_scope(s => { body })uses Rust's::.
Rules that contradict each other or the mission
5. §13.6 says "one comprehension family, polymorphic over its target", but §13.6a's Option/Result comprehensions are a different syntax (for x in a; y in b: yield x + y) from the bracket form ([x for x in xs]); the bracket form over an Option is refused.
6. §13.3 names an iterator operation drop(n) while §18.2 makes drop(value) an ambient prelude form. One name, two meanings; the table and the prelude cannot both keep it.
7. §13.3 signatures zip(Iter[U]), chain(Iter[T]), zip_with(Iter[U], …): the compiler follows them, so xs |> zip(ys) with a List is refused and the user writes ys.iter(). for accepts any iterable; these should take impl IntoIter[U].
8. §14.11: "Tuple .await supports tuple sizes 2..12." An arity ceiling written into the language is Rust's shape, not With's.
9. §4.2.6: after D181 and D182 the section's rationale ("The as keyword signals that the programmer understands the conversion may lose data … inherited from C") no longer describes the rule: an integer into a float and an f64 into an f32 lose data and are implicit, an i64 into an i32 is not. The reason the section should state is the one D181 gives: as is required where two meanings remain (truncate or round; wrap or trap), never because bits are lost.
10. §16.2b.6: "a return that may borrow from either of two parameters is not yet ruled" is a hole left in normative text.
11. §18.5b.1: nr is "i64" and args holds the arguments "after --", while D108/D114 made counts isize and with run tool.w a b forwards a b with no --.
12. Implicit main (#2951): the spec never says whether a script's top-level bindings are the module's globals; today a helper fn cannot see them.
13. README changelog v7.24 (D95) lists Hash among the traits a tuple derives; §11.7/§11.8 (D96, the same day) say Hash is never written or derived.
Also observed, implementation not spec: a user program calling a non-pub std function gets "undefined variable" rather than a visibility error naming the declaration (§18.3 says access to a non-pub declaration of another package "is a compile error"; the message should say so).
Activity
ehartford commentedon Nov 2, 2026
Tracking issues per item: 1 → #2957 (Duration, timeout,
50.millis()); 2 → #2959; 3 → #2522; 4 → #2960; 5 → #2961; 6 → #2962; 7 → #2963; 8 → #2964; 9/13 → #2966; 10 → #2965; 12 → #2951. The non-pub std diagnostic → #2958. This issue stays as the index.bridge-the-impl-gap item 1: the conformance inventory, the open-fixtu…
bridge-the-impl-gap item 1: the conformance inventory, the open-fixtu…
Spec errata (#2966, #3040, #3021; #2955 items 11, 13): stale examples…
ehartford commentedon Nov 6, 2026
Items 11 and 13 landed in #3055 (with #2966, #3040, #3021). Checked: §18.5b.1
nrstaysi64(D114: a count a stream does not bound takes a fixed width; the implementation agrees) and one-linerargsdo follow--; items 2 and 4 were already fixed in the tree. The remaining items need a ruling and stay on their tracking issues.ehartford commentedon Nov 18, 2026
Closing: every item that needed no ruling has landed (#3055, #2966, #3040, #3021), and each remaining item has its own tracking issue. Nothing is left that this issue alone tracks.