RUE-1209: delete the vestigial named-method and destructor projections - #2083
Merged
Conversation
The semantic dependency manifest projected two body-level dependency channels that production never populates. `named_method_dependencies` and `named_destructor_dependencies` are extended only inside `analyze_function_bodies_lazy`, the whole-program body path; `compose_queried_bodies` — what production runs — records neither. Method and destructor call edges reach invalidation through the query-owned channel instead, as owner-qualified `StableFreeFunctionDependency` edges built from each reached body transaction's references. Which phase records a channel is what decides whether it is live, and there are three. Whole-program body analysis is vestigial for the reason above. Declaration binding is live, because both body paths bind declarations. CFG construction is live, which is why implicit named destructor dependencies stay: a probe on a fixture with a method call and a `drop fn` reports zero named-method and zero named-destructor edges against two implicit ones, so only the first two are removable. Delete both projections, their translation counters, their completeness slots, and the stable edge types that only they constructed. The invalidation plan folded these edges into `direct_dependencies` and into the reverse-dependency closure; both folds ran over permanently empty vectors, so removal is behavior-neutral. `SemanticDependencySurface::GenericNamedMethodCall` stays. Its manifest producer was vestigial, but a second producer is live: every generic body owner takes a per-owner blocker on that surface, independent of the projection. `NonGenericNamedMethodCall` and `NamedDestructorCall` lose their only producers and go, along with the now-unreachable `DestructorEndpointUnavailable` reason. The `CanonicalSemanticOutput` fields keep feeding the parity snapshot; only their accessors, now unread, are removed.
steveklabnik
force-pushed
the
claude/rue-1209-method-projection
branch
from
July 29, 2026 16:46
c279afc to
696efa9
Compare
steveklabnik
marked this pull request as ready for review
July 29, 2026 17:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes RUE-1209. Refs RUE-1204, RUE-1027.
The semantic dependency manifest projected two body-level dependency channels that production never populates.
named_method_dependenciesandnamed_destructor_dependenciesare extended only insideanalyze_function_bodies_lazy, the whole-program body path;compose_queried_bodies— what production runs — records neither. Method and destructor call edges reach invalidation through the query-owned channel instead, as owner-qualifiedStableFreeFunctionDependencyedges built from each reached body transaction's references. This is the same shape RUE-1204 removed for free functions.Which channels are live
Which phase records a channel is what decides whether it is vestigial, and there are three:
analyze_function_bodies_lazy)compose_queried_bodiessema/typeck.rs)Implicit named destructors are therefore untouched. A probe on a fixture with a method call and a
drop fn, run before deleting anything, reports:Zero named-method and zero named-destructor edges against two implicit ones — so only the first two are removable, and the emptiness is measured rather than inferred.
What changes
*_events_translatedcounters, their tuple slots and completeness slots, and theStableNamedMethodDependency/StableNamedMethodDependencyTarget/StableNamedDestructorDependencytypes that only they constructed.SemanticDependencyInputManifestfields and accessors, theCanonicalSemanticOutputaccessors that are now unread, and theunstable.rsviews over both. TheCanonicalSemanticOutputfields themselves stay: they still feedunstable_parity_snapshot, so that snapshot is unchanged.SemanticDependencySurface::GenericNamedMethodCallstays. Its manifest producer was vestigial, but a second producer is live and independent of the projection: every generic body owner takes a per-owner blocker on that surface.NonGenericNamedMethodCallandNamedDestructorCalllose their only producers and go, along with the now-unreachableDestructorEndpointUnavailablereason.Behavior
The invalidation plan folded these edges into
direct_dependenciesand into the reverse-dependency closure. Both folds ran over permanently empty vectors, so removal is behavior-neutral. Confirmed by test rather than by inspection:incremental_invalidation_closes_across_method_and_destructor_bodiesedits a leaf called from a method body and asserts the plan still closes over the calling method and its caller (invalidated = ["leaf", "main", "run"]) while an unrelated function stays reusable.No public surface outside the compiler consumes any of the removed names, and
unstable.rsis explicitly outside the supported facade's compatibility policy.Verification
Each run captured by exit code:
scripts/rue quick— pass (debug-assertion policy valid, 92 reviewed; nodebug_assert!added or removed, so the per-file counts inscripts/validate-debug-assert-policy.pyare unchanged)./clippy.sh— passscripts/rue premerge— pass (78 targets, 0 failures)