use cmp::Eq; fn sendable() { fn f(i: T, j: T) { assert i == j; } fn g(i: T, j: T) { assert i != j; } let i = ~100; let j = ~100; f(i, j); let i = ~100; let j = ~101; g(i, j); } fn copyable() { fn f(i: T, j: T) { assert i == j; } fn g(i: T, j: T) { assert i != j; } let i = ~100; let j = ~100; f(i, j); let i = ~100; let j = ~101; g(i, j); } fn noncopyable() { fn f(i: T, j: T) { assert i == j; } fn g(i: T, j: T) { assert i != j; } let i = ~100; let j = ~100; f(i, j); let i = ~100; let j = ~101; g(i, j); } fn main() { sendable(); copyable(); noncopyable(); }