// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::cmp::Eq; fn sendable() { fn f(i: T, j: T) { assert_eq!(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_eq!(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_eq!(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); } pub fn main() { sendable(); copyable(); noncopyable(); }