Repository navigation
fix-ceremony: rewrite explicit self parameters to implicit receivers (#727) - #3654
Merged
Merged
Conversation
Contributor
Author
|
Seed-driven battery green on |
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.
Part of #727 (implements the
with fix-ceremonyexplicit-selfrewrite from Eric's 2026-11-25 ruling; phase-4 refusal stays deferred until after the second half ofeliminate-selflands).Summary
src/CeremonyFix.with:cf_collect_explicit_receiversandcf_push_explicit_receiver_editsto rewrite explicitselfreceiver parameters (self: &Self,mut self: Self,move self: Self, with or without additional or generic parameters) inimpl/extendblocks and non-read (mut/move)traitmethod declarations to the implicit keyword form (fn/mut fn/move fn).--reportcounts one rewrite per method and--check-withrolls back atomically.fn m(self: &Self)in atrait).cf_top_level_self_notesso--reportreports top-level dotted methods (fn T.m(self: ...)) pointing towith migrate-receiverswithout breaking them in place.test/behavior/behav_727_fix_ceremony_self.with:--reportoutput (including top-level dotted note),--applyrewrites acrosstrait,impl Type:, andimpl Trait for Type:, D7 trait read carve-out preservation, identical runtime behavior after rewrite, and idempotence (0 rewrite(s)on second--report).Contract-program census (
uat/+examples/, 55.withfiles)0files,0methods.fn m(self: &Self)):2files,17methods:examples/nebula/src/schema.with(2 methods inpub trait SqlRecord, lines 38–39)examples/service/src/traits.with(15 methods acrossUserRepository,CacheService,NotificationService,AuditLog, lines 9–38)Verification
with check src/main.with: okwith build :dev: greenout/bootstrap/bin/with-stage1 test test/behavior/behav_727_fix_ceremony_self.with test/behavior/behav_3061_fix_ceremony_cli.with: 2/2 passed