Skip to content
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

Allow calling methods like functions #18053

Merged
merged 4 commits into from
Oct 15, 2014
Merged

Allow calling methods like functions #18053

merged 4 commits into from
Oct 15, 2014

Conversation

nrc
Copy link
Member

@nrc nrc commented Oct 15, 2014

With the 'receiver' as an argument and static dispatch. Part of UFCS implementation (#16293).

r?

@rust-highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!


// Test method calls with self as an argument

static mut COUNT: uint = 1;
Copy link
Member

Choose a reason for hiding this comment

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

This could be an std::atomics::AtomicUint, to avoid unsafe, fwiw.

bors added a commit that referenced this pull request Oct 15, 2014
With the 'receiver' as an argument and static dispatch. Part of UFCS implementation (#16293).

r?
@bors bors closed this Oct 15, 2014
@bors bors merged commit fe8e591 into rust-lang:master Oct 15, 2014
@brson
Copy link
Contributor

brson commented Oct 15, 2014

Woo! Nice @nick29581.

@nikomatsakis
Copy link
Contributor

👍

@nikomatsakis
Copy link
Contributor

Also, 👍 to @eddyb for making the self explicit in the method types and so forth (quite some time ago now...). That made this patch much easier.

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.

7 participants