Skip to content

Use explicit T::foo(self, args..) calls in generated methods #40

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

Merged
merged 4 commits into from
Oct 10, 2018
Merged

Use explicit T::foo(self, args..) calls in generated methods #40

merged 4 commits into from
Oct 10, 2018

Conversation

LukasKalbertodt
Copy link
Member

We briefly discussed that in #19

Also: a test and two minor cleanup commits.

This changes `self.foo(args...)` to `T::foo(self, args...)`. Being more
explicit here might avoid bad surprises later (although I can't think
of a situation where our current solution breaks).
@LukasKalbertodt LukasKalbertodt added this to the v0.3 milestone Oct 8, 2018
Copy link
Member

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

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

Looks good to me!

// }
//
// With this test we want to make sure, that the call `T::foo` is always
// unambiguous. Luckily, Rust is nice here. And if e only know `T: Foo`, then
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: there's a typo here: missing w in we

@LukasKalbertodt LukasKalbertodt merged commit e285cd7 into auto-impl-rs:master Oct 10, 2018
@LukasKalbertodt LukasKalbertodt deleted the explicit-calls branch October 10, 2018 11:43
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