Skip to content

Conversation

pcwalton
Copy link
Contributor

r? @catamorphism

I had to take an alarmingly large hatchet to most of the trait bounds in pipes. There is some bug in the interactions between the pipes compiler, the code generated by the pipes compiler, and the kind checker. However, I believe the code to still be safe; it should still not be possible to send a garbage-collected value over a channel.

…ules.

"Dual impls" are impls that are both type implementations and trait
implementations. They can lead to ambiguity and so this patch removes them
from the language.

This also enforces coherence rules. Without this patch, records can implement
traits not defined in the current crate. This patch fixes this, and updates
all of rustc to adhere to the new enforcement. Most of this patch is fixing
rustc to obey the coherence rules, which involves converting a bunch of records
to structs.
@catamorphism
Copy link
Contributor

Doesn't have to be in the same pull request, but we need to document why you're not allowed to have trait bounds in these locations, and what to do instead. (In fact, I don't completely get the gist of it: I assume the issue is that writing struct Bucket<K: Eq> is pointless because instead, you want to write fn foo<K: Eq>(...Bucket<K>...), putting all the constraints on the signature of functions that use Buckets?)

@catamorphism
Copy link
Contributor

r+ -- making it a parse error instead of a type error would be nice, but isn't necessary.

@pcwalton pcwalton closed this Jan 29, 2013
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.

3 participants