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

impl trait for trait #20341

Merged
merged 8 commits into from Jan 2, 2015

Conversation

Projects
None yet
6 participants
@nikomatsakis
Contributor

nikomatsakis commented Dec 30, 2014

Code that ensures that every trait object Foo implements the trait Foo.

This requires patching up some object safety concerns. Also more-or-less requires removing the default Sized bound for Self. Don't merge yet until we we reach final decision on these language changes.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Dec 30, 2014

Collaborator

r? @nick29581

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

Collaborator

rust-highfive commented Dec 30, 2014

r? @nick29581

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

Show outdated Hide outdated src/librustc/middle/ty.rs Outdated
@pcwalton

This comment has been minimized.

Show comment
Hide comment
@pcwalton

pcwalton Dec 31, 2014

Contributor

r=me modulo nits

Contributor

pcwalton commented Dec 31, 2014

r=me modulo nits

nikomatsakis added some commits Dec 18, 2014

Refactor object-safety into its own (cached) module so that we can
check it more easily; also extend object safety to cover sized types
as well as static methods.  This makes it sufficient so that we can
always ensure that `Foo : Foo` holds for any trait `Foo`.
Move the `upcast` routine into traits and use it for method selection…
…; also

move get_method_index into traits and give it a better name (`get_vtable_index_of_object_method`).

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 2, 2015

rollup merge of rust-lang#20341: nikomatsakis/impl-trait-for-trait-2
Conflicts:
	src/librustc/middle/traits/mod.rs
	src/libstd/io/mod.rs
	src/test/run-pass/builtin-superkinds-self-type.rs

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 2, 2015

rollup merge of rust-lang#20341: nikomatsakis/impl-trait-for-trait-2
Conflicts:
	src/librustc/middle/traits/mod.rs
	src/libstd/io/mod.rs
	src/test/run-pass/builtin-superkinds-self-type.rs

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 2, 2015

rollup merge of rust-lang#20341: nikomatsakis/impl-trait-for-trait-2
Conflicts:
	src/librustc/middle/traits/mod.rs
	src/libstd/io/mod.rs
	src/test/run-pass/builtin-superkinds-self-type.rs

@bors bors merged commit 704ed4c into rust-lang:master Jan 2, 2015

1 check passed

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

@nikomatsakis nikomatsakis deleted the nikomatsakis:impl-trait-for-trait-2 branch Mar 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment