1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 pub struct Something { pub x: isize }
15 fn g(&self) -> isize { 10 }
16 fn h(&self) -> isize { 11 }
17 fn lurr(x: &Self, y: &Self) -> isize { x.g() + y.h() }
22 fn f(&self) -> isize { 10 }
25 impl A for Something {
26 fn f(&self) -> isize { 10 }
30 fn thing<U>(&self, x: T, y: U) -> (T, U) { (x, y) }
31 fn staticthing<U>(_z: &Self, x: T, y: U) -> (T, U) { (x, y) }
34 impl<T> B<T> for isize { }
35 impl B<f64> for bool { }
39 pub trait TestEquality {
40 fn test_eq(&self, rhs: &Self) -> bool;
41 fn test_neq(&self, rhs: &Self) -> bool {
46 impl TestEquality for isize {
47 fn test_eq(&self, rhs: &isize) -> bool {