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

Projects
None yet
5 participants
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Feb 13, 2015

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

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 13, 2015

r? @huonw

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

@sfackler

This comment has been minimized.

Copy link
Member

sfackler commented Feb 21, 2015

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 {

This comment has been minimized.

@huonw

huonw Feb 21, 2015

Member

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

@nikomatsakis nikomatsakis force-pushed the nikomatsakis:object-safe-sized-methods branch from e8f1b15 to fd9f7da Feb 23, 2015

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Feb 23, 2015

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

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Feb 23, 2015

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

@huonw

This comment has been minimized.

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

Rollup merge of rust-lang#22301 - nikomatsakis:object-safe-sized-meth…
…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

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015

Rollup merge of rust-lang#22301 - nikomatsakis:object-safe-sized-meth…
…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

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015

Rollup merge of rust-lang#22301 - nikomatsakis:object-safe-sized-meth…
…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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@apasel422 apasel422 referenced this pull request Feb 24, 2015

Merged

Update `compare` module #124

@nikomatsakis nikomatsakis deleted the nikomatsakis:object-safe-sized-methods branch Mar 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.