Skip to content

Put ClassDefinition impl next to struct#424

Merged
vinistock merged 1 commit intomainfrom
01-08-put_classdefinition_impl_next_to_struct
Jan 8, 2026
Merged

Put ClassDefinition impl next to struct#424
vinistock merged 1 commit intomainfrom
01-08-put_classdefinition_impl_next_to_struct

Conversation

@vinistock
Copy link
Member

@vinistock vinistock commented Jan 8, 2026

Another extraction to simplify #402

The impl block for ClassDefinition was the only one that was not next to its struct. This PR just moves it next to it.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock self-assigned this Jan 8, 2026
@vinistock vinistock marked this pull request as ready for review January 8, 2026 21:11
@vinistock vinistock requested a review from a team as a code owner January 8, 2026 21:11
Comment on lines -321 to +329
pub fn add_member(&mut self, member_id: DefinitionId) {
self.members.push(member_id);
}

#[must_use]
pub fn mixins(&self) -> &[Mixin] {
&self.mixins
}

pub fn add_member(&mut self, member_id: DefinitionId) {
self.members.push(member_id);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we preserve the order so add_member comes right after members?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I didn't know auto-merge was enabled

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_member does come after members. The diff on GitHub is weird, all I did was move the entire impl block as is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in SingletonClass: #434

@vinistock vinistock merged commit 5dbeda6 into main Jan 8, 2026
14 checks passed
@vinistock vinistock deleted the 01-08-put_classdefinition_impl_next_to_struct branch January 8, 2026 23:12
Copy link
Member Author

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants