-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
impl trait for trait #20341
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @nick29581 (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -783,6 +783,9 @@ pub struct ctxt<'tcx> { | |||
|
|||
/// Caches whether types move by default. | |||
pub type_moves_by_default_cache: RefCell<HashMap<Ty<'tcx>,bool>>, | |||
|
|||
/// Caches whether types move by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is for type_moves_by_default_cache
, not object_safety_cache
.
r=me modulo nits |
9086d0c
to
cf5642e
Compare
…; also move get_method_index into traits and give it a better name (`get_vtable_index_of_object_method`).
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`.
75a3396
to
704ed4c
Compare
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Jan 2, 2015
Conflicts: src/librustc/middle/traits/mod.rs src/libstd/io/mod.rs src/test/run-pass/builtin-superkinds-self-type.rs
This was referenced Jan 4, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code that ensures that every trait object
Foo
implements the traitFoo
.This requires patching up some object safety concerns. Also more-or-less requires removing the default
Sized
bound forSelf
. Don't merge yet until we we reach final decision on these language changes.