Skip to content

associated types - #1069

Merged
micahscopes merged 59 commits into
argotorg:masterfrom
sbillig:assoc-types
Aug 19, 2025
Merged

associated types#1069
micahscopes merged 59 commits into
argotorg:masterfrom
sbillig:assoc-types

Conversation

@sbillig

@sbillig sbillig commented Mar 31, 2025

Copy link
Copy Markdown
Collaborator

This adds support for associated types. eg

trait Add<T> {
  type Output
  fn add(self, other: T) -> Self::Output
}

impl Add<Point> for Point {
  type Ouput = Self
  fn add(self, other: Point) -> Point { .. }
}

Associate types can have trait bounds, but not kind bounds, for now. This should be easy to add, but it isn't currently supported.

@sbillig
sbillig force-pushed the assoc-types branch 2 times, most recently from f13d0e0 to 30ecbc3 Compare April 7, 2025 21:48
@sbillig
sbillig marked this pull request as ready for review August 16, 2025 23:17
@sbillig
sbillig requested a review from micahscopes August 16, 2025 23:17

@micahscopes micahscopes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Excellent

@micahscopes
micahscopes merged commit 7adca5a into argotorg:master Aug 19, 2025
6 checks passed
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.

2 participants