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

Explicitly pass interfaces in params as references #194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jscissr
Copy link

@jscissr jscissr commented Dec 21, 2020

This is my proposal for fixing #193.

With this change, interface parameters now have to be explicitly marked as references in the interface definitions. Look at tests/ui/pass/param-refcount.rs for an example. This also allows us to get rid of Param. I think this makes it clearer and more consistent. In case you actually do want to pass ownership through a parameter, this is also possible by leaving the & away (not sure if anyone would actually need that).

@ghost
Copy link

ghost commented Dec 21, 2020

CLA assistant check
All CLA requirements met.

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.

None yet

1 participant