types(TY4): transitive trait-fields + data auto-derive (the TY4c sliver) #28
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/028-types-ty4-transitive-trait-fields-data-auto-de"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
types(TY4): transitive trait-fields + data auto-derive (the TY4c sliver)
Along the way:
Touches 27 files:
.gitignore,corpus_diagnostics.md,docs/impl/type-system/TY4-constraints-and-coherence.md,src/rust/crates/ck_driver/tests/corpus.rs,src/rust/crates/ck_hir/src/fields.rs,src/rust/crates/ck_hir/src/lib.rsand 21 more.A clear improvement. The change in
src/rust/crates/ck_driver/tests/corpus.rsis the part I would have argued for.@ -699,0 +680,4 @@fn runtime_coverage_is_exhaustive() {let apps = corpus_apps();let tested: BTreeSet<&str> = RUNTIME_TESTED.iter().copied().collect();let mut failures = Vec::new();failuresallocates a fresh buffer per call. If this runs per frame or per token, can the buffer be reused?@ -14,0 +41,4 @@/// traits). Empty when the trait composes nothing. Same shared `composes`/// projection a `record` / `data` head reads; N1 records these names (not/// `TraitId`s) and `TY4c` resolves them against module scope.pub fn composed_traits(&self) -> impl Iterator<Item = NameToken> + 'a {composed_traitsis public. Does anything outside the crate call it, or is it pub because that was easier? Every public item is a promise.@ -258,0 +256,4 @@/// Subtrees whose own span does not contain `target` are pruned. Shared with/// the body walker's [`let`-annotation reader](crate::check) (TY6), which/// finds a `LetStmt` CST node by its lowered `Stmt.span`.pub(crate) fn find_node_with_span(find_node_with_spanreads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?Second read on
src/rust/crates/ck_driver/tests/corpus.rs. Nothing to add.It runs per token. The buffer behind
failureslives on the struct insrc/rust/crates/ck_driver/tests/corpus.rsnow and is cleared rather than reallocated.Nothing outside calls
composed_traits. It is pub(crate) insrc/rust/crates/ck_syntax/src/ast/members.rsnow.Split. The decision in
find_node_with_spanis a pure function now, with its own tests insrc/rust/crates/ck_types/src/value_turbofish.rs.