Skip to content

Allow trait functions to define a default body #742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cburgdorf opened this issue Jun 16, 2022 · 1 comment
Closed

Allow trait functions to define a default body #742

cburgdorf opened this issue Jun 16, 2022 · 1 comment

Comments

@cburgdorf
Copy link
Collaborator

What is wrong?

Trait support was added in #710 but it doesn't yet allow trait functions to bring a default implementation. E.g. the following code isn't yet possible.

trait PartialEq {
 
  fn some_thing-> bool {
    return true
  }
}
@sbillig
Copy link
Collaborator

sbillig commented Jan 18, 2025

Fixed in #840

@sbillig sbillig closed this as completed Jan 18, 2025
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

No branches or pull requests

2 participants