rust/src/test/run-pass/issue-2284.rs
Tim Chevalier 46d4bbbae4 Simplify the AST representation of ty param bounds
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
2012-10-22 09:01:12 -07:00

10 lines
77 B
Rust

trait Send {
fn f();
}
fn f<T: Send>(t: T) {
t.f();
}
fn main() {
}