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 methods that require Self:Sized to be object safe (RFC 817) #22301

Merged
merged 3 commits into from
Feb 24, 2015

Conversation

nikomatsakis
Copy link
Contributor

RFC 817 is not yet accepted, but I wanted to put this code up so people can see how it works. And to be ready lest it should be accepted.

cc rust-lang/rfcs#817

@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@sfackler
Copy link
Member

Ping?

// future, it would be.) But we know that the true `Self` DOES implement
// the trait. So we just delete this requirement. Hack hack hack.
let mut method_predicates = pick.method_ty.predicates.instantiate(self.tcx(), &all_substs);
match pick.kind {
Copy link
Member

Choose a reason for hiding this comment

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

It is weird to me that this code can just be plain deleted, was it serving no purpose?

@nikomatsakis nikomatsakis force-pushed the object-safe-sized-methods branch from e8f1b15 to fd9f7da Compare February 23, 2015 20:29
@nikomatsakis
Copy link
Contributor Author

@huonw that code was serving a purpose when Trait : Trait was not always true. It serves no purpose now.

@nikomatsakis
Copy link
Contributor Author

@huonw just rebased and added the code about by-value-self, should be ready for r? now

@huonw
Copy link
Member

huonw commented Feb 23, 2015

@bors r+ fd9f

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015
…ods, r=huonw

 RFC 817 is not yet accepted, but I wanted to put this code up so people can see how it works. And to be ready lest it should be accepted.

cc rust-lang/rfcs#817
@bors bors merged commit fd9f7da into rust-lang:master Feb 24, 2015
@nikomatsakis nikomatsakis deleted the object-safe-sized-methods branch March 30, 2016 16:16
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.

5 participants