diag: explain pointer-sized cast restrictions in source advice
This commit is contained in:
1 parent
8a714ba6de
commit
6a02659f31
23 files changed
+96
-8
No files matched your search
@@ -176,3 +176,5 @@ Q-052 CFG resource provenance (DD-024): Quick Reference and other/full source do
|
||||
P6-7 factual source E4202 fields (cl100k): Quick Reference stays 8,955; other source docs 68,323 → 68,353 (+30), full source 77,278 → 77,308 (+0.04%). o200k groups are 8,991 / 68,556 / 77,547; Qwen2.5 9,233 / 70,024 / 79,257. Only language/concurrency.md grows; AIR and library/std.md are unchanged. Concrete `found` and `use` fields distinguish ordinary atomic reads without message parsing. No new syntax, code, feature or verifier/runtime state is introduced; no empirical MCC benefit is claimed.
|
||||
|
||||
Spec 15 scope corrections (cl100k): Quick Reference stays 8,955 tokens despite the E1002 → E7005 correction; other source docs 68,353 → 68,403 (+50), full source 77,308 → 77,358 (+0.06%). o200k full source grows 77,547 → 77,594 (+47); Qwen2.5 79,257 → 79,315 (+58). AIR and std are unchanged. Existing source diagnostics, unpacking, escapes, buffers and borrow returns replace obsolete baseline descriptions; no semantic or implementation change.
|
||||
|
||||
Pointer-sized cast guidance (2026-10-09): Quick Reference grows 9,255 → 9,276 cl100k (+21); other source docs 69,817 → 69,863 (+46), full source 79,072 → 79,139 (+67, +0.085%). o200k grows by the same +21/+46/+67 (full 79,373); Qwen2.5 by +21/+47/+68 (full 81,127). AIR grows 188,993 → 189,078 bytes and +22 tokens for each tokenizer (48,398 cl100k / 48,551 o200k / 49,956 Qwen2.5). The existing target-independent ban on usize/isize widening is explained in the registered numeric-cast hint and source cast table. No new concept, syntax, feature, diagnostic code/kind or verifier/runtime state is introduced. Pointer identity casts now reject with source E7005/advice before AIR E1002; the accepted set is unchanged. No empirical reduction in repair rounds is claimed.
|
||||
@@ -86,7 +86,7 @@ return x + y + w; // also: `trap;`
|
||||
| `+% -% *%` | wrapping |
|
||||
| `& \| ^ << >>` | bitwise; shift ≥ width traps `T0005` |
|
||||
| `== != < <= > >=`, `and or not` | comparisons, booleans |
|
||||
| `x as T` | lossless widening only (else `E7005`) |
|
||||
| `x as T` | lossless fixed-width widening only; `usize`/`isize` use `as!` or `as%` (else `E7005`) |
|
||||
| `x as! T` | checked conversion, traps `T0006` |
|
||||
| `x as% T` | wrapping conversion |
|
||||
| `42`, `42u8`, `0xff`, `1_000` | literals; type from context or suffix (else `E7007`) |
|
||||
|
||||
Reference in new issue
Block a user