diag: explain pointer-sized cast restrictions in source advice

This commit is contained in:
dev committed 2026-10-09 21:01:58 +03:00
1 parent 8a714ba6de
commit 6a02659f31
23 files changed
+96 -8

No files matched your search

+1 -1
View File
@@ -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`) |