mozilla/rust — pull request #14371 by FlaPer87 (2014-05-23 05:42:57+00:00)
Title: [WIP] Start adding support for opt-in built-in traits

This is the first PR adding actual logic for this RFC.

It's still a work in progress but I'd like to start getting feedback from the community.

The PR consists in:

- Adding a bounds checker visitor. As of now, this visitor 'only' checks trait implementations. When a trait implementation for a built-in trait is found, it iterates over the implementation type and checks whether it fulfills the trait.
- Adding a function that gets the trait impl vtables for a type.
- Implementing the `Share` trait for the types requiring it. Note that the implementations added are the ones required to make rust compile. There may definitely be missing implementations for this trait.
- Implementing all the built-in traits for the built-in types

There are still some issues I'm working on. For instance, some fields in the `typeck-bounds-share-impls` are commented out because I hit a compiler bug if they're not. The compiler bug is not really clear to me but I'm working with Niko on figuring what's going on there.

(sorry for taking so long to post this)

cc @nikomatsakis
cc #13231
[breaking-change]
[RFC#3]