Correct the README where trait impls and iterators are listed as rejected
Both landed in the previous commit, and the base16ct line in findings/ now understates what goes through. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
428f374 parent: ae9f986 modified
README.md +23 -3 | @@ -37,9 +37,29 @@ patterns, `Vec`/slices/arrays, type aliases, function-typed parameters | ||
| 37 | 37 | `{}`, `{:?}`, `{:x}`, `{:b}`, positional and inline-named arguments, and |
| 38 | 38 | zero/space padding. |
| 39 | 39 | |
| 40 | -Rejected with a reason, rather than guessed at: `i128`/`u128`, traits and trait | |
| 41 | -impls, generics, closures, iterator adaptors, float→int casts, and any | |
| 42 | -standard-library method that isn't mapped. | |
| 40 | +Also: the formatting trait impls (`Display`, `Debug`, `LowerHex`, `UpperHex`, | |
| 41 | +`Binary`, `Octal`) and `From`; and slice iterators — `iter`, `iter_mut`, | |
| 42 | +`enumerate`, `zip`, `chunks_exact`, `chunks_exact_mut`, `windows` — resolved | |
| 43 | +into a single index loop where each binding is an lvalue into the original | |
| 44 | +container, so `*d = v` through `iter_mut()` reaches the caller's slice. | |
| 45 | +Borrowed slices are views, not copies, including as return types. | |
| 46 | + | |
| 47 | +Rejected with a reason, rather than guessed at: `i128`/`u128`, generics, | |
| 48 | +closures, `unsafe`, trait impls other than the ones above, iterator adaptors | |
| 49 | +with no index-loop equivalent (`map`, `filter`, `take_while`), float→int casts, | |
| 50 | +and any standard-library method that isn't mapped. | |
| 51 | + | |
| 52 | +## base16ct | |
| 53 | + | |
| 54 | +`tests/cases/026-base16ct-crate/` transpiles base16ct 1.0.0's `error.rs` and | |
| 55 | +`mixed.rs` byte-for-byte as published on crates.io, plus `lib.rs`'s | |
| 56 | +`decoded_len`, `encoded_len` and `decode_inner` verbatim. Its decoder output is | |
| 57 | +byte-identical to rustc's — lower, upper and mixed hex, both error variants, | |
| 58 | +and the `Display` strings. That is the crate the transpiler in | |
| 59 | +[`findings/`](findings/) emitted an empty file for. | |
| 60 | + | |
| 61 | +The rest of the crate needs closures, `unsafe`, and struct fields of view type; | |
| 62 | +[`DESIGN.md`](DESIGN.md) says which file needs which. | |
| 43 | 63 | |
| 44 | 64 | ## Tests |
| 45 | 65 | |
| @@ -37,9 +37,29 @@ patterns, `Vec`/slices/arrays, type aliases, function-typed parameters | |||
| 37 | `{}`, `{:?}`, `{:x}`, `{:b}`, positional and inline-named arguments, and | 37 | `{}`, `{:?}`, `{:x}`, `{:b}`, positional and inline-named arguments, and |
| 38 | zero/space padding. | 38 | zero/space padding. |
| 39 | 39 | ||
| 40 | -Rejected with a reason, rather than guessed at: `i128`/`u128`, traits and trait | 40 | +Also: the formatting trait impls (`Display`, `Debug`, `LowerHex`, `UpperHex`, |
| 41 | -impls, generics, closures, iterator adaptors, float→int casts, and any | 41 | +`Binary`, `Octal`) and `From`; and slice iterators — `iter`, `iter_mut`, |
| 42 | -standard-library method that isn't mapped. | 42 | +`enumerate`, `zip`, `chunks_exact`, `chunks_exact_mut`, `windows` — resolved |
| 43 | +into a single index loop where each binding is an lvalue into the original | ||
| 44 | +container, so `*d = v` through `iter_mut()` reaches the caller's slice. | ||
| 45 | +Borrowed slices are views, not copies, including as return types. | ||
| 46 | + | ||
| 47 | +Rejected with a reason, rather than guessed at: `i128`/`u128`, generics, | ||
| 48 | +closures, `unsafe`, trait impls other than the ones above, iterator adaptors | ||
| 49 | +with no index-loop equivalent (`map`, `filter`, `take_while`), float→int casts, | ||
| 50 | +and any standard-library method that isn't mapped. | ||
| 51 | + | ||
| 52 | +## base16ct | ||
| 53 | + | ||
| 54 | +`tests/cases/026-base16ct-crate/` transpiles base16ct 1.0.0's `error.rs` and | ||
| 55 | +`mixed.rs` byte-for-byte as published on crates.io, plus `lib.rs`'s | ||
| 56 | +`decoded_len`, `encoded_len` and `decode_inner` verbatim. Its decoder output is | ||
| 57 | +byte-identical to rustc's — lower, upper and mixed hex, both error variants, | ||
| 58 | +and the `Display` strings. That is the crate the transpiler in | ||
| 59 | +[`findings/`](findings/) emitted an empty file for. | ||
| 60 | + | ||
| 61 | +The rest of the crate needs closures, `unsafe`, and struct fields of view type; | ||
| 62 | +[`DESIGN.md`](DESIGN.md) says which file needs which. | ||
| 43 | 63 | ||
| 44 | ## Tests | 64 | ## Tests |
| 45 | 65 | ||