46d4bbbae4
Change ast::ty_param_bound so that all ty param bounds are represented as traits, with no special cases for Copy/Send/Owned/Const. typeck::collect generates the special cases. A consequence of this is that code using the #[no_core] attribute can't use the Copy kind/trait. Probably not a big deal? As a side effect, any user-defined traits that happen to be called Copy, etc. in the same module override the built-in Copy trait. r=nmatsakis Closes #2284
10 lines
77 B
Rust
10 lines
77 B
Rust
trait Send {
|
|
fn f();
|
|
}
|
|
|
|
fn f<T: Send>(t: T) {
|
|
t.f();
|
|
}
|
|
|
|
fn main() {
|
|
} |